survey-gizmo-ruby 6.1.3 → 6.2.0

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: 0d6ac831f23cde9a33a402318e0156e444e8a4fe
4
- data.tar.gz: 26c120f520f737920fb22d55344210dd06b31875
3
+ metadata.gz: c7eb41f2a707faa996d6ee69f3a90bc6bcf6eb1a
4
+ data.tar.gz: 4e56a5a27408eb01bad4b477f92b602f56a4bdd1
5
5
  SHA512:
6
- metadata.gz: f39778fccf60c152b5b53856f7289382b95a727da34900f6bc8ebcba4be621a8943b3c7d4c5f86e9b12ca439668d8423b66471dfcc86f0f29f93a5356032db93
7
- data.tar.gz: fa8e6251c2634bba965bf2097be1f9f5937acb2c28f339733a5ccb6c889cfaf6dd3d18d26c19b7dd13b17a29cb4dceaef63d99fdce7fab77e8aaec93ef90e6e3
6
+ metadata.gz: b9714b4572a738ce77096851149dad4a9a8d457feb0df1b9de39660d17dac9564f70dbd1227c3baf793a65a260f11916f1dafea47a918ce0cc5a53624abf287b
7
+ data.tar.gz: 26967ba8b32e8efb4f0df9cbff222e4b0e2ac5b5258971d2210603de9145a061be31e9fc3ca26af3e1a3b784a07954f3f7dcada3c919149a11552449bf35795a
@@ -3,7 +3,8 @@
3
3
  ## Major Changes in 6.x
4
4
  * **BREAKING CHANGE**: SurveyGizmo changed the authentication so you need to configure `api_token` and `api_token_secret` instead of user and password.
5
5
  * **BREAKING CHANGE**: Pester has been removed as the retry source in favor of `Retriable`.
6
- * FEATURE: `Configuration#region` will configure the region to use the corresponding api and time zone.
6
+ * FEATURE: `Configuration#region` will configure the region to use the corresponding api and time zone. (#74)
7
+ * Bugfix: fix escaping to resolve duplicate option issue (#75)
7
8
 
8
9
  ## Major Changes in 5.x
9
10
 
@@ -17,11 +17,11 @@ module SurveyGizmo::API
17
17
  self.attributes = attrs
18
18
 
19
19
  case key
20
- when /\[question\((\d+)\),\s*option\((\d+|"\d+-other")\)\]/
20
+ when /\[question\((\d+)\),\s*option\((\d+|\\\"\d+-other\\\")\)\]/
21
21
  self.question_id, self.option_id = $1, $2
22
22
 
23
- if option_id =~ /-other/
24
- option_id.delete!('-other"')
23
+ if option_id =~ /\\\"(\d+)-other\\\"/
24
+ option_id = $1
25
25
  self.other_text = value
26
26
  end
27
27
  when /\[question\((\d+)\),\s*question_pipe\("(.*)"\)\]/
@@ -42,7 +42,7 @@ module SurveyGizmo::API
42
42
  # Strip out "Other" answers that don't actually have the "other" text (they come back as two responses - one
43
43
  # for the "Other" option_id, and then a whole separate response for the text given as an "Other" response.
44
44
  if k =~ /\[question\((\d+)\),\s*option\((\d+)\)\]/
45
- !answers.keys.any? { |key| key =~ /\[question\((#{$1})\),\s*option\("(#{$2})-other"\)\]/ }
45
+ !answers.keys.any? { |key| key =~ /\[question\((#{$1})\),\s*option\(\\\"(#{$2})-other\\\"\)\]/ }
46
46
  else
47
47
  true
48
48
  end
@@ -1,3 +1,3 @@
1
1
  module SurveyGizmo
2
- VERSION = '6.1.3'
2
+ VERSION = '6.2.0'
3
3
  end
@@ -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
- "[question(3), option(\"10021-other\")]" => "Some other text field answer",
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,
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.1.3
4
+ version: 6.2.0
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-06-24 00:00:00.000000000 Z
14
+ date: 2016-06-29 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
@@ -267,3 +267,4 @@ test_files:
267
267
  - spec/test_json/page.json
268
268
  - spec/test_json/question.json
269
269
  - spec/test_json/survey.json
270
+ has_rdoc: