snappconfig 0.1.3 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84514b0425d7c24da7f5c36f75960bf32fa0227c
4
- data.tar.gz: 81d39551a6842837760680b7e3dfb61d7a1a3d70
3
+ metadata.gz: 001b0d1f7853b00fe2ebf1eef7617d49580d0a1c
4
+ data.tar.gz: faf5883e8f6b274f3887eeb3af6d0d60f6b4c461
5
5
  SHA512:
6
- metadata.gz: b17c83a95995a3415e0c9623c87e5c60f05b5ce5e2204e9067de3edaae936361c8b80a192a87e3acce952a7e1cb8570357a6de46a441643cfe9c668a72273012
7
- data.tar.gz: 7e29fd82dc5e4d1a8c54ac4ca5c91a8e8d1cf9325b8af1fc03a95c3c4a6b69cba3f4daabfc76e1a2feaf1303c7471d4df8ea4317c9548d1a230f77acea79a06a
6
+ metadata.gz: c0231c2f61c62fd18790d51a3e413de297040001c076593581ab9d6da98d3013be63af633c6dcee7866529aaf3354372045458a7df12f2d62dd5156143865685
7
+ data.tar.gz: e150cc501eb0309452909e2a8dc2e9f6fd895b56b8b6f0e3739405c6e95a82aa302af479816558c5f86a9d3396d2ac51b9c9e9635727352562aec54f3629a92b
@@ -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
- raise "The configuration value '#{key}' is required but was not supplied. Check your application.yml file(s)."
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.3"
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.3
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-26 00:00:00.000000000 Z
11
+ date: 2013-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler