dolly 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/dolly/bulk_document.rb +85 -0
- data/lib/dolly/bulk_error.rb +16 -0
- data/lib/dolly/collection.rb +15 -7
- data/lib/dolly/connection.rb +9 -0
- data/lib/dolly/document.rb +18 -6
- data/lib/dolly/interpreter.rb +5 -0
- data/lib/dolly/query.rb +7 -3
- data/lib/dolly/request.rb +7 -1
- data/lib/dolly/version.rb +1 -1
- data/test/bulk_document_test.rb +44 -0
- data/test/document_test.rb +27 -0
- data/test/dummy/log/test.log +11913 -0
- metadata +7 -19
- data/lib/dolly/representations/collection_representation.rb +0 -20
- data/lib/dolly/representations/document_representation.rb +0 -22
- data/lib/dolly/representations/tools.rb +0 -16
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dolly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- javierg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 4.0.0
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: representable
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ~>
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 1.7.0
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ~>
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 1.7.0
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: httparty
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -129,23 +115,24 @@ executables: []
|
|
129
115
|
extensions: []
|
130
116
|
extra_rdoc_files: []
|
131
117
|
files:
|
118
|
+
- lib/dolly/bulk_document.rb
|
119
|
+
- lib/dolly/bulk_error.rb
|
132
120
|
- lib/dolly/collection.rb
|
133
121
|
- lib/dolly/connection.rb
|
134
122
|
- lib/dolly/db_config.rb
|
135
123
|
- lib/dolly/document.rb
|
124
|
+
- lib/dolly/interpreter.rb
|
136
125
|
- lib/dolly/name_space.rb
|
137
126
|
- lib/dolly/property.rb
|
138
127
|
- lib/dolly/query.rb
|
139
128
|
- lib/dolly/railtie.rb
|
140
|
-
- lib/dolly/representations/collection_representation.rb
|
141
|
-
- lib/dolly/representations/document_representation.rb
|
142
|
-
- lib/dolly/representations/tools.rb
|
143
129
|
- lib/dolly/request.rb
|
144
130
|
- lib/dolly/version.rb
|
145
131
|
- lib/dolly.rb
|
146
132
|
- lib/exceptions/dolly.rb
|
147
133
|
- lib/tasks/db.rake
|
148
134
|
- Rakefile
|
135
|
+
- test/bulk_document_test.rb
|
149
136
|
- test/document_test.rb
|
150
137
|
- test/dummy/app/assets/javascripts/application.js
|
151
138
|
- test/dummy/app/assets/stylesheets/application.css
|
@@ -207,6 +194,7 @@ signing_key:
|
|
207
194
|
specification_version: 4
|
208
195
|
summary: will write something
|
209
196
|
test_files:
|
197
|
+
- test/bulk_document_test.rb
|
210
198
|
- test/document_test.rb
|
211
199
|
- test/dummy/app/assets/javascripts/application.js
|
212
200
|
- test/dummy/app/assets/stylesheets/application.css
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require 'representable/json'
|
2
|
-
require 'dolly/representations/tools'
|
3
|
-
|
4
|
-
module Dolly
|
5
|
-
module Representations
|
6
|
-
module CollectionRepresentation
|
7
|
-
include Representable::JSON
|
8
|
-
include Dolly::Representations::Tools
|
9
|
-
|
10
|
-
clean_representables
|
11
|
-
|
12
|
-
def self.config docs_class
|
13
|
-
properties = docs_class.send(:properties)
|
14
|
-
self.collection :rows, extend: DocumentRepresentation.config(properties), class: docs_class
|
15
|
-
self
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'representable/json'
|
2
|
-
require 'dolly/representations/tools'
|
3
|
-
|
4
|
-
module Dolly
|
5
|
-
module Representations
|
6
|
-
module DocumentRepresentation
|
7
|
-
include Representable::JSON
|
8
|
-
include Dolly::Representations::Tools
|
9
|
-
|
10
|
-
clean_representables
|
11
|
-
property :doc
|
12
|
-
|
13
|
-
def self.config properties
|
14
|
-
self.clean_representables
|
15
|
-
self.property :doc
|
16
|
-
properties.each {|p| self.property p.name}
|
17
|
-
self
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module Dolly
|
2
|
-
module Representations
|
3
|
-
module Tools
|
4
|
-
module ClassMethods
|
5
|
-
def clean_representables
|
6
|
-
self.instance_variable_set("@representable_attrs", nil)
|
7
|
-
self.property :rows
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
def self.included(base)
|
12
|
-
base.extend ClassMethods
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|