missinglink 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/missinglink/survey.rb +24 -7
- data/lib/missinglink.rb +7 -1
- data/lib/missinglink/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56a937dbdc9cecfeaeb21a684990f42bf7a92e1c
|
4
|
+
data.tar.gz: db78c01ebc0cec5dbeb68345dd2327acc7f06572
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63341338e0bf7e67889049cde92463b145cf9bd0bd15c23dae78126da83c4860144a574ce129f497ba190b4829b9cf3ef65b18387916bfca3c98134cf7ee31b9
|
7
|
+
data.tar.gz: b1c4aa4bf7a4b6dc6da536ae88f5d1265992337099b7c9893cf9df5ad4b34066c6ffc6c4a30fdb4396257c8557e0f7f9b6f1c2c3498fd15ffe0cd947e5e3607b
|
@@ -16,8 +16,14 @@ module Missinglink
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def load_survey_details
|
19
|
-
|
20
|
-
|
19
|
+
begin
|
20
|
+
response = Connection.request('get_survey_details',
|
21
|
+
{ survey_id: sm_survey_id.to_s })
|
22
|
+
rescue Exception => e
|
23
|
+
puts "Exception raised when loading survey details for #{ self.inspect }.\n#{ e.inspect }"
|
24
|
+
return
|
25
|
+
end
|
26
|
+
|
21
27
|
(puts "Error loading survey details for survey #{ self.inspect }." && return) unless response
|
22
28
|
|
23
29
|
update_from_survey_details(response)
|
@@ -30,8 +36,14 @@ module Missinglink
|
|
30
36
|
end
|
31
37
|
|
32
38
|
def load_respondents
|
33
|
-
|
34
|
-
|
39
|
+
begin
|
40
|
+
response = Connection.request('get_respondent_list',
|
41
|
+
{ survey_id: sm_survey_id.to_s })
|
42
|
+
rescue Exception => e
|
43
|
+
puts "Exception raised when loading survey respondents for #{ self.inspect }.\n#{ e.inspect }"
|
44
|
+
return
|
45
|
+
end
|
46
|
+
|
35
47
|
(puts "Error loading responses for survey #{ self.inspect }" && return) unless response
|
36
48
|
|
37
49
|
response['respondents'].each do |respondent|
|
@@ -51,9 +63,14 @@ module Missinglink
|
|
51
63
|
|
52
64
|
while (respondents.size > 0)
|
53
65
|
ids = respondents.slice!(0, 100).map { |x| x.sm_respondent_id.to_s }
|
54
|
-
|
55
|
-
|
56
|
-
|
66
|
+
begin
|
67
|
+
response = Connection.request('get_responses',
|
68
|
+
{ survey_id: sm_survey_id.to_s,
|
69
|
+
respondent_ids: ids })
|
70
|
+
rescue Exception => e
|
71
|
+
puts "Exception raised when loading response details for #{ self.inspect }.\n#{ e.inspect }"
|
72
|
+
return
|
73
|
+
end
|
57
74
|
|
58
75
|
(puts "Error fetching response answers" && return) unless response
|
59
76
|
|
data/lib/missinglink.rb
CHANGED
@@ -7,7 +7,13 @@ module Missinglink
|
|
7
7
|
extend self
|
8
8
|
|
9
9
|
def poll_surveys
|
10
|
-
|
10
|
+
begin
|
11
|
+
response = Connection.request('get_survey_list')
|
12
|
+
rescue Exception => e
|
13
|
+
puts "Exception raised when polling for surveys.\n#{ e.inspect }"
|
14
|
+
return -1
|
15
|
+
end
|
16
|
+
|
11
17
|
(puts "Error polling surveys" && return) unless response
|
12
18
|
|
13
19
|
response['surveys'].each do |s|
|
data/lib/missinglink/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: missinglink
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Trey Springer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
159
|
version: '0'
|
160
160
|
requirements: []
|
161
161
|
rubyforge_project:
|
162
|
-
rubygems_version: 2.2.
|
162
|
+
rubygems_version: 2.2.2
|
163
163
|
signing_key:
|
164
164
|
specification_version: 4
|
165
165
|
summary: Wrapper around the SurveyMonkey v2 API.
|