tcfg 0.1.0 → 0.1.1
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 -0
- data/VERSION +1 -1
- data/lib/tcfg/tcfg_helper.rb +11 -6
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab856a0778cb79bb3d904c64c539dc3ff0f972d0
|
4
|
+
data.tar.gz: bc051c263156ac131aad25df89d6a0020d9eb0b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37f12a1426534269e0c3660d33eddab8f3c620ae0ff7270e6ea0c11231fa942d2eb4bcc3e8c526d995e1dfdacd70d8bd2414b4c5727b2b15be834f9436a00c20
|
7
|
+
data.tar.gz: 21925ca01357f8f511567a146169add218518d002fb381f48dce29fdfb450666bdc83bd35ebbb95168384110cf130365c03286b590fb8f907abecd43bd6696d9
|
data/Gemfile.lock
CHANGED
@@ -32,6 +32,7 @@ GEM
|
|
32
32
|
rake
|
33
33
|
rdoc
|
34
34
|
json (1.8.1)
|
35
|
+
json (1.8.1-java)
|
35
36
|
jwt (0.1.11)
|
36
37
|
multi_json (>= 1.5)
|
37
38
|
mini_portile (0.5.2)
|
@@ -40,6 +41,8 @@ GEM
|
|
40
41
|
multipart-post (2.0.0)
|
41
42
|
nokogiri (1.6.1)
|
42
43
|
mini_portile (~> 0.5.0)
|
44
|
+
nokogiri (1.6.1-java)
|
45
|
+
mini_portile (~> 0.5.0)
|
43
46
|
oauth2 (0.9.3)
|
44
47
|
faraday (>= 0.8, < 0.10)
|
45
48
|
jwt (~> 0.1.8)
|
@@ -61,6 +64,7 @@ GEM
|
|
61
64
|
yard (0.8.7.3)
|
62
65
|
|
63
66
|
PLATFORMS
|
67
|
+
java
|
64
68
|
ruby
|
65
69
|
|
66
70
|
DEPENDENCIES
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/lib/tcfg/tcfg_helper.rb
CHANGED
@@ -116,10 +116,15 @@ module TCFG
|
|
116
116
|
t_tcfg[key]
|
117
117
|
end
|
118
118
|
|
119
|
+
# like tcfg_get but doesnt raise an exception if key is not defined
|
120
|
+
def tcfg_fetch key, alt_value=nil
|
121
|
+
tcfg.fetch key, alt_value
|
122
|
+
end
|
123
|
+
|
119
124
|
# force tcfg to re-resolve the configuration
|
120
125
|
#
|
121
126
|
# This method can be called to force tcfg to re-resolve the configuration.
|
122
|
-
# This generally should not be needed directly, but situations where it
|
127
|
+
# This generally should not be needed directly, but situations where it
|
123
128
|
# could be used include:
|
124
129
|
# - The underlying config file(s) have changed and you want to re-read them
|
125
130
|
# - The underlying ENV environment variables have changed and you want to re-read them
|
@@ -132,7 +137,7 @@ module TCFG
|
|
132
137
|
|
133
138
|
# change the prefix used for configuration finding
|
134
139
|
#
|
135
|
-
# By default TCFG looks for
|
140
|
+
# By default TCFG looks for
|
136
141
|
# - environment variables prefixed with T_
|
137
142
|
# - sections in config files called t_environments
|
138
143
|
#
|
@@ -249,16 +254,16 @@ module TCFG
|
|
249
254
|
resolved_config = ActiveSupport::HashWithIndifferentAccess.new
|
250
255
|
|
251
256
|
#tier 1 code defaults
|
252
|
-
resolved_config.
|
257
|
+
resolved_config.deep_merge! tier_code_defaults
|
253
258
|
|
254
259
|
#tier 2, the main config file
|
255
|
-
resolved_config.
|
260
|
+
resolved_config.deep_merge! tier_config_file
|
256
261
|
|
257
262
|
#tier 3, the main config file
|
258
|
-
resolved_config.
|
263
|
+
resolved_config.deep_merge! tier_secret_config_file
|
259
264
|
|
260
265
|
#tier 4, environment overrides
|
261
|
-
resolved_config.
|
266
|
+
resolved_config.deep_merge! tier_environment_overrides
|
262
267
|
|
263
268
|
#tier 5, environment variable overrides
|
264
269
|
tier_environment_variable_overrides resolved_config
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tcfg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- robert schultheis
|
@@ -105,8 +105,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
107
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.2.
|
108
|
+
rubygems_version: 2.2.2
|
109
109
|
signing_key:
|
110
110
|
specification_version: 4
|
111
111
|
summary: Test suite configuration for the real world
|
112
112
|
test_files: []
|
113
|
+
has_rdoc:
|