chamber 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -1
- data/lib/chamber.rb +2 -0
- data/lib/chamber/version.rb +1 -1
- data/spec/lib/chamber_spec.rb +6 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3d0623953d3ea2cce94def03a7f2fd8415b4e17
|
4
|
+
data.tar.gz: 23c1aff1d806a8435f86fa0c65f58148a18b8a9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: affc2e58f699e7a2f0e9bda2832cf9008e391bedebc08f6bf6e3a67703f77d64e26edccd1696afb60da3b7a89fece1082959c5dc5f9aec86e4d414456cf8f024
|
7
|
+
data.tar.gz: 76c9017cb04679780123916532508a1fed799b57f37a06385386108129a95d66115b06af1f690ed6124b9475fa941f97325160cf518c4120edc17b04fd2bd4ae
|
data/README.md
CHANGED
@@ -73,6 +73,21 @@ class Settings
|
|
73
73
|
|
74
74
|
source Rails.root.join('config', 'settings.yml'), namespace: Rails.env, override_from_environment: true
|
75
75
|
source Rails.root.join('config', "credentials-#{Rails.env}.yml")
|
76
|
+
|
77
|
+
load!
|
78
|
+
end
|
79
|
+
```
|
80
|
+
|
81
|
+
Finally, after all your `source` calls, you must call `load!`:
|
82
|
+
|
83
|
+
```ruby
|
84
|
+
class Settings
|
85
|
+
extend Chamber
|
86
|
+
|
87
|
+
source Rails.root.join('config', 'settings.yml'), namespace: Rails.env, override_from_environment: true
|
88
|
+
source Rails.root.join('config', "credentials-#{Rails.env}.yml")
|
89
|
+
|
90
|
+
load!
|
76
91
|
end
|
77
92
|
```
|
78
93
|
|
@@ -115,7 +130,7 @@ inherently wrong with storing sensitive information in git. You just wouldn't
|
|
115
130
|
want to store it in a public repository.
|
116
131
|
|
117
132
|
If it weren't for this concern, managing settings would be trivial, easily
|
118
|
-
solved use any number of approaches
|
133
|
+
solved use any number of approaches; e.g., [like using YAML and ERB in an
|
119
134
|
initializer](http://urgetopunt.com/rails/2009/09/12/yaml-config-with-erb.html).
|
120
135
|
|
121
136
|
I recommend adding a pattern like this to `.gitignore`:
|
data/lib/chamber.rb
CHANGED
data/lib/chamber/version.rb
CHANGED
data/spec/lib/chamber_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chamber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- stevenhallen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-11-
|
12
|
+
date: 2013-11-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hashie
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
127
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.0.
|
128
|
+
rubygems_version: 2.0.6
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Heroku-friendly Settings
|