survey-gizmo-ruby 6.2.9 → 6.2.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 20a04949f16c25819c1023e91c871fa7db8aab13
4
- data.tar.gz: 99f4d0a5c17a0f7a83a67c3ecb8039ec5643b0d6
3
+ metadata.gz: 897e97a443708a3bbc799f88257396b15c83d7d2
4
+ data.tar.gz: 9820bcf7514c52653e43752d9cf70c6466bac5fb
5
5
  SHA512:
6
- metadata.gz: 7ffdb74e5fa62bd8e37744d8ecae7a18357110d3842b0a531af0ea0e1a92afb2f6b44ccc832bbb7523144129c13257881fff496b4e32c58ffb887942804e6323
7
- data.tar.gz: dca6e6c8ff26776d48df6e66ad9850faf165773d91e4bb5968c83e733293895d684984cccd396f0cd154d3e11dd621382eb129ebe5ffddf3d1f7bcdaecc1f13e
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
@@ -51,7 +51,7 @@ module SurveyGizmo
51
51
 
52
52
  def retriable_args
53
53
  {
54
- interval: SurveyGizmo.configuration.retry_interval,
54
+ base_interval: SurveyGizmo.configuration.retry_interval,
55
55
  tries: SurveyGizmo.configuration.retry_attempts + 1,
56
56
  on: [
57
57
  Errno::ETIMEDOUT,
@@ -1,3 +1,3 @@
1
1
  module SurveyGizmo
2
- VERSION = '6.2.9'
2
+ VERSION = '6.2.10'
3
3
  end
@@ -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
- "[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",
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(11)]' => 'Other - Please explain',
262
- '[question(11), option("10017-other")]' => 'I understood...'
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: "Some other text field answer" },
279
- { survey_id: 1, question_id: 5, answer_text: "VERY important" },
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, option_id: 10017, other_text: "I understood..." }
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
@@ -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', '~> 1.4'
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.9
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-09-04 00:00:00.000000000 Z
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: '1.4'
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: '1.4'
111
+ version: '2.0'
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: i18n
114
114
  requirement: !ruby/object:Gem::Requirement