youthtree-settings 0.1.4 → 0.2.0
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.
- data/lib/youth_tree/settings.rb +5 -2
- data/youthtree-settings.gemspec +9 -11
- metadata +7 -8
- data/.gitignore +0 -21
data/lib/youth_tree/settings.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
require 'yaml'
|
2
|
+
require 'erb'
|
2
3
|
|
3
4
|
module YouthTree
|
4
5
|
class Settings
|
5
6
|
|
6
|
-
VERSION = "0.
|
7
|
+
VERSION = "0.2.0".freeze
|
7
8
|
|
8
9
|
cattr_reader :settings_path
|
9
10
|
def self.settings_path
|
@@ -64,7 +65,9 @@ module YouthTree
|
|
64
65
|
class << self
|
65
66
|
|
66
67
|
def load_from_file
|
67
|
-
contents =
|
68
|
+
contents = File.read(self.settings_path)
|
69
|
+
contents = ERB.new(contents).result
|
70
|
+
contents = YAML.load(contents)
|
68
71
|
(contents["default"] || {}).deep_merge(contents[Rails.env] || {})
|
69
72
|
end
|
70
73
|
|
data/youthtree-settings.gemspec
CHANGED
@@ -5,29 +5,27 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{youthtree-settings}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Darcy Laycock"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-12-11}
|
13
13
|
s.description = %q{Lets you use config/settings.yml in a rails application to manage settings on a per-env basis.}
|
14
14
|
s.email = %q{sutto@sutto.net}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
|
-
|
17
|
+
"README.md"
|
18
18
|
]
|
19
19
|
s.files = [
|
20
20
|
".document",
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
"youthtree-settings.gemspec"
|
21
|
+
"LICENSE",
|
22
|
+
"README.md",
|
23
|
+
"Rakefile",
|
24
|
+
"lib/youth_tree/settings.rb",
|
25
|
+
"lib/youthtree-settings.rb",
|
26
|
+
"youthtree-settings.gemspec"
|
28
27
|
]
|
29
28
|
s.homepage = %q{http://github.com/YouthTree/youthtree-settings}
|
30
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
31
29
|
s.require_paths = ["lib"]
|
32
30
|
s.rubygems_version = %q{1.3.7}
|
33
31
|
s.summary = %q{Simple Settings for Rails Applications}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: youthtree-settings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Darcy Laycock
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-12-11 00:00:00 +08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -46,7 +46,6 @@ extra_rdoc_files:
|
|
46
46
|
- README.md
|
47
47
|
files:
|
48
48
|
- .document
|
49
|
-
- .gitignore
|
50
49
|
- LICENSE
|
51
50
|
- README.md
|
52
51
|
- Rakefile
|
@@ -58,8 +57,8 @@ homepage: http://github.com/YouthTree/youthtree-settings
|
|
58
57
|
licenses: []
|
59
58
|
|
60
59
|
post_install_message:
|
61
|
-
rdoc_options:
|
62
|
-
|
60
|
+
rdoc_options: []
|
61
|
+
|
63
62
|
require_paths:
|
64
63
|
- lib
|
65
64
|
required_ruby_version: !ruby/object:Gem::Requirement
|