survey-gizmo-ruby 6.2.9 → 6.2.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/survey_gizmo/api/answer.rb +1 -1
- data/lib/survey_gizmo/connection.rb +1 -1
- data/lib/survey_gizmo/version.rb +1 -1
- data/spec/resource_spec.rb +14 -12
- data/survey-gizmo-ruby.gemspec +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: 897e97a443708a3bbc799f88257396b15c83d7d2
|
4
|
+
data.tar.gz: 9820bcf7514c52653e43752d9cf70c6466bac5fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 943be94d1c52765db58f50013f41ef32cbacc0260540388a15dd108b4af4265d163861b8d2f3969955ff5f80fc3b7279c21bad43eabe90071b02c3b34b8a7419
|
7
|
+
data.tar.gz: 164399f8a1d3eaf1de4292f616467ef1d2d478faa77415649c6496efac4c17e5ad17ecddbce61b340655f274a62b8b15548f7add419582f290db16769ddc066b
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Versions
|
2
2
|
|
3
|
+
## 6.2.10
|
4
|
+
* Fix question pipe parsing when there's an integer without quotes instead of a quoted string (#87)
|
5
|
+
|
3
6
|
## Major Changes in 6.x
|
4
7
|
* **BREAKING CHANGE**: SurveyGizmo changed the authentication so you need to configure `api_token` and `api_token_secret` instead of user and password.
|
5
8
|
* **BREAKING CHANGE**: Pester has been removed as the retry source in favor of `Retriable`.
|
@@ -24,7 +24,7 @@ module SurveyGizmo::API
|
|
24
24
|
option_id.delete!('-other"')
|
25
25
|
self.other_text = value
|
26
26
|
end
|
27
|
-
when /\[question\((\d+)\),\s*question_pipe\("(
|
27
|
+
when /\[question\((\d+)\),\s*question_pipe\("?([^"]*)"?\)\]/
|
28
28
|
self.question_id, self.question_pipe = $1, $2
|
29
29
|
when /\[question\((\d+)\)\]/
|
30
30
|
self.question_id = $1
|
data/lib/survey_gizmo/version.rb
CHANGED
data/spec/resource_spec.rb
CHANGED
@@ -250,16 +250,17 @@ describe 'Survey Gizmo Resource' do
|
|
250
250
|
let(:answers) do
|
251
251
|
{
|
252
252
|
'[question(3), option("10021-other")]' => 'Some other text field answer',
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
253
|
+
'[question(3), option(10021)]' => 'Other (required)',
|
254
|
+
'[question(5)]' => 'VERY important',
|
255
|
+
'[question(6)]' => nil,
|
256
|
+
'[question(7), option(10001)]' => nil,
|
257
|
+
'[question(8)]' => false,
|
258
|
+
'[question(9), option(10002)]' => '16',
|
259
|
+
'[question(10), question_pipe("Que aplicación")]' => '5 = Extremely important',
|
260
|
+
'[question(11), question_pipe(10527)]' => 'This product was too expensive',
|
260
261
|
# Sometimes surveygizmo only includes the option with the "other" answer. =(
|
261
|
-
'[question(
|
262
|
-
'[question(
|
262
|
+
'[question(12)]' => 'Other - Please explain',
|
263
|
+
'[question(12), option("10017-other")]' => 'I understood...'
|
263
264
|
}
|
264
265
|
end
|
265
266
|
|
@@ -275,12 +276,13 @@ describe 'Survey Gizmo Resource' do
|
|
275
276
|
|
276
277
|
it 'should parse the answers and remove extraneous answers' do
|
277
278
|
expect(described_class.new(answers: answers, survey_id: 1).parsed_answers.map { |a| a.to_hash }).to eq([
|
278
|
-
{ survey_id: 1, question_id: 3, option_id: 10021, other_text:
|
279
|
-
{ survey_id: 1, question_id: 5, answer_text:
|
279
|
+
{ survey_id: 1, question_id: 3, option_id: 10021, other_text: 'Some other text field answer' },
|
280
|
+
{ survey_id: 1, question_id: 5, answer_text: 'VERY important' },
|
280
281
|
{ survey_id: 1, question_id: 8, answer_text: 'false' },
|
281
282
|
{ survey_id: 1, question_id: 9, option_id: 10002 },
|
282
283
|
{ survey_id: 1, question_id: 10, question_pipe: 'Que aplicación', answer_text: '5 = Extremely important' },
|
283
|
-
{ survey_id: 1, question_id: 11,
|
284
|
+
{ survey_id: 1, question_id: 11, question_pipe: '10527', answer_text: 'This product was too expensive' },
|
285
|
+
{ survey_id: 1, question_id: 12, option_id: 10017, other_text: 'I understood...' }
|
284
286
|
])
|
285
287
|
end
|
286
288
|
end
|
data/survey-gizmo-ruby.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
|
|
20
20
|
gem.add_dependency 'awesome_print', '~> 1'
|
21
21
|
gem.add_dependency 'faraday', '>= 0.9.1', '~> 0.9'
|
22
22
|
gem.add_dependency 'faraday_middleware', '~> 0.9'
|
23
|
-
gem.add_dependency 'retriable', '~>
|
23
|
+
gem.add_dependency 'retriable', '~> 2.0'
|
24
24
|
gem.add_dependency 'i18n'
|
25
25
|
gem.add_dependency 'virtus', '>= 1.0.0'
|
26
26
|
|
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.10
|
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-
|
14
|
+
date: 2016-10-27 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|
@@ -101,14 +101,14 @@ dependencies:
|
|
101
101
|
requirements:
|
102
102
|
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: '
|
104
|
+
version: '2.0'
|
105
105
|
type: :runtime
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
109
|
- - "~>"
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: '
|
111
|
+
version: '2.0'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: i18n
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|