travis-config 1.0.1 → 1.0.2

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: abfb4c4846af68b332efa620d539f99364e114a4
4
- data.tar.gz: 111c9e64a11eb6331b1bacb9bb565ba634f385ff
3
+ metadata.gz: a6e9f614609f8d04a6d02ea9839cdfa3d675ecc4
4
+ data.tar.gz: a8c417e4c838b2ccbedbd1b78484f5f74d786bac
5
5
  SHA512:
6
- metadata.gz: 34744c5d5d60649245b11bc43e51378bfad6189304fb64f6949743723f649e4b52f16e65af8caba5f3762d7df7ab111f58aed6735217a98e726da377619aeafc
7
- data.tar.gz: 124924ade87b5a6b4c844a0b806a7b741a5855583a0948d55a59e75de9bb8eff6f20e099625865deca6848cdb49998d84ed4dbe88adddb0e0351c36db2b53812
6
+ metadata.gz: 508ad8f7952b0ef05d02b3175ef0508fdefb29c0e1385105a1c7c18e265c3de138b1a85b237d7742625f1fe3e7302cdbb7d904de66f61600320a5d6cb254cd1c
7
+ data.tar.gz: 0fa3ad8e248cf61c99253e19de731f7aa67608f9ceafc81fb948dc2dfebb1b487cd727b1ef97b9dd71d7a9c93cb8d888d67aaa91147806d36034a8e2a5a764d4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- travis-config (1.0.0)
4
+ travis-config (1.0.1)
5
5
  hashr (~> 2.0.0)
6
6
 
7
7
  GEM
@@ -35,3 +35,6 @@ DEPENDENCIES
35
35
  mocha (~> 1.1)
36
36
  rspec (~> 3.0)
37
37
  travis-config!
38
+
39
+ BUNDLED WITH
40
+ 1.10.6
@@ -28,7 +28,7 @@ module Travis
28
28
  end
29
29
 
30
30
  def amqp
31
- compact(Url.parse(ENV['RABBITMQ_URL']).to_h)
31
+ compact(Url.parse(ENV['RABBITMQ_URL'] || ENV['RABBITMQ_BIGWIG_URL']).to_h) # rabbitmq-bigwig add-ons can only be attached as RABBITMQ_BIGWIG
32
32
  end
33
33
 
34
34
  def redis
@@ -6,7 +6,7 @@ module Travis
6
6
  class Database < Struct.new(:options)
7
7
  include Helpers
8
8
 
9
- DEFAULTS = { adapter: 'postgresql', encoding: 'unicode' }
9
+ DEFAULTS = { adapter: 'postgresql', encoding: 'unicode', application_name: ENV['DYNO'] || $0 }
10
10
 
11
11
  def config
12
12
  config = parse_url
@@ -1,3 +1,3 @@
1
1
  module TravisConfig
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
@@ -1,4 +1,5 @@
1
- ENV['ENV'] = 'test'
1
+ ENV['ENV'] = 'test'
2
+ ENV['DYNO'] = 'travis-config/specs'
2
3
 
3
4
  require 'mocha'
4
5
  require 'travis/config'
@@ -1,12 +1,14 @@
1
1
  describe Travis::Config::Heroku, :Database do
2
2
  let(:config) { Travis::Test::Config.load(:heroku) }
3
- let(:vars) { %w(DATABASE_URL DB_POOL DATABASE_POOL_SIZE LOGS_DATABASE_URL LOGS_DB_POOL LOGS_DATABASE_POOL_SIZE) }
3
+ let(:vars) { %w(DATABASE_URL DB_POOL DATABASE_POOL_SIZE LOGS_DATABASE_URL LOGS_DB_POOL LOGS_DATABASE_POOL_SIZE DYNO) }
4
4
  after { vars.each { |key| ENV.delete(key) } }
5
+ before { ENV['DYNO'] = 'app_name' }
5
6
 
6
7
  it 'loads a DATABASE_URL with a port' do
7
8
  ENV['DATABASE_URL'] = 'postgres://username:password@hostname:1234/database'
8
9
 
9
10
  expect(config.database.to_h).to eq(
11
+ application_name: 'travis-config/specs',
10
12
  adapter: 'postgresql',
11
13
  host: 'hostname',
12
14
  port: 1234,
@@ -21,6 +23,7 @@ describe Travis::Config::Heroku, :Database do
21
23
  ENV['DATABASE_URL'] = 'postgres://username:password@hostname/database'
22
24
 
23
25
  expect(config.database.to_h).to eq(
26
+ application_name: 'travis-config/specs',
24
27
  adapter: 'postgresql',
25
28
  host: 'hostname',
26
29
  database: 'database',
@@ -35,6 +38,7 @@ describe Travis::Config::Heroku, :Database do
35
38
  ENV['DB_POOL'] = '25'
36
39
 
37
40
  expect(config.database.to_h).to eq(
41
+ application_name: 'travis-config/specs',
38
42
  adapter: 'postgresql',
39
43
  host: 'hostname',
40
44
  port: 1234,
@@ -51,6 +55,7 @@ describe Travis::Config::Heroku, :Database do
51
55
  ENV['DATABASE_POOL_SIZE'] = '25'
52
56
 
53
57
  expect(config.database.to_h).to eq(
58
+ application_name: 'travis-config/specs',
54
59
  adapter: 'postgresql',
55
60
  host: 'hostname',
56
61
  port: 1234,
@@ -66,6 +71,7 @@ describe Travis::Config::Heroku, :Database do
66
71
  ENV['LOGS_DATABASE_URL'] = 'postgres://username:password@hostname:1234/logs_database'
67
72
 
68
73
  expect(config.logs_database.to_h).to eq(
74
+ application_name: 'travis-config/specs',
69
75
  adapter: 'postgresql',
70
76
  host: 'hostname',
71
77
  port: 1234,
@@ -80,6 +86,7 @@ describe Travis::Config::Heroku, :Database do
80
86
  ENV['LOGS_DATABASE_URL'] = 'postgres://username:password@hostname/logs_database'
81
87
 
82
88
  expect(config.logs_database.to_h).to eq(
89
+ application_name: 'travis-config/specs',
83
90
  adapter: 'postgresql',
84
91
  host: 'hostname',
85
92
  database: 'logs_database',
@@ -94,6 +101,7 @@ describe Travis::Config::Heroku, :Database do
94
101
  ENV['LOGS_DB_POOL'] = '25'
95
102
 
96
103
  expect(config.logs_database.to_h).to eq(
104
+ application_name: 'travis-config/specs',
97
105
  adapter: 'postgresql',
98
106
  host: 'hostname',
99
107
  port: 1234,
@@ -110,6 +118,7 @@ describe Travis::Config::Heroku, :Database do
110
118
  ENV['LOGS_DATABASE_POOL_SIZE'] = '25'
111
119
 
112
120
  expect(config.logs_database.to_h).to eq(
121
+ application_name: 'travis-config/specs',
113
122
  adapter: 'postgresql',
114
123
  host: 'hostname',
115
124
  port: 1234,
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.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis CI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-01 00:00:00.000000000 Z
11
+ date: 2015-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashr