gwt_rpc 0.1.1 → 0.1.2

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
data/gwt_rpc.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{gwt_rpc}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andrew Carpenter"]
@@ -17,10 +17,18 @@ class GwtRpc::Client
17
17
  if timeout
18
18
  @timeout = timeout
19
19
  end
20
- @timeout ||= 10
20
+ @timeout ||= 1000
21
21
  @timeout
22
22
  end
23
23
 
24
+ def self.num_attempts(num_attempts = nil)
25
+ if num_attempts
26
+ @num_attempts = num_attempts
27
+ end
28
+ @num_attempts ||= 10
29
+ @num_attempts
30
+ end
31
+
24
32
  def self.gwt_permutation(permutation = nil)
25
33
  if permutation
26
34
  @gwt_permutation = permutation
@@ -28,7 +36,7 @@ class GwtRpc::Client
28
36
  @gwt_permutation
29
37
  end
30
38
 
31
- delegate :domain, :js_url, :gwt_permutation, :timeout, :to => "self.class"
39
+ delegate :domain, :js_url, :gwt_permutation, :timeout, :num_attempts, :to => "self.class"
32
40
 
33
41
  def self.map_classes(mapping)
34
42
  @class_map ||= {}
@@ -7,7 +7,7 @@ class GwtRpc::Request
7
7
  end
8
8
 
9
9
  def call
10
- 10.times do
10
+ @client.num_attempts.times do
11
11
  begin
12
12
  response = Typhoeus::Request.post(url,
13
13
  :body => body,
@@ -23,6 +23,7 @@ class GwtRpc::Request
23
23
  # prevent random hiccups
24
24
  end
25
25
  end
26
+ return nil
26
27
  end
27
28
 
28
29
  def url
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gwt_rpc
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew Carpenter