surveymonkey_api 0.2.3 → 0.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcf3859b47a173822cc172cb1413e15198ef6800
|
4
|
+
data.tar.gz: 6e10f8e675d4bc10d3c0fd678187be538b5e16d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21c737a80312925e9e2b25973b6e9eae44edf00762d116e5d5e4a261b72f6d46c6288554a3c6e551728d09326810c4fcbe606a9922b257b93602c9699d670516
|
7
|
+
data.tar.gz: ebeb106e48c372d9695602aec6ac81e83422960445f789fb208d3032687d6c34b77847ecd06613fd333d682b70d5aabdc7962b6b52c8a10be0f0323f73809626
|
data/Gemfile.lock
CHANGED
@@ -12,10 +12,10 @@ module Surveymonkey
|
|
12
12
|
# Match answer title
|
13
13
|
def title
|
14
14
|
@title ||= if raw_data['text']
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
raw_data['text']
|
16
|
+
else
|
17
|
+
answer_structure['choices'].detect { |c| c['id'] == id }['text']
|
18
|
+
end
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
@@ -16,7 +16,7 @@ module Surveymonkey
|
|
16
16
|
|
17
17
|
def questions
|
18
18
|
@questions ||= raw_data['questions'].each_with_object([]) do |question, arr|
|
19
|
-
question_structure = page_structure['questions'].detect{|q| q['id'] == question['id']}
|
19
|
+
question_structure = page_structure['questions'].detect { |q| q['id'] == question['id'] }
|
20
20
|
arr << Surveymonkey::Response::Question.new(question, question_structure)
|
21
21
|
end
|
22
22
|
end
|
@@ -11,13 +11,17 @@ module Surveymonkey
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def raw_details(options = {})
|
14
|
-
client.survey_response(survey_id, id, options)
|
14
|
+
@raw_details ||= client.survey_response(survey_id, id, options)
|
15
|
+
end
|
16
|
+
|
17
|
+
def info
|
18
|
+
raw_details.dup.tap { |h| h.delete('pages') }
|
15
19
|
end
|
16
20
|
|
17
21
|
def pages(options = {})
|
18
|
-
@pages ||=
|
19
|
-
|
20
|
-
page_structure = details['pages'].detect{|p| p['id'] == page['id']}
|
22
|
+
@pages ||= raw_details(options)['pages'].each_with_object([]) do |page, arr|
|
23
|
+
unless page['questions'].empty?
|
24
|
+
page_structure = details['pages'].detect { |p| p['id'] == page['id'] }
|
21
25
|
arr << Surveymonkey::Response::Page.new(page, page_structure)
|
22
26
|
end
|
23
27
|
end
|
data/lib/surveymonkey_api.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: surveymonkey_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|