settingson 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/settingson/store.rb +6 -1
- data/lib/settingson/version.rb +1 -1
- data/spec/models/settings_spec.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a91ae8583e73c4d57296709ebfe37b737c9346d
|
4
|
+
data.tar.gz: 2e722b37355d9c2342b7ad6998e444faac7998d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38181f2593f6b684193844f71cae1de790fb13de2eff294be27b8cb982e064d27cfb2ec9f0859b2ae7a8b0f1f2b10741620dd1da8461a2be20d577bd716ca492
|
7
|
+
data.tar.gz: b790a7ba1f3bdbeb616790f5779d07fe77798c68111195074185a0a50a93a5bfa6c52c132e05a998be624abc6e9a80c6d86d4d28cf0921606682e2a745c5798f
|
data/lib/settingson/store.rb
CHANGED
@@ -21,17 +21,22 @@ class Settingson::Store
|
|
21
21
|
[]
|
22
22
|
end
|
23
23
|
|
24
|
+
def to_key
|
25
|
+
nil
|
26
|
+
end
|
27
|
+
|
24
28
|
alias empty? nil?
|
25
29
|
alias to_ary to_a
|
26
30
|
|
27
31
|
def method_missing(symbol, *args)
|
32
|
+
__debug(caller)
|
28
33
|
__rescue_action(symbol.to_s, args)
|
29
34
|
end # method_missing
|
30
35
|
|
31
36
|
protected
|
32
37
|
# TODO: move all methods to support class
|
33
38
|
def __debug(message)
|
34
|
-
message = sprintf("%s#%-
|
39
|
+
message = sprintf("%s#%-24s: %s",
|
35
40
|
self.class.name,
|
36
41
|
caller_locations.first.label,
|
37
42
|
message)
|
data/lib/settingson/version.rb
CHANGED
@@ -46,6 +46,7 @@ describe Settings do
|
|
46
46
|
expect( Settings.not_found.to_s ).to eq("")
|
47
47
|
expect( Settings.not_found.to_i ).to eq(0)
|
48
48
|
expect( Settings.not_found.to_a ).to eq([])
|
49
|
+
expect( Settings.not_found.to_key ).to eq(nil)
|
49
50
|
expect( Settings.not_found.nil? ).to eq(true)
|
50
51
|
expect( Settings.not_found.empty? ).to eq(true)
|
51
52
|
expect( Settings.not_found.blank? ).to eq(true)
|