setsy 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/setsy/configuration.rb +7 -5
- data/lib/setsy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80ee1bce812ae3cafaf1ccb9042c6ad779e4252a
|
4
|
+
data.tar.gz: 5a160606d6c86b5ad74eb928c49b8c49bcc3559a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ebcb31cca6d1eee2a596430729e6cec0d2c4013ea212f1e6546b83c52e5466c2d6db389b78e98e2b0c2b4c0bcf4de7ccd5241025138899a971cbabb4b69796e
|
7
|
+
data.tar.gz: bc7f235b43cee2fad5191354d55db8b94378ccd033ef02ca01d32182e8249dcff52efdcafb9aeb4520b39d1a81049d3cd72fafb6ab838b8e1080be3366963708
|
data/lib/setsy/configuration.rb
CHANGED
@@ -21,7 +21,13 @@ module Setsy
|
|
21
21
|
result = {}
|
22
22
|
result[:value] = v.is_a?(Hash) ? v[:value] : v
|
23
23
|
result[:default] = result[:value]
|
24
|
-
|
24
|
+
if set[k]
|
25
|
+
if set[k].is_a?(Hash)
|
26
|
+
result[:value] = set[k][:value]
|
27
|
+
else
|
28
|
+
result[:value] = set[k]
|
29
|
+
end
|
30
|
+
end
|
25
31
|
settings[k] = Attribute.new(result)
|
26
32
|
end
|
27
33
|
new(record, settings, readers)
|
@@ -43,10 +49,6 @@ module Setsy
|
|
43
49
|
end
|
44
50
|
end
|
45
51
|
|
46
|
-
def [](val)
|
47
|
-
send(val.to_sym)
|
48
|
-
end
|
49
|
-
|
50
52
|
def attributes
|
51
53
|
keys = @settings.keys
|
52
54
|
keys.push(*methods.select { |m| m.to_s.starts_with?(SETTING_PREFIX) }.map { |m| m.to_s.gsub(SETTING_PREFIX, '') })
|
data/lib/setsy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: setsy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Brody
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|