youthtree-settings 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.1.4".freeze
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 = YAML.load(File.read(self.settings_path))
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
 
@@ -5,29 +5,27 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{youthtree-settings}
8
- s.version = "0.1.4"
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-08-28}
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
- "README.md"
17
+ "README.md"
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.md",
24
- "Rakefile",
25
- "lib/youth_tree/settings.rb",
26
- "lib/youthtree-settings.rb",
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: 19
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 1
9
- - 4
10
- version: 0.1.4
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-08-28 00:00:00 +08:00
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
- - --charset=UTF-8
60
+ rdoc_options: []
61
+
63
62
  require_paths:
64
63
  - lib
65
64
  required_ruby_version: !ruby/object:Gem::Requirement
data/.gitignore DELETED
@@ -1,21 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC