survey-gizmo-ruby 6.2.3 → 6.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a97c56891cb5d32899be0d8761f6111ea93594aa
4
- data.tar.gz: 52c6711838243e3215f6514f7915610a863900d8
3
+ metadata.gz: e3f1eaf1dab10cb028c5edbb3671e180da1db8f4
4
+ data.tar.gz: 1cefaec7e63875b24d821834cf24c01b527df651
5
5
  SHA512:
6
- metadata.gz: 114bee62cb95e00705c8d0c3a55d144851b11fba7635959b478d0b7b92272834436a6f3deb52330f87bf7eb8ddb3e4c7062a6dccff6a08e0a2675a1344bd9a6e
7
- data.tar.gz: 3fb1758367b9685ee72f42a7104f1431180cb74dd49ef430e999b140c3c29156fc1dd32069b18db6541a9ef510a572b5ba15f81ae6ab217f4a585be4ac3c4d5d
6
+ metadata.gz: 55fc16d92facb2d7304b4680c4eab64507a6563d2ce22fd91e5383712fdaffe5f8fa17db1eaf668c2b121f5fc351c543b3630ef17f97e9416134b6d4e498e634
7
+ data.tar.gz: edd7bc244376cdf521f39297a7e9b7be3a0b8beca3431629e7d67d4e0e21d9e9c115a5f94fd51b4387239c1b0b8ea3098be17a11aabecc1b509c36ff3ddd7c2d
@@ -43,6 +43,8 @@ module SurveyGizmo::API
43
43
  # for the "Other" option_id, and then a whole separate response for the text given as an "Other" response.
44
44
  if /\[question\((?<question_id>\d+)\),\s*option\((?<option_id>\d+)\)\]/ =~ k
45
45
  !answers.keys.any? { |key| key =~ /\[question\((#{question_id})\),\s*option\("(#{option_id})-other"\)\]/ }
46
+ elsif /\[question\((?<question_id>\d+)\)\]/ =~ k
47
+ !answers.keys.any? { |key| key =~ /\[question\((#{question_id})\),\s*option\("\d+-other"\)\]/ }
46
48
  else
47
49
  true
48
50
  end
@@ -1,3 +1,3 @@
1
1
  module SurveyGizmo
2
- VERSION = '6.2.3'
2
+ VERSION = '6.2.4'
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,
@@ -257,7 +257,9 @@ describe 'Survey Gizmo Resource' do
257
257
  "[question(8)]" => false,
258
258
  "[question(9), option(10002)]" => '16',
259
259
  "[question(10), question_pipe(\"Que aplicación\")]" => "5 = Extremely important",
260
- "[question(11), option(10001)]" => ""
260
+ # Sometimes surveygizmo only includes the option with the "other" answer. =(
261
+ '[question(11)]' => 'Other - Please explain',
262
+ '[question(11), option("10017-other")]' => 'I understood...'
261
263
  }
262
264
  end
263
265
 
@@ -277,7 +279,8 @@ describe 'Survey Gizmo Resource' do
277
279
  { survey_id: 1, question_id: 5, answer_text: "VERY important" },
278
280
  { survey_id: 1, question_id: 8, answer_text: 'false' },
279
281
  { survey_id: 1, question_id: 9, option_id: 10002 },
280
- { survey_id: 1, question_id: 10, question_pipe: "Que aplicación", answer_text: "5 = Extremely important" }
282
+ { 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..." }
281
284
  ])
282
285
  end
283
286
  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.3
4
+ version: 6.2.4
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-07-01 00:00:00.000000000 Z
14
+ date: 2016-07-06 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport