infusionsoft 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -106,6 +106,6 @@ time of a major release, support for that Ruby version may be dropped.
106
106
  * Need to add a history log for additional contributers
107
107
 
108
108
  ## <a name="copyright">Copyright</a>
109
- Copyright (c) 2011 Nathan Leavitt & Infused Systems
109
+ Copyright (c) 2012 Nathan Leavitt
110
110
  See [LICENSE](https://github.com/nateleavitt/infusionsoft/blob/master/LICENSE.md) for details.
111
111
 
@@ -15,19 +15,25 @@ module Infusionsoft
15
15
  result = server.call("#{service_call}", api_key, *args)
16
16
  if result.nil?; result = [] end
17
17
  rescue Timeout::Error
18
- @retry_count += 1
19
- puts "*** INFUSION API TIMEOUT: retrying #{@retry_count} ***"
20
18
  retry if ok_to_retry
21
- rescue XMLRPC::FaultException => e
22
- puts "*** INFUSION API ERROR: #{e.faultCode} - #{e.faultString} ***"
19
+ rescue
20
+ retry if ok_to_retry
23
21
  end
24
22
 
25
23
  return result
26
24
  end
27
25
 
28
26
  def ok_to_retry
29
- @retry_count <= 5 ? true : false
27
+ @retry_count += 1
28
+ if @retry_count <= 5
29
+ Rails.logger.info "*** INFUSION API ERROR: retrying #{@retry_count} ***" if Rails
30
+ true
31
+ else
32
+ false
33
+ end
30
34
  end
31
35
 
32
36
  end
33
37
  end
38
+
39
+ class InfusionAPIError < StandardError; end
@@ -1,4 +1,4 @@
1
1
  module Infusionsoft
2
2
  # The version of the gem
3
- VERSION = '1.1.0'.freeze unless defined?(::Infusionsoft::VERSION)
3
+ VERSION = '1.1.1'.freeze unless defined?(::Infusionsoft::VERSION)
4
4
  end
metadata CHANGED
@@ -1,34 +1,23 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: infusionsoft
3
- version: !ruby/object:Gem::Version
4
- hash: 19
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.1
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 1
9
- - 0
10
- version: 1.1.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Nathan Leavitt
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-05-23 00:00:00 -07:00
19
- default_executable:
12
+ date: 2012-08-17 00:00:00.000000000 Z
20
13
  dependencies: []
21
-
22
14
  description: A Ruby wrapper written for the Infusionsoft API
23
- email:
15
+ email:
24
16
  - nate@infusedsystems.com
25
17
  executables: []
26
-
27
18
  extensions: []
28
-
29
19
  extra_rdoc_files: []
30
-
31
- files:
20
+ files:
32
21
  - .gitignore
33
22
  - LICENSE.md
34
23
  - README.md
@@ -51,41 +40,28 @@ files:
51
40
  - lib/infusionsoft/request.rb
52
41
  - lib/infusionsoft/version.rb
53
42
  - test/api_infusion_test.rb
54
- has_rdoc: true
55
43
  homepage: https://github.com/nateleavitt/infusionsoft
56
44
  licenses: []
57
-
58
45
  post_install_message:
59
46
  rdoc_options: []
60
-
61
- require_paths:
47
+ require_paths:
62
48
  - lib
63
- required_ruby_version: !ruby/object:Gem::Requirement
49
+ required_ruby_version: !ruby/object:Gem::Requirement
64
50
  none: false
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- hash: 3
69
- segments:
70
- - 0
71
- version: "0"
72
- required_rubygems_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
56
  none: false
74
- requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- hash: 23
78
- segments:
79
- - 1
80
- - 3
81
- - 6
57
+ requirements:
58
+ - - ! '>='
59
+ - !ruby/object:Gem::Version
82
60
  version: 1.3.6
83
61
  requirements: []
84
-
85
62
  rubyforge_project:
86
- rubygems_version: 1.6.2
63
+ rubygems_version: 1.8.24
87
64
  signing_key:
88
65
  specification_version: 3
89
66
  summary: Ruby wrapper for the Infusionsoft API
90
67
  test_files: []
91
-