infusionsoft 1.1.0a → 1.1.0b

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,11 +15,12 @@ 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} ***"
18
+ retry_call(@retry_count)
20
19
  retry if ok_to_retry
21
20
  rescue => e
22
21
  raise(InfusionAPIError, "*** INFUSION API ERROR: #{e.faultCode} - #{e.faultString} ***") if ['test', 'development', 'staging'].include?(Rails.env)
22
+ retry_call(@retry_count)
23
+ retry if ok_to_retry
23
24
  end
24
25
 
25
26
  return result
@@ -29,6 +30,11 @@ module Infusionsoft
29
30
  @retry_count <= 5 ? true : false
30
31
  end
31
32
 
33
+ def retry_call(count)
34
+ @retry_count = count + 1
35
+ puts "*** INFUSION API ERROR: retrying #{@retry_count} ***"
36
+ end
37
+
32
38
  end
33
39
  end
34
40
 
@@ -1,4 +1,4 @@
1
1
  module Infusionsoft
2
2
  # The version of the gem
3
- VERSION = '1.1.0a'.freeze unless defined?(::Infusionsoft::VERSION)
3
+ VERSION = '1.1.0b'.freeze unless defined?(::Infusionsoft::VERSION)
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infusionsoft
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0a
4
+ version: 1.1.0b
5
5
  prerelease: 5
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-30 00:00:00.000000000 Z
12
+ date: 2012-08-17 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A Ruby wrapper written for the Infusionsoft API
15
15
  email: