property_sets 2.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.to_s, value]
34
- end.flatten
33
+ [name, value]
34
+ end.flatten(1)
35
35
  HashWithIndifferentAccess[*property_pairs]
36
36
  end
37
37
 
@@ -1,3 +1,3 @@
1
1
  module PropertySets
2
- VERSION = "2.2.0"
2
+ VERSION = "2.2.1"
3
3
  end
@@ -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.0
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-20 00:00:00.000000000 Z
12
+ date: 2013-11-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport