0.01
No release in over 3 years
Low commit activity in last 3 years
Travis CI config.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 2.0
 Project Readme

Travis Config

Shared way of loading and reading configuration in Travis CI.

Internal documentation for Travis CI Builders on how configs are loaded for Travis apps can be found here. (not publicly accessible)

Users can either set defaults and include logic directly to the class Travis::Config or extend the class to, e.g. Travis::Logs::Config.

E.g.

require 'travis/config'

module Travis
  class Config < Hashr
    define  host:  'travis-ci.org'

    def foo
      :foo
    end
  end
end

Or:

require 'travis/config'

module Travis::Logs
  class Config < Travis::Config
    define  host:  'logs.travis-ci.org'

    def foo
      :foo
    end
  end
end

Config sources

Serveral config sources are supported:

  • Files: All files config/travis.yml and config/travis/*.yml are read and merged (alpabetically sorted).
  • Env: ENV['travis_config'] is parsed as YAML and merged, if present.
  • Heroku: The env vars DATABASE_URL or SHARED_DATABASE_URL, and DB_POOL  or DATABASE_POOL_SIZE, REDIS_URL, and REDIS_POOL_SIZE are merged into the database config.
  • Docker: The env vars POSTGRESQL_PORT, RABBITMQ_PORT, and REDIS_PORT are interpreted as resource URLs, and merged into the database config.

Configuration from all sources is merged before it is passed to the Hashr instance. All merging is deep merging of Hashes on any level.

Doing a Rubygem release

Any tool works. The current releases were done with gem-release which allows creating a Git tag, pushing it to GitHub, building the gem and pushing it to Rubygems in one go:

$ gem install gem-release
$ gem bump --push --tag --release