survey-gizmo-ruby 6.2.11 → 6.2.12
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/CHANGELOG.md +3 -0
- data/lib/survey_gizmo/api/answer.rb +6 -2
- data/lib/survey_gizmo/version.rb +1 -1
- data/spec/resource_spec.rb +4 -2
- 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: 844b6e6671c728ff6f42dc5b1ed5c73c2379540c
|
4
|
+
data.tar.gz: b3df39f6c5c5e78c55084895b6f67faf1986fe91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a08e99da36784b02497f799b5dc81af4e2b567c9bf69e0391de39f2da6dca68fcca8efa612e8d079fc9d66e989d5e733a345de9db95ce2fdcbbd8af068579b9
|
7
|
+
data.tar.gz: 7a340eaabb357007102dc28965eb539cd3f348b7923f45e147f5c9ff45808d36e9bf00e1742ac8d2f3fa11a69bb8e7afcd72a26009cd91ed5b816e5b07853f6d
|
data/CHANGELOG.md
CHANGED
@@ -23,6 +23,9 @@ module SurveyGizmo::API
|
|
23
23
|
if option_id =~ /-other/
|
24
24
|
option_id.delete!('-other"')
|
25
25
|
self.other_text = value
|
26
|
+
elsif option_id == 0
|
27
|
+
# Option IDs of 0 seem to happen for hidden questions, even when there is answer_text
|
28
|
+
self.option_id = nil
|
26
29
|
end
|
27
30
|
when /\[question\((\d+)\),\s*question_pipe\("?([^"]*)"?\)\]/
|
28
31
|
self.question_id, self.question_pipe = $1, $2
|
@@ -33,8 +36,9 @@ module SurveyGizmo::API
|
|
33
36
|
end
|
34
37
|
|
35
38
|
self.question_id = question_id.to_i
|
36
|
-
|
37
|
-
|
39
|
+
|
40
|
+
if option_id && !option_id.is_a?(Fixnum)
|
41
|
+
fail "Bad option_id #{option_id} (class: #{option_id.class}) for #{attrs}!" if option_id.to_i == 0
|
38
42
|
self.option_id = option_id.to_i
|
39
43
|
end
|
40
44
|
end
|
data/lib/survey_gizmo/version.rb
CHANGED
data/spec/resource_spec.rb
CHANGED
@@ -262,7 +262,8 @@ describe 'Survey Gizmo Resource' do
|
|
262
262
|
'[question(11), question_pipe(10527)]' => 'This product was too expensive',
|
263
263
|
# Sometimes surveygizmo only includes the option with the "other" answer. =(
|
264
264
|
'[question(12)]' => 'Other - Please explain',
|
265
|
-
'[question(12), option("10017-other")]' => 'I understood...'
|
265
|
+
'[question(12), option("10017-other")]' => 'I understood...',
|
266
|
+
'[question(13), option(0)]' => '12345'
|
266
267
|
}
|
267
268
|
end
|
268
269
|
|
@@ -284,7 +285,8 @@ describe 'Survey Gizmo Resource' do
|
|
284
285
|
{ survey_id: 1, question_id: 9, option_id: 10002 },
|
285
286
|
{ survey_id: 1, question_id: 10, question_pipe: 'Que aplicación', answer_text: '5 = Extremely important' },
|
286
287
|
{ survey_id: 1, question_id: 11, question_pipe: '10527', answer_text: 'This product was too expensive' },
|
287
|
-
{ survey_id: 1, question_id: 12, option_id: 10017, other_text: 'I understood...' }
|
288
|
+
{ survey_id: 1, question_id: 12, option_id: 10017, other_text: 'I understood...' },
|
289
|
+
{ survey_id: 1, question_id: 13, answer_text: '12345' }
|
288
290
|
])
|
289
291
|
end
|
290
292
|
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.12
|
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-12-
|
14
|
+
date: 2016-12-13 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|