configulations 0.1.3 → 0.1.4
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/VERSION +1 -1
- data/config/server.yml +2 -1
- data/configulations.gemspec +2 -2
- data/lib/configulations.rb +3 -1
- data/lib/magic_hash.rb +2 -0
- data/spec/configurator_spec.rb +6 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
data/config/server.yml
CHANGED
data/configulations.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{configulations}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Leon Gersing"]
|
12
|
-
s.date = %q{2011-07-
|
12
|
+
s.date = %q{2011-07-05}
|
13
13
|
s.description = %q{Auto-create configuration objects for your applications from yml and json files.}
|
14
14
|
s.email = %q{leongersing@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/configulations.rb
CHANGED
@@ -33,9 +33,11 @@ class Configulations
|
|
33
33
|
result = properties.send message_name.to_sym, *message_arguments
|
34
34
|
return result if result
|
35
35
|
message = message_name.to_s.strip.gsub(/-/,"_")
|
36
|
-
if message
|
36
|
+
if message =~ /=/
|
37
37
|
properties[message.gsub(/=/,"").to_sym] = message_arguments.flatten.first
|
38
38
|
return
|
39
|
+
elsif message =~ /\?/
|
40
|
+
return !!(properties[message.gsub(/\?/,"").to_sym])
|
39
41
|
end
|
40
42
|
super message_name, *message_arguments, &optional_block
|
41
43
|
end
|
data/lib/magic_hash.rb
CHANGED
data/spec/configurator_spec.rb
CHANGED
@@ -23,6 +23,12 @@ describe Configulations do
|
|
23
23
|
c.server.content_types.should be_a_kind_of Array
|
24
24
|
c.server.content_types.length.should == 3
|
25
25
|
end
|
26
|
+
|
27
|
+
it "responds to known booleans." do
|
28
|
+
c = Configulations.new
|
29
|
+
c.server.cache_enabled?.should == true
|
30
|
+
c.server.cache_enabled?.should be_true
|
31
|
+
end
|
26
32
|
end
|
27
33
|
end
|
28
34
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: configulations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Leon Gersing
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-07-
|
13
|
+
date: 2011-07-05 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -99,7 +99,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
99
99
|
requirements:
|
100
100
|
- - ">="
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
hash:
|
102
|
+
hash: 1173186022694134451
|
103
103
|
segments:
|
104
104
|
- 0
|
105
105
|
version: "0"
|