quby-mongoid 1.0.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/gemfiles/mongoid2.gemfile +1 -1
- data/gemfiles/mongoid2.gemfile.lock +23 -9
- data/gemfiles/mongoid3.gemfile +1 -1
- data/gemfiles/mongoid3.gemfile.lock +25 -11
- data/gemfiles/mongoid4.gemfile +1 -1
- data/gemfiles/mongoid4.gemfile.lock +23 -9
- data/lib/quby/answer_repos/mongoid_repo.rb +65 -64
- data/lib/quby/mongoid/version.rb +1 -1
- data/quby-mongoid.gemspec +1 -1
- data/spec/quby/answer_repos/mongoid_repo_spec.rb +2 -3
- data/spec/spec_helper.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e3bb09750b659426327ffae84535b481eb49a13
|
4
|
+
data.tar.gz: 4c65f8f1c40099a16eab9d05a91f567f94b1307c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a985a7ece19d6f02fe384280b6f6e4e3141840342f00c716af172fca460f2e424d3d313c829b7b64f23443f786895ec74c6f69fe4d73ffdf029c3cc13fc538f9
|
7
|
+
data.tar.gz: e0d2eb7b5f4b321121109458b32cc7e33cc4a9ae27b3b1a899ac59a13492ef83529538f60450dd04deff42a1af7594911ddcd236d2c28f4ab6a29194296d9a1f
|
data/Gemfile
CHANGED
@@ -4,7 +4,7 @@ source 'https://rubygems.org'
|
|
4
4
|
gemspec
|
5
5
|
|
6
6
|
# Quby is not pushed to rubygems.org, so we specify its source here explicitly.
|
7
|
-
gem 'quby', git: 'git@github.com:roqua/quby_engine.git', ref: '
|
7
|
+
gem 'quby', git: 'git@github.com:roqua/quby_engine.git', ref: 'f5675d2df1b5aa89bc353d617ed6b198203be891'
|
8
8
|
# gem 'quby', path: '../quby'
|
9
9
|
|
10
10
|
gem 'appraisal', '1.0.0.beta3'
|
data/gemfiles/mongoid2.gemfile
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
-
gem "quby", :git=>"git@github.com:roqua/quby_engine.git", :ref=>"
|
5
|
+
gem "quby", :git=>"git@github.com:roqua/quby_engine.git", :ref=>"f5675d2df1b5aa89bc353d617ed6b198203be891"
|
6
6
|
gem "appraisal", "1.0.0.beta3"
|
7
7
|
gem "mongoid", "~> 2.8"
|
8
8
|
gem "bson_ext"
|
@@ -1,9 +1,9 @@
|
|
1
1
|
GIT
|
2
2
|
remote: git@github.com:roqua/quby_engine.git
|
3
|
-
revision:
|
4
|
-
ref:
|
3
|
+
revision: f5675d2df1b5aa89bc353d617ed6b198203be891
|
4
|
+
ref: f5675d2df1b5aa89bc353d617ed6b198203be891
|
5
5
|
specs:
|
6
|
-
quby (
|
6
|
+
quby (2.0.0)
|
7
7
|
addressable
|
8
8
|
coffee-rails
|
9
9
|
compass-rails
|
@@ -11,7 +11,7 @@ GIT
|
|
11
11
|
jquery-rails (~> 2.2.1)
|
12
12
|
json
|
13
13
|
maruku (= 0.6.1)
|
14
|
-
opencpu (~> 0.
|
14
|
+
opencpu (~> 0.7.0)
|
15
15
|
rails (>= 3.2, < 5.0)
|
16
16
|
ryansch-andand
|
17
17
|
sass-rails (>= 3.2, < 5.0)
|
@@ -21,9 +21,9 @@ GIT
|
|
21
21
|
PATH
|
22
22
|
remote: .././
|
23
23
|
specs:
|
24
|
-
quby-mongoid (0.0
|
24
|
+
quby-mongoid (2.0.0)
|
25
25
|
mongoid (>= 2.2, < 5.0)
|
26
|
-
quby
|
26
|
+
quby (~> 2.0)
|
27
27
|
|
28
28
|
GEM
|
29
29
|
remote: https://rubygems.org/
|
@@ -61,6 +61,7 @@ GEM
|
|
61
61
|
rake
|
62
62
|
thor (>= 0.14.0)
|
63
63
|
arel (3.0.3)
|
64
|
+
ast (2.0.0)
|
64
65
|
axiom-types (0.1.1)
|
65
66
|
descendants_tracker (~> 0.0.4)
|
66
67
|
ice_nine (~> 0.11.0)
|
@@ -93,7 +94,7 @@ GEM
|
|
93
94
|
diff-lcs (1.2.5)
|
94
95
|
equalizer (0.0.9)
|
95
96
|
erubis (2.7.0)
|
96
|
-
execjs (2.2.
|
97
|
+
execjs (2.2.1)
|
97
98
|
fssm (0.2.10)
|
98
99
|
haml (4.0.5)
|
99
100
|
tilt
|
@@ -123,10 +124,14 @@ GEM
|
|
123
124
|
tzinfo (~> 0.3.22)
|
124
125
|
multi_json (1.10.1)
|
125
126
|
multi_xml (0.5.5)
|
126
|
-
opencpu (0.
|
127
|
-
httparty (~> 0.
|
127
|
+
opencpu (0.7.1)
|
128
|
+
httparty (~> 0.12)
|
128
129
|
yajl-ruby (~> 1.2, >= 1.2.0)
|
130
|
+
parser (2.1.9)
|
131
|
+
ast (>= 1.1, < 3.0)
|
132
|
+
slop (~> 3.4, >= 3.4.5)
|
129
133
|
polyglot (0.3.5)
|
134
|
+
powerpack (0.0.9)
|
130
135
|
pry (0.10.0)
|
131
136
|
coderay (~> 1.1.0)
|
132
137
|
method_source (~> 0.8.1)
|
@@ -153,6 +158,7 @@ GEM
|
|
153
158
|
rake (>= 0.8.7)
|
154
159
|
rdoc (~> 3.4)
|
155
160
|
thor (>= 0.14.6, < 2.0)
|
161
|
+
rainbow (2.0.0)
|
156
162
|
rake (10.3.2)
|
157
163
|
rdoc (3.12.2)
|
158
164
|
json (~> 1.4)
|
@@ -164,6 +170,13 @@ GEM
|
|
164
170
|
rspec-expectations (2.14.5)
|
165
171
|
diff-lcs (>= 1.1.3, < 2.0)
|
166
172
|
rspec-mocks (2.14.6)
|
173
|
+
rubocop (0.19.1)
|
174
|
+
json (>= 1.7.7, < 2)
|
175
|
+
parser (~> 2.1.7)
|
176
|
+
powerpack (~> 0.0.6)
|
177
|
+
rainbow (>= 1.99.1, < 3.0)
|
178
|
+
ruby-progressbar (~> 1.4)
|
179
|
+
ruby-progressbar (1.5.1)
|
167
180
|
ryansch-andand (1.3.2)
|
168
181
|
sass (3.2.19)
|
169
182
|
sass-rails (3.2.6)
|
@@ -208,3 +221,4 @@ DEPENDENCIES
|
|
208
221
|
quby-mongoid!
|
209
222
|
rake
|
210
223
|
rspec (~> 2.14.0)
|
224
|
+
rubocop (~> 0.19.0)
|
data/gemfiles/mongoid3.gemfile
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
-
gem "quby", :git=>"git@github.com:roqua/quby_engine.git", :ref=>"
|
5
|
+
gem "quby", :git=>"git@github.com:roqua/quby_engine.git", :ref=>"f5675d2df1b5aa89bc353d617ed6b198203be891"
|
6
6
|
gem "appraisal", "1.0.0.beta3"
|
7
7
|
gem "mongoid", "~> 3.0"
|
8
8
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
GIT
|
2
2
|
remote: git@github.com:roqua/quby_engine.git
|
3
|
-
revision:
|
4
|
-
ref:
|
3
|
+
revision: f5675d2df1b5aa89bc353d617ed6b198203be891
|
4
|
+
ref: f5675d2df1b5aa89bc353d617ed6b198203be891
|
5
5
|
specs:
|
6
|
-
quby (
|
6
|
+
quby (2.0.0)
|
7
7
|
addressable
|
8
8
|
coffee-rails
|
9
9
|
compass-rails
|
@@ -11,7 +11,7 @@ GIT
|
|
11
11
|
jquery-rails (~> 2.2.1)
|
12
12
|
json
|
13
13
|
maruku (= 0.6.1)
|
14
|
-
opencpu (~> 0.
|
14
|
+
opencpu (~> 0.7.0)
|
15
15
|
rails (>= 3.2, < 5.0)
|
16
16
|
ryansch-andand
|
17
17
|
sass-rails (>= 3.2, < 5.0)
|
@@ -21,9 +21,9 @@ GIT
|
|
21
21
|
PATH
|
22
22
|
remote: .././
|
23
23
|
specs:
|
24
|
-
quby-mongoid (0.0
|
24
|
+
quby-mongoid (2.0.0)
|
25
25
|
mongoid (>= 2.2, < 5.0)
|
26
|
-
quby
|
26
|
+
quby (~> 2.0)
|
27
27
|
|
28
28
|
GEM
|
29
29
|
remote: https://rubygems.org/
|
@@ -61,6 +61,7 @@ GEM
|
|
61
61
|
rake
|
62
62
|
thor (>= 0.14.0)
|
63
63
|
arel (3.0.3)
|
64
|
+
ast (2.0.0)
|
64
65
|
axiom-types (0.1.1)
|
65
66
|
descendants_tracker (~> 0.0.4)
|
66
67
|
ice_nine (~> 0.11.0)
|
@@ -70,9 +71,9 @@ GEM
|
|
70
71
|
coderay (1.1.0)
|
71
72
|
coercible (1.0.0)
|
72
73
|
descendants_tracker (~> 0.0.1)
|
73
|
-
coffee-rails (3.2.
|
74
|
+
coffee-rails (3.2.2)
|
74
75
|
coffee-script (>= 2.2.0)
|
75
|
-
railties (~> 3.2.0
|
76
|
+
railties (~> 3.2.0)
|
76
77
|
coffee-script (2.2.0)
|
77
78
|
coffee-script-source
|
78
79
|
execjs
|
@@ -90,7 +91,7 @@ GEM
|
|
90
91
|
diff-lcs (1.2.5)
|
91
92
|
equalizer (0.0.9)
|
92
93
|
erubis (2.7.0)
|
93
|
-
execjs (2.2.
|
94
|
+
execjs (2.2.1)
|
94
95
|
fssm (0.2.10)
|
95
96
|
haml (4.0.5)
|
96
97
|
tilt
|
@@ -120,11 +121,15 @@ GEM
|
|
120
121
|
moped (1.5.2)
|
121
122
|
multi_json (1.10.1)
|
122
123
|
multi_xml (0.5.5)
|
123
|
-
opencpu (0.
|
124
|
-
httparty (~> 0.
|
124
|
+
opencpu (0.7.1)
|
125
|
+
httparty (~> 0.12)
|
125
126
|
yajl-ruby (~> 1.2, >= 1.2.0)
|
126
127
|
origin (1.1.0)
|
128
|
+
parser (2.1.9)
|
129
|
+
ast (>= 1.1, < 3.0)
|
130
|
+
slop (~> 3.4, >= 3.4.5)
|
127
131
|
polyglot (0.3.5)
|
132
|
+
powerpack (0.0.9)
|
128
133
|
pry (0.10.0)
|
129
134
|
coderay (~> 1.1.0)
|
130
135
|
method_source (~> 0.8.1)
|
@@ -151,6 +156,7 @@ GEM
|
|
151
156
|
rake (>= 0.8.7)
|
152
157
|
rdoc (~> 3.4)
|
153
158
|
thor (>= 0.14.6, < 2.0)
|
159
|
+
rainbow (2.0.0)
|
154
160
|
rake (10.3.2)
|
155
161
|
rdoc (3.12.2)
|
156
162
|
json (~> 1.4)
|
@@ -162,6 +168,13 @@ GEM
|
|
162
168
|
rspec-expectations (2.14.5)
|
163
169
|
diff-lcs (>= 1.1.3, < 2.0)
|
164
170
|
rspec-mocks (2.14.6)
|
171
|
+
rubocop (0.19.1)
|
172
|
+
json (>= 1.7.7, < 2)
|
173
|
+
parser (~> 2.1.7)
|
174
|
+
powerpack (~> 0.0.6)
|
175
|
+
rainbow (>= 1.99.1, < 3.0)
|
176
|
+
ruby-progressbar (~> 1.4)
|
177
|
+
ruby-progressbar (1.5.1)
|
165
178
|
ryansch-andand (1.3.2)
|
166
179
|
sass (3.2.19)
|
167
180
|
sass-rails (3.2.6)
|
@@ -205,3 +218,4 @@ DEPENDENCIES
|
|
205
218
|
quby-mongoid!
|
206
219
|
rake
|
207
220
|
rspec (~> 2.14.0)
|
221
|
+
rubocop (~> 0.19.0)
|
data/gemfiles/mongoid4.gemfile
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
-
gem "quby", :git=>"git@github.com:roqua/quby_engine.git", :ref=>"
|
5
|
+
gem "quby", :git=>"git@github.com:roqua/quby_engine.git", :ref=>"f5675d2df1b5aa89bc353d617ed6b198203be891"
|
6
6
|
gem "appraisal", "1.0.0.beta3"
|
7
7
|
gem "mongoid", "~> 4.0.0.beta1"
|
8
8
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
GIT
|
2
2
|
remote: git@github.com:roqua/quby_engine.git
|
3
|
-
revision:
|
4
|
-
ref:
|
3
|
+
revision: f5675d2df1b5aa89bc353d617ed6b198203be891
|
4
|
+
ref: f5675d2df1b5aa89bc353d617ed6b198203be891
|
5
5
|
specs:
|
6
|
-
quby (
|
6
|
+
quby (2.0.0)
|
7
7
|
addressable
|
8
8
|
coffee-rails
|
9
9
|
compass-rails
|
@@ -11,7 +11,7 @@ GIT
|
|
11
11
|
jquery-rails (~> 2.2.1)
|
12
12
|
json
|
13
13
|
maruku (= 0.6.1)
|
14
|
-
opencpu (~> 0.
|
14
|
+
opencpu (~> 0.7.0)
|
15
15
|
rails (>= 3.2, < 5.0)
|
16
16
|
ryansch-andand
|
17
17
|
sass-rails (>= 3.2, < 5.0)
|
@@ -21,9 +21,9 @@ GIT
|
|
21
21
|
PATH
|
22
22
|
remote: .././
|
23
23
|
specs:
|
24
|
-
quby-mongoid (0.0
|
24
|
+
quby-mongoid (2.0.0)
|
25
25
|
mongoid (>= 2.2, < 5.0)
|
26
|
-
quby
|
26
|
+
quby (~> 2.0)
|
27
27
|
|
28
28
|
GEM
|
29
29
|
remote: https://rubygems.org/
|
@@ -60,6 +60,7 @@ GEM
|
|
60
60
|
rake
|
61
61
|
thor (>= 0.14.0)
|
62
62
|
arel (5.0.1.20140414130214)
|
63
|
+
ast (2.0.0)
|
63
64
|
axiom-types (0.1.1)
|
64
65
|
descendants_tracker (~> 0.0.4)
|
65
66
|
ice_nine (~> 0.11.0)
|
@@ -91,7 +92,7 @@ GEM
|
|
91
92
|
diff-lcs (1.2.5)
|
92
93
|
equalizer (0.0.9)
|
93
94
|
erubis (2.7.0)
|
94
|
-
execjs (2.2.
|
95
|
+
execjs (2.2.1)
|
95
96
|
fssm (0.2.10)
|
96
97
|
haml (4.0.5)
|
97
98
|
tilt
|
@@ -124,12 +125,16 @@ GEM
|
|
124
125
|
optionable (~> 0.2.0)
|
125
126
|
multi_json (1.10.1)
|
126
127
|
multi_xml (0.5.5)
|
127
|
-
opencpu (0.
|
128
|
-
httparty (~> 0.
|
128
|
+
opencpu (0.7.1)
|
129
|
+
httparty (~> 0.12)
|
129
130
|
yajl-ruby (~> 1.2, >= 1.2.0)
|
130
131
|
optionable (0.2.0)
|
131
132
|
origin (2.1.1)
|
133
|
+
parser (2.1.9)
|
134
|
+
ast (>= 1.1, < 3.0)
|
135
|
+
slop (~> 3.4, >= 3.4.5)
|
132
136
|
polyglot (0.3.5)
|
137
|
+
powerpack (0.0.9)
|
133
138
|
pry (0.10.0)
|
134
139
|
coderay (~> 1.1.0)
|
135
140
|
method_source (~> 0.8.1)
|
@@ -152,6 +157,7 @@ GEM
|
|
152
157
|
activesupport (= 4.1.1)
|
153
158
|
rake (>= 0.8.7)
|
154
159
|
thor (>= 0.18.1, < 2.0)
|
160
|
+
rainbow (2.0.0)
|
155
161
|
rake (10.3.2)
|
156
162
|
rspec (2.14.1)
|
157
163
|
rspec-core (~> 2.14.0)
|
@@ -161,6 +167,13 @@ GEM
|
|
161
167
|
rspec-expectations (2.14.5)
|
162
168
|
diff-lcs (>= 1.1.3, < 2.0)
|
163
169
|
rspec-mocks (2.14.6)
|
170
|
+
rubocop (0.19.1)
|
171
|
+
json (>= 1.7.7, < 2)
|
172
|
+
parser (~> 2.1.7)
|
173
|
+
powerpack (~> 0.0.6)
|
174
|
+
rainbow (>= 1.99.1, < 3.0)
|
175
|
+
ruby-progressbar (~> 1.4)
|
176
|
+
ruby-progressbar (1.5.1)
|
164
177
|
ryansch-andand (1.3.2)
|
165
178
|
sass (3.2.19)
|
166
179
|
sass-rails (4.0.3)
|
@@ -210,3 +223,4 @@ DEPENDENCIES
|
|
210
223
|
quby-mongoid!
|
211
224
|
rake
|
212
225
|
rspec (~> 2.14.0)
|
226
|
+
rubocop (~> 0.19.0)
|
@@ -1,81 +1,82 @@
|
|
1
1
|
require 'quby'
|
2
|
-
require 'quby/answer_repos'
|
3
2
|
require 'mongoid'
|
4
3
|
|
5
4
|
module Quby
|
6
|
-
module
|
7
|
-
|
8
|
-
class
|
9
|
-
|
10
|
-
|
5
|
+
module Answers
|
6
|
+
module Repos
|
7
|
+
class MongoidRepo < Base
|
8
|
+
class Record
|
9
|
+
include ::Mongoid::Document
|
10
|
+
include ::Mongoid::Timestamps
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
12
|
+
if ::Mongoid::VERSION > '4'
|
13
|
+
store_in collection: :answers
|
14
|
+
field :_id, type: String,
|
15
|
+
pre_processed: true,
|
16
|
+
default: -> { BSON::ObjectId.new.to_s }
|
17
|
+
elsif ::Mongoid::VERSION > '3'
|
18
|
+
store_in collection: :answers
|
19
|
+
field :_id, type: String,
|
20
|
+
pre_processed: true,
|
21
|
+
default: -> { Moped::BSON::ObjectId.new.to_s }
|
22
|
+
else
|
23
|
+
store_in 'answers'
|
24
|
+
identity type: String
|
25
|
+
end
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
27
|
+
field :questionnaire_id, type: Integer
|
28
|
+
field :questionnaire_key, type: String
|
29
|
+
field :raw_params, type: Hash
|
30
|
+
field :value, type: Hash
|
31
|
+
field :import_notes, type: Hash
|
32
|
+
field :patient, type: Hash, default: {}
|
33
|
+
field :token, type: String
|
34
|
+
field :active, type: Boolean, default: true
|
35
|
+
field :test, type: Boolean, default: false
|
36
|
+
field :completed_at, type: Time
|
37
|
+
field :outcome_generated_at, type: Time
|
38
|
+
field :scores, type: Hash, default: {}
|
39
|
+
field :actions, type: Hash, default: {}
|
40
|
+
field :completion, type: Hash, default: {}
|
41
|
+
field :dsl_last_update, type: Time
|
42
|
+
end
|
43
43
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
44
|
+
def find_completed_after(time, answer_ids)
|
45
|
+
records = Record.any_in(_id: answer_ids).where(:completed_at.gt => time)
|
46
|
+
records.map { |record| entity(record) }
|
47
|
+
end
|
48
48
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
49
|
+
def update!(answer)
|
50
|
+
record = find_record(answer.id)
|
51
|
+
# MongoDB won't save new hash order if we don't clear it first.
|
52
|
+
record.update_attributes!(scores: {}, actions: {}, completion: {})
|
53
|
+
update_attributes(record, answer)
|
54
|
+
store_record(record)
|
55
|
+
end
|
56
56
|
|
57
|
-
|
57
|
+
private
|
58
58
|
|
59
|
-
|
60
|
-
|
61
|
-
|
59
|
+
def all_records(questionnaire_key)
|
60
|
+
Record.where(questionnaire_key: questionnaire_key).all.to_a
|
61
|
+
end
|
62
62
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
63
|
+
def find_record(id)
|
64
|
+
Record.find(id)
|
65
|
+
rescue ::Mongoid::Errors::DocumentNotFound, ::Mongoid::Errors::InvalidFind
|
66
|
+
raise AnswerNotFound, "Answer #{id.inspect} could not be found."
|
67
|
+
end
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
69
|
+
def build_record
|
70
|
+
Record.new
|
71
|
+
end
|
72
72
|
|
73
|
-
|
74
|
-
|
75
|
-
|
73
|
+
def store_record(record)
|
74
|
+
record.save!
|
75
|
+
end
|
76
76
|
|
77
|
-
|
78
|
-
|
77
|
+
def entity(record)
|
78
|
+
entity_class.new(record.attributes).tap(&:enhance_by_dsl)
|
79
|
+
end
|
79
80
|
end
|
80
81
|
end
|
81
82
|
end
|
data/lib/quby/mongoid/version.rb
CHANGED
data/quby-mongoid.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency 'quby', '~>
|
21
|
+
spec.add_dependency 'quby', '~> 2.0'
|
22
22
|
spec.add_dependency "mongoid", ">= 2.2", '< 5.0'
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.6"
|
@@ -1,8 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
require 'quby/
|
3
|
-
require 'quby/api/specs/answers_api_specs'
|
2
|
+
require 'quby/answers/specs'
|
4
3
|
|
5
|
-
describe Quby::
|
4
|
+
describe Quby::Answers::Repos::MongoidRepo do
|
6
5
|
it_behaves_like 'an answer repository'
|
7
6
|
it_behaves_like 'a valid backend for the answers api'
|
8
7
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -4,7 +4,7 @@ ENV["MONGOID_ENV"] = "test"
|
|
4
4
|
|
5
5
|
require 'quby/mongoid'
|
6
6
|
Quby.questionnaires_path = Quby.fixtures_path
|
7
|
-
Quby.answer_repo = Quby::
|
7
|
+
Quby.answer_repo = Quby::Answers::Repos::MongoidRepo.new
|
8
8
|
|
9
9
|
require 'mongoid'
|
10
10
|
if ::Mongoid::VERSION > '4'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quby-mongoid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marten Veldthuis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: quby
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mongoid
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|