couchdb-client 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/couchdb/client/version.rb +1 -1
- data/lib/couchdb/database.rb +1 -1
- data/lib/couchdb/errors.rb +1 -1
- data/lib/couchdb/json_object.rb +9 -3
- data/lib/couchdb/model.rb +4 -0
- metadata +44 -64
data/lib/couchdb/database.rb
CHANGED
data/lib/couchdb/errors.rb
CHANGED
data/lib/couchdb/json_object.rb
CHANGED
@@ -136,13 +136,19 @@ module CouchDB
|
|
136
136
|
errors.clear
|
137
137
|
|
138
138
|
properties.each { |k, property|
|
139
|
-
|
139
|
+
v = self[k]
|
140
|
+
|
141
|
+
if property.required? and v.nil?
|
140
142
|
errors[k] = MissingProperty.new(k)
|
141
143
|
next
|
142
144
|
end
|
143
145
|
|
144
|
-
if not property.valid_value?(
|
145
|
-
errors[k] = InvalidValue.new(k,
|
146
|
+
if not property.valid_value?(v)
|
147
|
+
errors[k] = InvalidValue.new(k, v)
|
148
|
+
end
|
149
|
+
|
150
|
+
if v.is_a?(JSONObject) and not v.valid?
|
151
|
+
errors[k] = InvalidObject.new(v)
|
146
152
|
end
|
147
153
|
}
|
148
154
|
end
|
data/lib/couchdb/model.rb
CHANGED
metadata
CHANGED
@@ -1,65 +1,55 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: couchdb-client
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
- 0
|
10
|
-
version: 1.0.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Gimi Liang
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-09-17 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
22
15
|
name: json
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
18
|
+
requirements:
|
27
19
|
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 1
|
30
|
-
segments:
|
31
|
-
- 1
|
32
|
-
- 7
|
33
|
-
- 5
|
20
|
+
- !ruby/object:Gem::Version
|
34
21
|
version: 1.7.5
|
35
22
|
type: :runtime
|
36
|
-
version_requirements: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: httparty
|
39
23
|
prerelease: false
|
40
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.7.5
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: httparty
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
41
33
|
none: false
|
42
|
-
requirements:
|
34
|
+
requirements:
|
43
35
|
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
hash: 57
|
46
|
-
segments:
|
47
|
-
- 0
|
48
|
-
- 8
|
49
|
-
- 3
|
36
|
+
- !ruby/object:Gem::Version
|
50
37
|
version: 0.8.3
|
51
38
|
type: :runtime
|
52
|
-
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.8.3
|
53
46
|
description: A pure Ruby CouchDB client.
|
54
|
-
email:
|
47
|
+
email:
|
55
48
|
- liang.gimi@gmail.com
|
56
49
|
executables: []
|
57
|
-
|
58
50
|
extensions: []
|
59
|
-
|
60
51
|
extra_rdoc_files: []
|
61
|
-
|
62
|
-
files:
|
52
|
+
files:
|
63
53
|
- .gitignore
|
64
54
|
- Gemfile
|
65
55
|
- LICENSE
|
@@ -81,41 +71,31 @@ files:
|
|
81
71
|
- test/model_test.rb
|
82
72
|
- test/test_all.rb
|
83
73
|
- test/test_helper.rb
|
84
|
-
|
85
|
-
homepage: ""
|
74
|
+
homepage: ''
|
86
75
|
licenses: []
|
87
|
-
|
88
76
|
post_install_message:
|
89
77
|
rdoc_options: []
|
90
|
-
|
91
|
-
require_paths:
|
78
|
+
require_paths:
|
92
79
|
- lib
|
93
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
94
81
|
none: false
|
95
|
-
requirements:
|
96
|
-
- -
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
|
99
|
-
|
100
|
-
- 0
|
101
|
-
version: "0"
|
102
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
87
|
none: false
|
104
|
-
requirements:
|
105
|
-
- -
|
106
|
-
- !ruby/object:Gem::Version
|
107
|
-
|
108
|
-
segments:
|
109
|
-
- 0
|
110
|
-
version: "0"
|
88
|
+
requirements:
|
89
|
+
- - ! '>='
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
111
92
|
requirements: []
|
112
|
-
|
113
93
|
rubyforge_project:
|
114
|
-
rubygems_version: 1.
|
94
|
+
rubygems_version: 1.8.24
|
115
95
|
signing_key:
|
116
96
|
specification_version: 3
|
117
97
|
summary: A pure Ruby CouchDB client.
|
118
|
-
test_files:
|
98
|
+
test_files:
|
119
99
|
- test/client_test.rb
|
120
100
|
- test/database_test.rb
|
121
101
|
- test/json_object_test.rb
|