travis-config 1.0.11 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a71d9c23188fce65bc4db95fbd119dfb623b9fe5
4
- data.tar.gz: 5dcaeee363fc8476baa56cd1c1a000b5fc6717de
3
+ metadata.gz: 05e90ddcf738b6b525debe3648d8d4d8dea01f43
4
+ data.tar.gz: fd9199386a47ee0ecad693dbf53957e11f497e70
5
5
  SHA512:
6
- metadata.gz: 9e8a2a876d27c031a2fcb2cfb6066f9d2307cb1da9aa4d2b24463023a9137f022bcf350e6682ba7a7ca370c0993f297c488fe3d1b30b1829443eaa8c002786e5
7
- data.tar.gz: 5860c7dd3e6e6ac61c9315a7f56520037d69737782c3f2050af89c2cbcf0b25021f7eeee860da029f7c49479221e00a48d0fab582f8a1d7e8845e26450ece6d8
6
+ metadata.gz: 607a4801164e8d3c7290aa9b5c0a680242ae86f085d7cdb3da6dcdb77625ec974d67556c381390f7a095994af57da73933b2d6d541a58613e3886c33a2ba14d9
7
+ data.tar.gz: 2a01df129dc6a27ab3cd5c2f1a3932d6653713583715c3ee4957eeb555cad046771be68a6018d68aa68b1acbdaf408b337cf337d1512ee8383b751f392078a63
@@ -0,0 +1,40 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ travis-config (1.0.11)
5
+ hashr (~> 2.0.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ diff-lcs (1.2.5)
11
+ hashr (2.0.0)
12
+ metaclass (0.0.4)
13
+ mocha (1.1.0)
14
+ metaclass (~> 0.0.1)
15
+ rspec (3.3.0)
16
+ rspec-core (~> 3.3.0)
17
+ rspec-expectations (~> 3.3.0)
18
+ rspec-mocks (~> 3.3.0)
19
+ rspec-core (3.3.2)
20
+ rspec-support (~> 3.3.0)
21
+ rspec-expectations (3.3.1)
22
+ diff-lcs (>= 1.2.0, < 2.0)
23
+ rspec-support (~> 3.3.0)
24
+ rspec-mocks (3.3.2)
25
+ diff-lcs (>= 1.2.0, < 2.0)
26
+ rspec-support (~> 3.3.0)
27
+ rspec-support (3.3.0)
28
+
29
+ PLATFORMS
30
+ java
31
+ ruby
32
+
33
+ DEPENDENCIES
34
+ hashr (~> 2.0.0)
35
+ mocha (~> 1.1)
36
+ rspec (~> 3.0)
37
+ travis-config!
38
+
39
+ BUNDLED WITH
40
+ 1.12.5
@@ -8,7 +8,13 @@ module Travis
8
8
 
9
9
  def load
10
10
  filenames.inject({}) do |config, filename|
11
- deep_merge(config, load_file(filename)[Config.env] || {})
11
+ file_config = load_file(filename)
12
+ if Config.env != "production" and file_config[Config.env].nil?
13
+ puts "Warning: config in #{filename} has no data for current env #{Config.env}"
14
+ puts "If you are expecting config to be loaded from this file, please make sure"
15
+ puts "your config is indented under a key of the environment (#{Config.env})"
16
+ end
17
+ deep_merge(config, file_config[Config.env] || {})
12
18
  end
13
19
  end
14
20
 
@@ -13,7 +13,8 @@ module Travis
13
13
  logs_database: logs_database,
14
14
  amqp: amqp,
15
15
  redis: redis,
16
- memcached: memcached
16
+ memcached: memcached,
17
+ sentry: sentry
17
18
  )
18
19
  end
19
20
 
@@ -35,6 +36,10 @@ module Travis
35
36
  compact(url: redis_url)
36
37
  end
37
38
 
39
+ def sentry
40
+ compact(dsn: sentry_dsn)
41
+ end
42
+
38
43
  def memcached
39
44
  Memcached.new.config
40
45
  end
@@ -47,6 +52,10 @@ module Travis
47
52
  def redis_url
48
53
  ENV['TRAVIS_REDIS_URL'] || ENV['REDIS_URL']
49
54
  end
55
+
56
+ def sentry_dsn
57
+ ENV['TRAVIS_SENTRY_DSN'] || ENV['SENTRY_DSN']
58
+ end
50
59
  end
51
60
  end
52
61
  end
@@ -1,3 +1,3 @@
1
1
  module TravisConfig
2
- VERSION = '1.0.11'
2
+ VERSION = '1.0.12'
3
3
  end
@@ -0,0 +1,17 @@
1
+ describe Travis::Config::Heroku, :Sentry do
2
+ let(:config) { Travis::Test::Config.load(:heroku) }
3
+ let(:dsn) { 'http://foo:bar@app.getsentry.com/1' }
4
+
5
+ before { ENV[key] = dsn }
6
+ after { ENV.delete('SENTRY_DSN') }
7
+
8
+ describe 'loads a SENTRY_DSN' do
9
+ let(:key) { 'SENTRY_DSN' }
10
+ it { expect(config.sentry.to_h).to eq(dsn: dsn) }
11
+ end
12
+
13
+ describe 'loads a TRAVIS_SENTRY_DSN' do
14
+ let(:key) { 'TRAVIS_SENTRY_DSN' }
15
+ it { expect(config.sentry.to_h).to eq(dsn: dsn) }
16
+ end
17
+ end
@@ -0,0 +1,22 @@
1
+ # encoding: utf-8
2
+
3
+ $:.unshift File.expand_path('../lib', __FILE__)
4
+ require 'travis/config/version'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "travis-config"
8
+ s.version = TravisConfig::VERSION
9
+ s.authors = ["Travis CI"]
10
+ s.email = "contact@travis-ci.org"
11
+ s.homepage = "https://github.com/travis-ci/travis-config"
12
+ s.summary = "Travis CI config"
13
+ s.description = "#{s.summary}."
14
+ s.license = "MIT"
15
+
16
+ s.files = Dir['{lib/**/*,spec/**/*,[A-Z]*}']
17
+ s.platform = Gem::Platform::RUBY
18
+ s.require_path = 'lib'
19
+ s.rubyforge_project = '[none]'
20
+
21
+ s.add_dependency 'hashr', '~> 2.0.0'
22
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: travis-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.11
4
+ version: 1.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis CI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-09 00:00:00.000000000 Z
11
+ date: 2016-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashr
@@ -31,6 +31,7 @@ extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
33
  - Gemfile
34
+ - Gemfile.lock
34
35
  - LICENSE
35
36
  - README.md
36
37
  - lib/travis/config.rb
@@ -50,7 +51,9 @@ files:
50
51
  - spec/travis/config/heroku/database_spec.rb
51
52
  - spec/travis/config/heroku/memcached_spec.rb
52
53
  - spec/travis/config/heroku/redis_spec.rb
54
+ - spec/travis/config/heroku/sentry_spec.rb
53
55
  - spec/travis/config_spec.rb
56
+ - travis-config.gemspec
54
57
  homepage: https://github.com/travis-ci/travis-config
55
58
  licenses:
56
59
  - MIT
@@ -71,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
74
  version: '0'
72
75
  requirements: []
73
76
  rubyforge_project: "[none]"
74
- rubygems_version: 2.4.3
77
+ rubygems_version: 2.4.5
75
78
  signing_key:
76
79
  specification_version: 4
77
80
  summary: Travis CI config