snappconfig 0.1.3 → 0.1.8
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/lib/snappconfig/railtie.rb +5 -2
- data/snappconfig.gemspec +1 -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: 001b0d1f7853b00fe2ebf1eef7617d49580d0a1c
|
4
|
+
data.tar.gz: faf5883e8f6b274f3887eeb3af6d0d60f6b4c461
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0231c2f61c62fd18790d51a3e413de297040001c076593581ab9d6da98d3013be63af633c6dcee7866529aaf3354372045458a7df12f2d62dd5156143865685
|
7
|
+
data.tar.gz: e150cc501eb0309452909e2a8dc2e9f6fd895b56b8b6f0e3739405c6e95a82aa302af479816558c5f86a9d3396d2ac51b9c9e9635727352562aec54f3629a92b
|
data/lib/snappconfig/railtie.rb
CHANGED
@@ -15,7 +15,7 @@ module Snappconfig
|
|
15
15
|
appconfig = ENV['CONFIG'] ? YAML.load(ENV['CONFIG']) : Snappconfig.merged_raw.deep_dup
|
16
16
|
|
17
17
|
appconfig.deep_merge! appconfig.fetch('defaults', {})
|
18
|
-
appconfig.deep_merge! appconfig.fetch(Rails.env, {})
|
18
|
+
appconfig.deep_merge! appconfig.fetch(Rails.env.to_s, {})
|
19
19
|
|
20
20
|
Snappconfig.environments.each { |environment| appconfig.delete(environment) }
|
21
21
|
|
@@ -42,9 +42,12 @@ module Snappconfig
|
|
42
42
|
|
43
43
|
def check_required(hash)
|
44
44
|
|
45
|
+
logger = Logger.new(STDOUT)
|
46
|
+
|
45
47
|
hash.each_pair do |key,value|
|
46
48
|
if value == '_REQUIRED'
|
47
|
-
|
49
|
+
hash[key] = nil
|
50
|
+
logger.warn "Snappconfig missing configuration value: '#{key}' is required for '#{Rails.env.to_s}' environment. Check your application.yml file(s)."
|
48
51
|
elsif value.is_a?(Hash)
|
49
52
|
check_required(value)
|
50
53
|
end
|
data/snappconfig.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "snappconfig"
|
7
|
-
spec.version = "0.1.
|
7
|
+
spec.version = "0.1.8"
|
8
8
|
spec.authors = ["Yarin Kessler"]
|
9
9
|
spec.email = "ykessler@appgrinders.com"
|
10
10
|
spec.summary = %q{Smarter Rails configuration with YAML}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snappconfig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yarin Kessler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|