qwester 0.1.3 → 0.1.4
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.
- data/lib/active_admin/admin/rule_sets.rb +43 -37
- data/lib/qwester/version.rb +9 -6
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +520 -0
- data/test/dummy/log/test.log +4833 -0
- metadata +4 -4
@@ -165,52 +165,58 @@ EOF
|
|
165
165
|
para qwester_rule_set.rule
|
166
166
|
end
|
167
167
|
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
168
|
+
begin
|
169
|
+
if qwester_rule_set.matching_answer_sets.present?
|
170
|
+
div do
|
171
|
+
h3 'Sample matching answer sets'
|
172
|
+
if qwester_rule_set.matching_answer_sets.length
|
173
|
+
para "There are at least #{qwester_rule_set.matching_answer_sets.length} combinations of answers that would pass this test."
|
174
|
+
end
|
175
|
+
para 'The following combinations of answers would pass'
|
176
|
+
qwester_rule_set.matching_answer_sets.each do |answer_set|
|
177
|
+
ul :style => 'border:#CCCCCC 1px solid;padding:5px;list-style:none;' do
|
178
|
+
answer_set.each do |answer_id|
|
179
|
+
next unless Answer.exists?(answer_id)
|
180
|
+
answer = Answer.find(answer_id)
|
181
|
+
question_summary = [answer.value, answer.question.title].join(' : ')
|
182
|
+
li "(a#{answer_id}) #{question_summary}"
|
183
|
+
end
|
182
184
|
end
|
183
185
|
end
|
184
186
|
end
|
187
|
+
else
|
188
|
+
div do
|
189
|
+
h3 'Matching answer sets'
|
190
|
+
para 'Answers will pass unless they contain a blocking answer set'
|
191
|
+
end
|
185
192
|
end
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
answer_set.each do |answer_id|
|
200
|
-
next unless Answer.exists?(answer_id)
|
201
|
-
answer = Answer.find(answer_id)
|
202
|
-
question_summary = [answer.value, answer.question.title].join(' : ')
|
203
|
-
li "(a#{answer_id}) #{question_summary}"
|
193
|
+
|
194
|
+
if qwester_rule_set.blocking_answer_sets.present?
|
195
|
+
div do
|
196
|
+
h3 'Sample blocking answer sets'
|
197
|
+
para 'The following combinations of answers would not pass'
|
198
|
+
qwester_rule_set.blocking_answer_sets.each do |answer_set|
|
199
|
+
ul :style => 'border:#CCCCCC 1px solid;padding:5px;list-style:none;' do
|
200
|
+
answer_set.each do |answer_id|
|
201
|
+
next unless Answer.exists?(answer_id)
|
202
|
+
answer = Answer.find(answer_id)
|
203
|
+
question_summary = [answer.value, answer.question.title].join(' : ')
|
204
|
+
li "(a#{answer_id}) #{question_summary}"
|
205
|
+
end
|
204
206
|
end
|
205
207
|
end
|
206
208
|
end
|
209
|
+
else
|
210
|
+
div do
|
211
|
+
h3 'Blocking answer sets'
|
212
|
+
para 'Answers will only pass if they contain a matching answer set'
|
213
|
+
end
|
207
214
|
end
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
para 'Answers will only pass if they contain a matching answer set'
|
212
|
-
end
|
215
|
+
rescue ArrayLogic::UnableToDetermineCombinationsError => e
|
216
|
+
h3 'Sample combinations'
|
217
|
+
para e.message
|
213
218
|
end
|
219
|
+
|
214
220
|
|
215
221
|
end
|
216
222
|
|
data/lib/qwester/version.rb
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
module Qwester
|
2
|
-
VERSION = "0.1.
|
2
|
+
VERSION = "0.1.4"
|
3
3
|
end
|
4
4
|
|
5
5
|
# History
|
6
6
|
# =======
|
7
7
|
#
|
8
|
+
# 0.1.4 - Bug fix update
|
9
|
+
# Rescues exception in admin_rules_sets#show due to rule including a function
|
10
|
+
#
|
8
11
|
# 0.1.3 - Update to use version of Array Logic that supports functions.
|
9
12
|
# Allows RuleSet#rule to be defined using sum, average or count functions
|
10
13
|
#
|
@@ -20,21 +23,21 @@ end
|
|
20
23
|
# the list of questionnaires being displayed can change as questionnaires are
|
21
24
|
# submitted.
|
22
25
|
#
|
23
|
-
# 0.0.9 -
|
26
|
+
# 0.0.9 - Maintenance update
|
24
27
|
# Removes cope_index from migrations.
|
25
28
|
# Ensures answer_store#session_id is unique
|
26
29
|
#
|
27
|
-
# 0.0.8 -
|
30
|
+
# 0.0.8 - Add facility to preserve answer stores
|
28
31
|
# This allows snaps shots to be taken, and redundant answer stores to be
|
29
32
|
# removed during routine maintenance.
|
30
33
|
#
|
31
|
-
# 0.0.7 -
|
34
|
+
# 0.0.7 - Improves deployment process
|
32
35
|
# Fixes a bug in one of the migrations and updates the README
|
33
36
|
#
|
34
|
-
# 0.0.6 -
|
37
|
+
# 0.0.6 - Bug fix update
|
35
38
|
# Fixes issue where error raised if user submits a questionnaire without
|
36
39
|
# selecting and answer.
|
37
40
|
#
|
38
|
-
# 0.0.5 -
|
41
|
+
# 0.0.5 - Bug fix update
|
39
42
|
# Fixes issue where active admin rule set form did not include link text field.
|
40
43
|
#
|
Binary file
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|