couchpillow 0.3.2 → 0.3.3

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: 7c93d7c0acb54101fe48e8930f655bc6948b5d5f
4
- data.tar.gz: 18d41a51d3650b7ab9a5ddf33290abe14be64f49
3
+ metadata.gz: 5528117c461394f549f525f4d587ba6353251934
4
+ data.tar.gz: d87079aab16ef5ebfedcf98371d747493d54e6f6
5
5
  SHA512:
6
- metadata.gz: 63f52208da7e69ac70c4dcc3e75c38d6881c63eb38685928d6c155623b41b0925502a836bcfba9fbdc1506db3e3255d54e2f44a3beb1d195f47e7848394925fc
7
- data.tar.gz: bc746e9725f42e0af9f8b9356c44cfd1d3ff2a63dfe0363cd196ac0f2346afef7347bd76fea42fa12c1be4672bcd52640d4569544c50af114a16d8f7a01a0c84
6
+ metadata.gz: 660b03268c7185f55b5acc33f5acee91422a07e83c8bbd835cd299ee2a9749440a7fc3016171d446dbe96290627b10d951143f504faa09b92f29a8cf8cf6258a
7
+ data.tar.gz: 53fd3d0be6683e26edbaf8581adfca520048c1660bcac6c1ec74f692cfed4376c27be6dc3c5f719e4dae6faee7acb833e60f9f0e33d8dee363807d486446c846
data/README.markdown CHANGED
@@ -46,7 +46,7 @@ long as they `respond_to?` the `set`, `delete`, `replace`, and `get` methods.
46
46
  Retrieving Documents:
47
47
 
48
48
  doc = CouchPillow::Document.get('123')
49
- doc.stuff # '123'
49
+ doc.stuff # 'hello'
50
50
 
51
51
 
52
52
  Overriding `CouchPillow::Document`:
@@ -130,7 +130,9 @@ module CouchPillow
130
130
 
131
131
 
132
132
  def self.get id
133
- new(CouchPillow.db.get(id), id)
133
+ result = CouchPillow.db.get(id) and
134
+ new(result, id) or
135
+ result
134
136
  end
135
137
 
136
138
 
@@ -1,5 +1,5 @@
1
1
  module CouchPillow
2
2
  GEM_NAME = "couchpillow"
3
3
  NAME = "CouchPillow"
4
- VERSION = "0.3.2"
4
+ VERSION = "0.3.3"
5
5
  end
@@ -155,4 +155,11 @@ class TestDocument < Minitest::Test
155
155
  end
156
156
  end
157
157
 
158
+
159
+ def test_get_returns_nil
160
+ CouchPillow.db.expects(:get).with('123').returns(nil)
161
+ d = Document.get('123')
162
+ assert_equal nil, d
163
+ end
164
+
158
165
  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.2
4
+ version: 0.3.3
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-07 00:00:00.000000000 Z
11
+ date: 2014-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest