snappconfig 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/snappconfig/railtie.rb +6 -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: 84514b0425d7c24da7f5c36f75960bf32fa0227c
|
4
|
+
data.tar.gz: 81d39551a6842837760680b7e3dfb61d7a1a3d70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b17c83a95995a3415e0c9623c87e5c60f05b5ce5e2204e9067de3edaae936361c8b80a192a87e3acce952a7e1cb8570357a6de46a441643cfe9c668a72273012
|
7
|
+
data.tar.gz: 7e29fd82dc5e4d1a8c54ac4ca5c91a8e8d1cf9325b8af1fc03a95c3c4a6b69cba3f4daabfc76e1a2feaf1303c7471d4df8ea4317c9548d1a230f77acea79a06a
|
data/lib/snappconfig/railtie.rb
CHANGED
@@ -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.
|
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.
|
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-
|
11
|
+
date: 2013-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|