survey-gizmo-ruby 6.2.3 → 6.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/survey_gizmo/api/response.rb +2 -0
- data/lib/survey_gizmo/version.rb +1 -1
- data/spec/resource_spec.rb +6 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3f1eaf1dab10cb028c5edbb3671e180da1db8f4
|
4
|
+
data.tar.gz: 1cefaec7e63875b24d821834cf24c01b527df651
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55fc16d92facb2d7304b4680c4eab64507a6563d2ce22fd91e5383712fdaffe5f8fa17db1eaf668c2b121f5fc351c543b3630ef17f97e9416134b6d4e498e634
|
7
|
+
data.tar.gz: edd7bc244376cdf521f39297a7e9b7be3a0b8beca3431629e7d67d4e0e21d9e9c115a5f94fd51b4387239c1b0b8ea3098be17a11aabecc1b509c36ff3ddd7c2d
|
@@ -43,6 +43,8 @@ module SurveyGizmo::API
|
|
43
43
|
# for the "Other" option_id, and then a whole separate response for the text given as an "Other" response.
|
44
44
|
if /\[question\((?<question_id>\d+)\),\s*option\((?<option_id>\d+)\)\]/ =~ k
|
45
45
|
!answers.keys.any? { |key| key =~ /\[question\((#{question_id})\),\s*option\("(#{option_id})-other"\)\]/ }
|
46
|
+
elsif /\[question\((?<question_id>\d+)\)\]/ =~ k
|
47
|
+
!answers.keys.any? { |key| key =~ /\[question\((#{question_id})\),\s*option\("\d+-other"\)\]/ }
|
46
48
|
else
|
47
49
|
true
|
48
50
|
end
|
data/lib/survey_gizmo/version.rb
CHANGED
data/spec/resource_spec.rb
CHANGED
@@ -249,7 +249,7 @@ describe 'Survey Gizmo Resource' do
|
|
249
249
|
let(:timestamp) { '2015-01-02'.to_time(:utc) }
|
250
250
|
let(:answers) do
|
251
251
|
{
|
252
|
-
|
252
|
+
'[question(3), option("10021-other")]' => 'Some other text field answer',
|
253
253
|
"[question(3), option(10021)]" => "Other (required)",
|
254
254
|
"[question(5)]" => "VERY important",
|
255
255
|
"[question(6)]" => nil,
|
@@ -257,7 +257,9 @@ describe 'Survey Gizmo Resource' do
|
|
257
257
|
"[question(8)]" => false,
|
258
258
|
"[question(9), option(10002)]" => '16',
|
259
259
|
"[question(10), question_pipe(\"Que aplicación\")]" => "5 = Extremely important",
|
260
|
-
|
260
|
+
# Sometimes surveygizmo only includes the option with the "other" answer. =(
|
261
|
+
'[question(11)]' => 'Other - Please explain',
|
262
|
+
'[question(11), option("10017-other")]' => 'I understood...'
|
261
263
|
}
|
262
264
|
end
|
263
265
|
|
@@ -277,7 +279,8 @@ describe 'Survey Gizmo Resource' do
|
|
277
279
|
{ survey_id: 1, question_id: 5, answer_text: "VERY important" },
|
278
280
|
{ survey_id: 1, question_id: 8, answer_text: 'false' },
|
279
281
|
{ survey_id: 1, question_id: 9, option_id: 10002 },
|
280
|
-
{ survey_id: 1, question_id: 10, question_pipe:
|
282
|
+
{ survey_id: 1, question_id: 10, question_pipe: 'Que aplicación', answer_text: '5 = Extremely important' },
|
283
|
+
{ survey_id: 1, question_id: 11, option_id: 10017, other_text: "I understood..." }
|
281
284
|
])
|
282
285
|
end
|
283
286
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: survey-gizmo-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.2.
|
4
|
+
version: 6.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kabari Hendrick
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-07-
|
14
|
+
date: 2016-07-06 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|