redis_object 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/redis_object/types/array.rb +1 -1
- data/lib/redis_object/types/float.rb +1 -1
- data/lib/redis_object/types/json.rb +1 -1
- data/lib/redis_object/types/number.rb +2 -2
- data/lib/redis_object/version.rb +1 -1
- data/spec/types_spec.rb +10 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OGRkODFlNTE1NmI1NDI0Njc0MjQxMzlmNTFiOTA0MGViZWMzYWNjMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDdhZDJiZmZkYWZjNzg2ZmIxOGY0NDFjNjRkY2RkOTIzMDZhYTQwOA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzE0YWQxNjYxNjM4YjExNTAwNjZiMzM5OTliNzkyYTljYTRjYjAzMTMyOTg3
|
10
|
+
M2JkOTBlMThhZGVjNDM5ZjA5NjFmMWY1NTkzMDAyNTkxMzFhYzJmNjhhNGJk
|
11
|
+
YTk3Yjk1YzY0MzRiMWRmOTQ5ZDdjMGVmMThkNmMwMmI1Nzk5NzE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzRhNjY2MjEzYzQ3MjY5OTAxYzcxYjU1MzA5ZmQ4ZGVkNTRlMGU0ZTgxOWIy
|
14
|
+
ZGY5NWNlZTQxNGJhYzFlZTkwYmE2ZTU0MGExYWU4ZDFjODdmYjI1ZGVjYzYx
|
15
|
+
YzU1NzdhYTI2NzA1MDNkNTZkYTIzMDFiMGU5YTQ2ODc0ZDRhZTE=
|
data/lib/redis_object/version.rb
CHANGED
data/spec/types_spec.rb
CHANGED
@@ -16,9 +16,9 @@ module TypeSpec
|
|
16
16
|
TestData = TestValues.inject({}){|acc,(k,v)| acc["a_#{k}".to_sym] = v; acc }
|
17
17
|
|
18
18
|
class TypedObject < RedisObject
|
19
|
-
json :another_json
|
20
19
|
TestValues.keys.each do |type|
|
21
20
|
send(type.to_sym,"a_#{type}".to_sym)
|
21
|
+
send(type.to_sym,"another_#{type}".to_sym)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -90,11 +90,19 @@ module TypeSpec
|
|
90
90
|
|
91
91
|
end
|
92
92
|
|
93
|
-
it "can get unset
|
93
|
+
it "can get unset typed fields" do
|
94
94
|
|
95
95
|
obj = TypedObject.new
|
96
96
|
|
97
97
|
obj.another_json.should eq(nil)
|
98
|
+
obj.another_array.should be_a(Array)
|
99
|
+
obj.another_array.size.should eq(0)
|
100
|
+
obj.another_date.should eq(nil)
|
101
|
+
obj.another_int.should eq(nil)
|
102
|
+
obj.another_number.should eq(nil)
|
103
|
+
obj.another_float.should eq(nil)
|
104
|
+
obj.another_bool.should eq(false)
|
105
|
+
obj.another_boolean.should eq(false)
|
98
106
|
|
99
107
|
end
|
100
108
|
|