snappconfig 0.1.1 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6d4915af10d39c30322808dc8eca8686f71d1aa6
4
- data.tar.gz: 82476c17726d99fcb073f35d25d88723c180b21e
3
+ metadata.gz: 84514b0425d7c24da7f5c36f75960bf32fa0227c
4
+ data.tar.gz: 81d39551a6842837760680b7e3dfb61d7a1a3d70
5
5
  SHA512:
6
- metadata.gz: 31dfaed8409d853d2cdd82e7288572032a1349ff9bc2e7a747bd5755dc704bc15b4ebab9c6d17969732a3f2c59a55a346fcd179c6d2c01619faa2ed8fe357638
7
- data.tar.gz: 5430a096600d31a6febd48d1957b8352009ef2d0429ca079f8d09805e22f37882e00524e5ad652130f5e0512d12d1f576e7e39ebebc1cfc18a376da5a7c7f518
6
+ metadata.gz: b17c83a95995a3415e0c9623c87e5c60f05b5ce5e2204e9067de3edaae936361c8b80a192a87e3acce952a7e1cb8570357a6de46a441643cfe9c668a72273012
7
+ data.tar.gz: 7e29fd82dc5e4d1a8c54ac4ca5c91a8e8d1cf9325b8af1fc03a95c3c4a6b69cba3f4daabfc76e1a2feaf1303c7471d4df8ea4317c9548d1a230f77acea79a06a
@@ -1,12 +1,16 @@
1
1
  require "rails"
2
2
 
3
- CONFIG = {}
3
+ # Fancy never-nil hash prevents NoMethodErrors during nested access of empty CONFIG object.
4
+ # Need this to get through Heroku's asset precompile stage, when ENV vars are not available.
5
+ # - https://devcenter.heroku.com/articles/rails-asset-pipeline
6
+ # - http://stackoverflow.com/a/170240/165673
7
+ CONFIG = Hash.new(&(p=lambda{|h,k| h[k] = Hash.new(&p)}))
4
8
 
5
9
  module Snappconfig
6
10
  class Railtie < ::Rails::Railtie
7
11
 
8
12
  config.before_configuration do
9
-
13
+
10
14
  # Look for CONFIG file in ENV (For Heroku) or else load from file system:
11
15
  appconfig = ENV['CONFIG'] ? YAML.load(ENV['CONFIG']) : Snappconfig.merged_raw.deep_dup
12
16
 
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.1"
7
+ spec.version = "0.1.3"
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.1
4
+ version: 0.1.3
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-25 00:00:00.000000000 Z
11
+ date: 2013-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler