survey-gizmo-ruby 6.1.3 → 6.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -1
- data/lib/survey_gizmo/api/answer.rb +3 -3
- data/lib/survey_gizmo/api/response.rb +1 -1
- data/lib/survey_gizmo/version.rb +1 -1
- data/spec/resource_spec.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7eb41f2a707faa996d6ee69f3a90bc6bcf6eb1a
|
4
|
+
data.tar.gz: 4e56a5a27408eb01bad4b477f92b602f56a4bdd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9714b4572a738ce77096851149dad4a9a8d457feb0df1b9de39660d17dac9564f70dbd1227c3baf793a65a260f11916f1dafea47a918ce0cc5a53624abf287b
|
7
|
+
data.tar.gz: 26967ba8b32e8efb4f0df9cbff222e4b0e2ac5b5258971d2210603de9145a061be31e9fc3ca26af3e1a3b784a07954f3f7dcada3c919149a11552449bf35795a
|
data/CHANGELOG.md
CHANGED
@@ -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
|
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 =~
|
24
|
-
option_id
|
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
|
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
|
-
"[question(3), option(
|
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.
|
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-
|
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:
|