burger_fixins 0.0.2 → 0.0.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/README.mdown +2 -1
- data/VERSION +1 -1
- data/burger_fixins.gemspec +1 -1
- data/lib/burger_fixins/burger_fixins.rb +3 -3
- data/spec/burger_fixins_spec.rb +14 -0
- metadata +3 -3
data/README.mdown
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.4
|
data/burger_fixins.gemspec
CHANGED
|
@@ -70,9 +70,9 @@ module BurgerFixins
|
|
|
70
70
|
|
|
71
71
|
def create_burger_fixins_boolean(setting_name)
|
|
72
72
|
module_eval <<-STR
|
|
73
|
-
def self.#{setting_name}; Redis::Value.new('#{setting_name}', settings_store).value ; end
|
|
74
|
-
def self.#{setting_name}=(v);
|
|
75
|
-
def self.#{setting_name}?;
|
|
73
|
+
def self.#{setting_name}; Redis::Value.new('#{setting_name}', settings_store).value == "true" ; end
|
|
74
|
+
def self.#{setting_name}=(v); settings_store['#{setting_name.to_s}'] = v.to_s ; end
|
|
75
|
+
def self.#{setting_name}?; Redis::Value.new('#{setting_name}', settings_store).value == "true" ; end
|
|
76
76
|
STR
|
|
77
77
|
end
|
|
78
78
|
|
data/spec/burger_fixins_spec.rb
CHANGED
|
@@ -29,6 +29,20 @@ describe 'burger_fixins' do
|
|
|
29
29
|
Redis.new(:db => 15)['TestSettings:bacon'].should == "true"
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
+
it "should be able to false boolean values" do
|
|
33
|
+
TestSettings.bacon = true
|
|
34
|
+
TestSettings.bacon.should be_true
|
|
35
|
+
TestSettings.bacon = false
|
|
36
|
+
TestSettings.bacon.should be_false
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
it "should be able to answer boolean questions" do
|
|
40
|
+
TestSettings.bacon = true
|
|
41
|
+
TestSettings.bacon?.should be_true
|
|
42
|
+
TestSettings.bacon = false
|
|
43
|
+
TestSettings.bacon?.should be_false
|
|
44
|
+
end
|
|
45
|
+
|
|
32
46
|
it "should retrieve a setting" do
|
|
33
47
|
TestSettings.bacon = true
|
|
34
48
|
TestSettings.bacon.should be_true
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: burger_fixins
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 23
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
9
|
+
- 4
|
|
10
|
+
version: 0.0.4
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Patrick Tulskie
|