property_sets 2.2.0 → 2.2.1
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.
@@ -30,8 +30,8 @@ module PropertySets
|
|
30
30
|
|
31
31
|
property_pairs = property_keys.map do |name|
|
32
32
|
value = lookup_value(association_class.type(name), name)
|
33
|
-
[name
|
34
|
-
end.flatten
|
33
|
+
[name, value]
|
34
|
+
end.flatten(1)
|
35
35
|
HashWithIndifferentAccess[*property_pairs]
|
36
36
|
end
|
37
37
|
|
data/test/test_property_sets.rb
CHANGED
@@ -176,6 +176,12 @@ class TestPropertySets < ActiveSupport::TestCase
|
|
176
176
|
should "return a hash with values that can be fetched by string or symbol" do
|
177
177
|
assert_equal "456", @account.settings.get(["baz"]).fetch(:baz)
|
178
178
|
end
|
179
|
+
|
180
|
+
should "return serialized values" do
|
181
|
+
@account.typed_data.set(:serialized_prop => [1, 2])
|
182
|
+
assert @account.typed_data.lookup_without_default(:serialized_prop)
|
183
|
+
assert_equal({"serialized_prop" => [1, 2]}, @account.typed_data.get([:serialized_prop]))
|
184
|
+
end
|
179
185
|
end
|
180
186
|
|
181
187
|
context "#set" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: property_sets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-11-
|
12
|
+
date: 2013-11-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|