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 +4 -4
- data/Gemfile.lock +4 -1
- data/lib/travis/config/heroku.rb +1 -1
- data/lib/travis/config/heroku/database.rb +1 -1
- data/lib/travis/config/version.rb +1 -1
- data/spec/spec_helper.rb +2 -1
- data/spec/travis/config/heroku/database_spec.rb +10 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6e9f614609f8d04a6d02ea9839cdfa3d675ecc4
|
4
|
+
data.tar.gz: a8c417e4c838b2ccbedbd1b78484f5f74d786bac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 508ad8f7952b0ef05d02b3175ef0508fdefb29c0e1385105a1c7c18e265c3de138b1a85b237d7742625f1fe3e7302cdbb7d904de66f61600320a5d6cb254cd1c
|
7
|
+
data.tar.gz: 0fa3ad8e248cf61c99253e19de731f7aa67608f9ceafc81fb948dc2dfebb1b487cd727b1ef97b9dd71d7a9c93cb8d888d67aaa91147806d36034a8e2a5a764d4
|
data/Gemfile.lock
CHANGED
data/lib/travis/config/heroku.rb
CHANGED
@@ -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
|
data/spec/spec_helper.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2015-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashr
|