couchpillow 0.3.5 → 0.3.6

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: b2614e99910f981ea4d7b668aabd7f51625cd68e
4
- data.tar.gz: 5c3c4fc42eca72811689535f8abb12e3e595735e
3
+ metadata.gz: 21f0b849af1755218e29ca407bff811b318741a2
4
+ data.tar.gz: 097bf457abfa7bb1b361f7350441be8e2cafe48b
5
5
  SHA512:
6
- metadata.gz: 3cf55601b3f2ed16a9db97fd4e10e049b950b68cb51789829c339f5fc6b7d814b4bf8c7f5c01bd8cfa58bef11c7ead8fc57e598d66b32ac5b3b63faac9255e9b
7
- data.tar.gz: fb1816d27e21fe0540f15635ae97f86befe5b05eb2d1918837c2602b816162b704f710a269511f8720035b5df458e22e08ae2c6d48b520741f1b45debb96320b
6
+ metadata.gz: 1544ce8e28dcee47798cf60a5be7de8b36601d6d0318a3babd7ae692f84d9333d6996519ddd436c012a38ea176274064eb563935705c9b4a93cff8afe2d6304e
7
+ data.tar.gz: 5ed40eb94d090f10ffd4996b350c274eb2e02f1992aec5060fcd25b433c58c6209c74fc4cb7e4042832bd4380fd3bc95e137fa17fe0ba26ee55779cd9ffad718
data/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  *.gem
2
2
  *.swp
3
+ tags
@@ -108,8 +108,12 @@ module CouchPillow
108
108
 
109
109
 
110
110
  def to_json *a
111
- h = { :_id => @id }.merge!(@data)
112
- h.to_json(*a)
111
+ to_hash.to_json(*a)
112
+ end
113
+
114
+
115
+ def to_hash
116
+ { :_id => @id }.merge!(@data)
113
117
  end
114
118
 
115
119
 
@@ -1,5 +1,5 @@
1
1
  module CouchPillow
2
2
  GEM_NAME = "couchpillow"
3
3
  NAME = "CouchPillow"
4
- VERSION = "0.3.5"
4
+ VERSION = "0.3.6"
5
5
  end
@@ -188,6 +188,13 @@ class TestDocument < Minitest::Test
188
188
  d = Document.new({}, "1")
189
189
  assert_equal "{\"_id\":\"1\",\"created_at\":\"#{mock_time.to_s}\",\"_type\":\"default\"}", d.to_json
190
190
  end
191
+
192
+
193
+ def test_to_hash
194
+ mock_time
195
+ d = Document.new({}, "1")
196
+ assert_equal({ :_id => "1", :created_at => mock_time, :_type => "default" }, d.to_hash)
197
+ end
191
198
 
192
199
 
193
200
  def test_brackets
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.5
4
+ version: 0.3.6
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-08-11 00:00:00.000000000 Z
11
+ date: 2014-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest