configurize 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +19 -1
- data/VERSION +1 -1
- data/configurize.gemspec +4 -4
- data/lib/configurize.rb +1 -1
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -1,6 +1,24 @@
|
|
1
1
|
= configurize
|
2
2
|
|
3
|
-
|
3
|
+
Easily makes a Ruby class or module configurable. Config classes use the hash-key literal syntax to get and set configuration. Config files are managed automatically.
|
4
|
+
|
5
|
+
== How-To
|
6
|
+
|
7
|
+
Extend Configurize and go:
|
8
|
+
|
9
|
+
module MyConfig # file is ./config/my_config.yml
|
10
|
+
extend Configurize
|
11
|
+
end
|
12
|
+
|
13
|
+
MyConfig[:name] = "Super Awesome Website"
|
14
|
+
MyConfig[:logo] = "http://s3.amazonaws.com/my/logo.jpg"
|
15
|
+
|
16
|
+
MyConfig[:name]
|
17
|
+
# => "Super Awesome Website"
|
18
|
+
|
19
|
+
== Why
|
20
|
+
|
21
|
+
Configurize is a dead-simple, lightweight config mixin. For fancier more powerful options, check out the excellent Configurable at http://github.com/bahuvrihi/configurable/tree/master
|
4
22
|
|
5
23
|
== Note on Patches/Pull Requests
|
6
24
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/configurize.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{configurize}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Scott Burton"]
|
12
|
-
s.date = %q{2010-01
|
12
|
+
s.date = %q{2010-02-01}
|
13
13
|
s.description = %q{Configurize makes your Ruby class configurable by providing a read-write interface to a flat YAML file stored in your application's config directory.}
|
14
14
|
s.email = %q{scottburton11@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -35,8 +35,8 @@ Gem::Specification.new do |s|
|
|
35
35
|
s.rubygems_version = %q{1.3.5}
|
36
36
|
s.summary = %q{Configurize makes your ruby class configurable}
|
37
37
|
s.test_files = [
|
38
|
-
"spec/
|
39
|
-
"spec/
|
38
|
+
"spec/configurize_spec.rb",
|
39
|
+
"spec/spec_helper.rb"
|
40
40
|
]
|
41
41
|
|
42
42
|
if s.respond_to? :specification_version then
|
data/lib/configurize.rb
CHANGED
@@ -30,7 +30,7 @@ module Configurize
|
|
30
30
|
|
31
31
|
def config_file_path
|
32
32
|
if defined?(Rails)
|
33
|
-
File.expand_path(Rails.root + "
|
33
|
+
File.expand_path(Rails.root + "config/#{config_file_name}")
|
34
34
|
else
|
35
35
|
File.expand_path(__FILE__ + "/../../config/#{config_file_name}")
|
36
36
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: configurize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Burton
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-01
|
12
|
+
date: 2010-02-01 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -82,5 +82,5 @@ signing_key:
|
|
82
82
|
specification_version: 3
|
83
83
|
summary: Configurize makes your ruby class configurable
|
84
84
|
test_files:
|
85
|
-
- spec/spec_helper.rb
|
86
85
|
- spec/configurize_spec.rb
|
86
|
+
- spec/spec_helper.rb
|