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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0316aff1833fa06184ea0fff5f0705332c1b803a
4
- data.tar.gz: 9732f0740be112b0e5c367af322fba3cfbcae023
3
+ metadata.gz: 56a937dbdc9cecfeaeb21a684990f42bf7a92e1c
4
+ data.tar.gz: db78c01ebc0cec5dbeb68345dd2327acc7f06572
5
5
  SHA512:
6
- metadata.gz: bb97d453e5479a002d950a8bc3dd98693f903ae2d6a60b6a5a04bc1a758850d646a66d7e49dc4ac1d5c111ef8b87f200da337e4c6300e7cd9ee2662ed292d042
7
- data.tar.gz: 837eb99121b6cdc455009213a96c7ee5a88028ee4ccabd0d7cbce81bfa7c2a0c7b32393ecaac83d9ed867b3c45d3378df41c501f738686d94acf7d58786b8856
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
- response = Connection.request('get_survey_details',
20
- { survey_id: sm_survey_id.to_s })
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
- response = Connection.request('get_respondent_list',
34
- { survey_id: sm_survey_id.to_s })
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
- response = Connection.request('get_responses',
55
- { survey_id: sm_survey_id.to_s,
56
- respondent_ids: ids })
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
 
@@ -7,7 +7,13 @@ module Missinglink
7
7
  extend self
8
8
 
9
9
  def poll_surveys
10
- response = Connection.request('get_survey_list')
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|
@@ -1,3 +1,3 @@
1
1
  module Missinglink
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
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.5
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-03-31 00:00:00.000000000 Z
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.0
162
+ rubygems_version: 2.2.2
163
163
  signing_key:
164
164
  specification_version: 4
165
165
  summary: Wrapper around the SurveyMonkey v2 API.