couchpillow 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d63d2c4df367a2e6437afd6fc0098a19cee672fc
4
- data.tar.gz: 525b36cfe68b71d73154572cbc172a78d87dd98a
3
+ metadata.gz: b2614e99910f981ea4d7b668aabd7f51625cd68e
4
+ data.tar.gz: 5c3c4fc42eca72811689535f8abb12e3e595735e
5
5
  SHA512:
6
- metadata.gz: e4a0d12cb5ea95f34b04d1c007ba2a1a6d8b12ddc487f1d1a3f798adbf9b29fff6614ff67ada756e8dda58b769ca5a1bbe4c7da1bca4a7327465266d4ce0358a
7
- data.tar.gz: 205392e541c91358338d3b617c21869ea3a41b1407353dcb430389bd1141ac0d6f8851b607426eaf14f0c80001671029e7d87f505c26d2f8a187295f775dbce6
6
+ metadata.gz: 3cf55601b3f2ed16a9db97fd4e10e049b950b68cb51789829c339f5fc6b7d814b4bf8c7f5c01bd8cfa58bef11c7ead8fc57e598d66b32ac5b3b63faac9255e9b
7
+ data.tar.gz: fb1816d27e21fe0540f15635ae97f86befe5b05eb2d1918837c2602b816162b704f710a269511f8720035b5df458e22e08ae2c6d48b520741f1b45debb96320b
@@ -54,9 +54,7 @@ module CouchPillow
54
54
  ms.gsub!('=', '')
55
55
  @data[ms.to_sym] = args[0]
56
56
  else
57
- @data.has_key?(m) and
58
- @data[m] or
59
- super
57
+ @data[m] if @data.has_key?(m) or super
60
58
  end
61
59
  end
62
60
 
@@ -1,5 +1,5 @@
1
1
  module CouchPillow
2
2
  GEM_NAME = "couchpillow"
3
3
  NAME = "CouchPillow"
4
- VERSION = "0.3.4"
4
+ VERSION = "0.3.5"
5
5
  end
@@ -136,11 +136,11 @@ class TestDocument < Minitest::Test
136
136
  CouchPillow.db.
137
137
  expects(:get).
138
138
  with('123').
139
- returns( { '_type' => 'test', 'abc' => [1, 2, 3] } )
139
+ returns( { '_type' => 'test', 'abc' => 1 } )
140
140
 
141
141
  d = klass.get('123')
142
142
  assert d
143
- assert_equal [1, 2, 3], d.abc
143
+ assert_equal [1], d.abc
144
144
  end
145
145
 
146
146
 
@@ -265,4 +265,16 @@ class TestDocument < Minitest::Test
265
265
  assert_equal nil, d
266
266
  end
267
267
 
268
+
269
+ def test_key_with_false_values
270
+ d = Document.new({ :key => false }, "1")
271
+ assert_equal false, d.key
272
+ end
273
+
274
+
275
+ def test_key_with_nil_values
276
+ d = Document.new({ :key => nil }, "1")
277
+ assert_equal nil, d.key
278
+ end
279
+
268
280
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: couchpillow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Albert Tedja
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-22 00:00:00.000000000 Z
11
+ date: 2014-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest