constantinople 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.rvmrc +1 -1
- data/lib/constantinople.rb +9 -1
- data/lib/constantinople/version.rb +1 -1
- data/spec/config/erby.yml +4 -0
- metadata +39 -39
data/.rvmrc
CHANGED
@@ -1 +1 @@
|
|
1
|
-
rvm use ruby-1.8.7@constantinople
|
1
|
+
rvm use ruby-1.8.7@constantinople --create
|
data/lib/constantinople.rb
CHANGED
@@ -22,7 +22,7 @@ module Constantinople
|
|
22
22
|
['.yml.default', '.yml', '.yml.override'].each do |ext|
|
23
23
|
Dir.glob(File.join(dir,"*#{ext}")) do |path|
|
24
24
|
filename = File.basename(path,ext)
|
25
|
-
sub =
|
25
|
+
sub = load_yaml_or_warn(path)
|
26
26
|
if sub
|
27
27
|
sub = Map.new(sub)
|
28
28
|
sub.deeper_merge!(sub[env]) if sub.include?(env)
|
@@ -35,6 +35,14 @@ module Constantinople
|
|
35
35
|
result
|
36
36
|
end
|
37
37
|
|
38
|
+
def self.load_yaml_or_warn(path)
|
39
|
+
YAML.load_file(path)
|
40
|
+
rescue Exception => e
|
41
|
+
$stderr.puts "WARNING: Unable to load file: '#{path}'."
|
42
|
+
$stderr.puts " Reason: #{e.message}"
|
43
|
+
nil
|
44
|
+
end
|
45
|
+
|
38
46
|
def self.environment
|
39
47
|
['RAILS_ENV', 'RACK_ENV', 'APP_ENV'].each do |env|
|
40
48
|
environment = ENV[env]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: constantinople
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Chris Johnson
|
@@ -15,13 +15,10 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
18
|
+
date: 2012-02-07 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
|
-
|
23
|
-
prerelease: false
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
21
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
25
22
|
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
@@ -31,12 +28,12 @@ dependencies:
|
|
31
28
|
- 4
|
32
29
|
- 2
|
33
30
|
version: "4.2"
|
31
|
+
requirement: *id001
|
34
32
|
type: :runtime
|
35
|
-
version_requirements: *id001
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: deep_merge
|
38
33
|
prerelease: false
|
39
|
-
|
34
|
+
name: map
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
40
37
|
none: false
|
41
38
|
requirements:
|
42
39
|
- - ~>
|
@@ -46,12 +43,12 @@ dependencies:
|
|
46
43
|
- 1
|
47
44
|
- 0
|
48
45
|
version: "1.0"
|
46
|
+
requirement: *id002
|
49
47
|
type: :runtime
|
50
|
-
version_requirements: *id002
|
51
|
-
- !ruby/object:Gem::Dependency
|
52
|
-
name: rspec
|
53
48
|
prerelease: false
|
54
|
-
|
49
|
+
name: deep_merge
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
55
52
|
none: false
|
56
53
|
requirements:
|
57
54
|
- - ~>
|
@@ -61,12 +58,12 @@ dependencies:
|
|
61
58
|
- 2
|
62
59
|
- 6
|
63
60
|
version: "2.6"
|
61
|
+
requirement: *id003
|
64
62
|
type: :development
|
65
|
-
version_requirements: *id003
|
66
|
-
- !ruby/object:Gem::Dependency
|
67
|
-
name: simplecov
|
68
63
|
prerelease: false
|
69
|
-
|
64
|
+
name: rspec
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
70
67
|
none: false
|
71
68
|
requirements:
|
72
69
|
- - ~>
|
@@ -76,12 +73,12 @@ dependencies:
|
|
76
73
|
- 0
|
77
74
|
- 4
|
78
75
|
version: "0.4"
|
76
|
+
requirement: *id004
|
79
77
|
type: :development
|
80
|
-
version_requirements: *id004
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name: rb-fsevent
|
83
78
|
prerelease: false
|
84
|
-
|
79
|
+
name: simplecov
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
85
82
|
none: false
|
86
83
|
requirements:
|
87
84
|
- - ~>
|
@@ -91,12 +88,12 @@ dependencies:
|
|
91
88
|
- 0
|
92
89
|
- 4
|
93
90
|
version: "0.4"
|
91
|
+
requirement: *id005
|
94
92
|
type: :development
|
95
|
-
version_requirements: *id005
|
96
|
-
- !ruby/object:Gem::Dependency
|
97
|
-
name: guard
|
98
93
|
prerelease: false
|
99
|
-
|
94
|
+
name: rb-fsevent
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
100
97
|
none: false
|
101
98
|
requirements:
|
102
99
|
- - ~>
|
@@ -106,12 +103,12 @@ dependencies:
|
|
106
103
|
- 0
|
107
104
|
- 5
|
108
105
|
version: "0.5"
|
106
|
+
requirement: *id006
|
109
107
|
type: :development
|
110
|
-
version_requirements: *id006
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: guard-bundler
|
113
108
|
prerelease: false
|
114
|
-
|
109
|
+
name: guard
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
115
112
|
none: false
|
116
113
|
requirements:
|
117
114
|
- - ~>
|
@@ -121,12 +118,12 @@ dependencies:
|
|
121
118
|
- 0
|
122
119
|
- 1
|
123
120
|
version: "0.1"
|
121
|
+
requirement: *id007
|
124
122
|
type: :development
|
125
|
-
version_requirements: *id007
|
126
|
-
- !ruby/object:Gem::Dependency
|
127
|
-
name: guard-rspec
|
128
123
|
prerelease: false
|
129
|
-
|
124
|
+
name: guard-bundler
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
130
127
|
none: false
|
131
128
|
requirements:
|
132
129
|
- - ~>
|
@@ -136,8 +133,10 @@ dependencies:
|
|
136
133
|
- 0
|
137
134
|
- 4
|
138
135
|
version: "0.4"
|
136
|
+
requirement: *id008
|
139
137
|
type: :development
|
140
|
-
|
138
|
+
prerelease: false
|
139
|
+
name: guard-rspec
|
141
140
|
description: Supports defaults, over-rides, and environments
|
142
141
|
email:
|
143
142
|
- chris@kindkid.com
|
@@ -159,12 +158,12 @@ files:
|
|
159
158
|
- lib/constantinople/deep_merge_map.rb
|
160
159
|
- lib/constantinople/version.rb
|
161
160
|
- spec/config/empty.yml
|
161
|
+
- spec/config/erby.yml
|
162
162
|
- spec/config/spec.yml
|
163
163
|
- spec/config/spec.yml.default
|
164
164
|
- spec/config/spec.yml.override
|
165
165
|
- spec/lib/constantinople_spec.rb
|
166
166
|
- spec/spec_helper.rb
|
167
|
-
has_rdoc: true
|
168
167
|
homepage: https://github.com/kindkid/constantinople
|
169
168
|
licenses: []
|
170
169
|
|
@@ -194,12 +193,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
194
193
|
requirements: []
|
195
194
|
|
196
195
|
rubyforge_project: constantinople
|
197
|
-
rubygems_version: 1.
|
196
|
+
rubygems_version: 1.8.10
|
198
197
|
signing_key:
|
199
198
|
specification_version: 3
|
200
199
|
summary: Load all your config/*.yml files
|
201
200
|
test_files:
|
202
201
|
- spec/config/empty.yml
|
202
|
+
- spec/config/erby.yml
|
203
203
|
- spec/config/spec.yml
|
204
204
|
- spec/config/spec.yml.default
|
205
205
|
- spec/config/spec.yml.override
|