couchpillow 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/couchpillow.gemspec +1 -0
- data/lib/couchpillow/document.rb +10 -0
- data/lib/couchpillow/version.rb +1 -1
- data/test/{document.rb → test_document.rb} +15 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efc31e058fa2047dbc8783576c421912a9d27e2f
|
4
|
+
data.tar.gz: fd0d87f1485ec3b5419cc1063b09e3da2724a31e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40bc500b602c184c47ebfc60bed01a45ffd3c3167ef8f0b8419d4af97e6a31fe22ef372705d3bc09019cc7d6f64ba226778a7a6075fc553084be18d66542beea
|
7
|
+
data.tar.gz: a1c50b1e702d784e695794a770eeacf7daee7151182bd193f9ac58aef01d82e341096c661691a11ad7c0dd1abb8471d76a1a5ae462a2cfa0baa9f717c3ca41d9
|
data/couchpillow.gemspec
CHANGED
data/lib/couchpillow/document.rb
CHANGED
data/lib/couchpillow/version.rb
CHANGED
@@ -89,5 +89,20 @@ class TestDocument < Minitest::Test
|
|
89
89
|
d = CouchPillow::Document.new({}, "1")
|
90
90
|
assert_equal "{\"_id\":\"1\",\"created_at\":\"#{mock_time.to_s}\",\"_type\":\"default\"}", d.to_json
|
91
91
|
end
|
92
|
+
|
93
|
+
|
94
|
+
def test_brackets
|
95
|
+
d = CouchPillow::Document.new({})
|
96
|
+
d[123] = 'test'
|
97
|
+
assert_equal 'test', d[123]
|
98
|
+
|
99
|
+
d['foo'] = 'bar'
|
100
|
+
assert_equal 'bar', d[:foo]
|
101
|
+
|
102
|
+
d[:stuff] = [ 'john', 'mary' ]
|
103
|
+
assert_equal ['john', 'mary'], d[:stuff]
|
104
|
+
|
105
|
+
assert_equal nil, d[:something_else]
|
106
|
+
end
|
92
107
|
|
93
108
|
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.
|
4
|
+
version: 0.2.0
|
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-
|
11
|
+
date: 2014-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.3'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.3'
|
41
55
|
description: CouchPillow is a light and comfortable Document wrapper for Couchbase
|
42
56
|
Server.
|
43
57
|
email: nicho_tedja@yahoo.com
|
@@ -52,7 +66,7 @@ files:
|
|
52
66
|
- lib/couchpillow.rb
|
53
67
|
- lib/couchpillow/document.rb
|
54
68
|
- lib/couchpillow/version.rb
|
55
|
-
- test/
|
69
|
+
- test/test_document.rb
|
56
70
|
homepage: https://github.com/atedja/pillow
|
57
71
|
licenses:
|
58
72
|
- BSD
|