thrift_client 0.4.3 → 0.4.4

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/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.4.4 Default to 0 retries rather than the number of servers.
2
+
1
3
  v0.4.3 Bug fixes: handle_exception could be called more than once. Integer types are read signed.
2
4
 
3
5
  v0.4.2 Allow per-method overrides of retries. Fix several bugs with EventMachine.
@@ -87,7 +87,7 @@ class AbstractThriftClient
87
87
  RETRYING_DEFAULTS = {
88
88
  :exception_classes => DISCONNECT_ERRORS,
89
89
  :randomize_server_list => true,
90
- :retries => nil,
90
+ :retries => 0,
91
91
  :server_retry_period => 1,
92
92
  :server_max_requests => nil,
93
93
  :retry_overrides => {}
@@ -96,7 +96,7 @@ class AbstractThriftClient
96
96
  def initialize(client_class, servers, options = {})
97
97
  super
98
98
  @options = RETRYING_DEFAULTS.merge(@options) # @options is set by super
99
- @retries = options[:retries] || @server_list.size
99
+ @retries = @options[:retries]
100
100
  @request_count = 0
101
101
  @max_requests = @options[:server_max_requests]
102
102
  @retry_period = @options[:server_retry_period]
@@ -151,9 +151,9 @@ class AbstractThriftClient
151
151
  super
152
152
  rescue *@options[:exception_classes] => e
153
153
  disconnect_on_error!
154
- tries ||= (@options[:retry_overrides][method_name.to_sym] || @retries)
154
+ tries ||= (@options[:retry_overrides][method_name.to_sym] || @retries) + 1
155
155
  tries -= 1
156
- tries == 0 ? raise : retry
156
+ tries >= 0 ? raise : retry
157
157
  end
158
158
 
159
159
  def send_rpc(method_name, *args)
@@ -1,5 +1,4 @@
1
- $LOAD_PATH.unshift(File.dirname(__FILE__) + "/connection")
2
- require "base"
3
- require "socket"
4
- require "http"
5
- require "factory"
1
+ require "thrift_client/connection/base"
2
+ require "thrift_client/connection/socket"
3
+ require "thrift_client/connection/http"
4
+ require "thrift_client/connection/factory"
@@ -2,12 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{thrift_client}
5
- s.version = "0.4.3"
5
+ s.version = "0.4.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0.8") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Evan Weaver"]
9
- s.cert_chain = ["/Users/freels/.gemkeys/gem-public_cert.pem"]
10
- s.date = %q{2010-05-10}
9
+ s.date = %q{2010-07-23}
11
10
  s.description = %q{A Thrift client wrapper that encapsulates some common failover behavior.}
12
11
  s.email = %q{}
13
12
  s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README.rdoc", "lib/thrift_client.rb", "lib/thrift_client/abstract_thrift_client.rb", "lib/thrift_client/connection.rb", "lib/thrift_client/connection/base.rb", "lib/thrift_client/connection/factory.rb", "lib/thrift_client/connection/http.rb", "lib/thrift_client/connection/socket.rb", "lib/thrift_client/event_machine.rb", "lib/thrift_client/simple.rb", "lib/thrift_client/thrift.rb"]
@@ -16,8 +15,7 @@ Gem::Specification.new do |s|
16
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Thrift_client", "--main", "README.rdoc"]
17
16
  s.require_paths = ["lib"]
18
17
  s.rubyforge_project = %q{fauna}
19
- s.rubygems_version = %q{1.3.6}
20
- s.signing_key = %q{/Users/freels/.gemkeys/gem-private_key.pem}
18
+ s.rubygems_version = %q{1.3.7}
21
19
  s.summary = %q{A Thrift client wrapper that encapsulates some common failover behavior.}
22
20
  s.test_files = ["test/multiple_working_servers_test.rb", "test/simple_test.rb", "test/test_helper.rb", "test/thrift_client_http_test.rb", "test/thrift_client_test.rb"]
23
21
 
@@ -25,7 +23,7 @@ Gem::Specification.new do |s|
25
23
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
26
24
  s.specification_version = 3
27
25
 
28
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
26
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
29
27
  s.add_runtime_dependency(%q<thrift>, [">= 0"])
30
28
  else
31
29
  s.add_dependency(%q<thrift>, [">= 0"])
metadata CHANGED
@@ -1,50 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thrift_client
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 7
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 4
8
- - 3
9
- version: 0.4.3
9
+ - 4
10
+ version: 0.4.4
10
11
  platform: ruby
11
12
  authors:
12
13
  - Evan Weaver
13
14
  autorequire:
14
15
  bindir: bin
15
- cert_chain:
16
- - |
17
- -----BEGIN CERTIFICATE-----
18
- MIIDLjCCAhagAwIBAgIBADANBgkqhkiG9w0BAQUFADA9MQ0wCwYDVQQDDARtYXR0
19
- MRYwFAYKCZImiZPyLGQBGRYGZnJlZWxzMRQwEgYKCZImiZPyLGQBGRYEbmFtZTAe
20
- Fw0xMDA1MTAyMjA0NTVaFw0xMTA1MTAyMjA0NTVaMD0xDTALBgNVBAMMBG1hdHQx
21
- FjAUBgoJkiaJk/IsZAEZFgZmcmVlbHMxFDASBgoJkiaJk/IsZAEZFgRuYW1lMIIB
22
- IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuolq5fjVtDVlUMy690FYuonn
23
- Ww1PNQrx/xP/lKHXIuw0N1r53Rs3+u331Z2lxgNTf7xpCm28TaY7MHLQJeCsCuiW
24
- xRS1lDZc/D6gSbF1R8NrjX5Z2GkYhWwWq1JCqncGEMu9L2S7w3JEm1uAp9+Slf79
25
- FRDf8YsxolMo9kvIE9I7E+38tpfgB7V2kl7BWWGkqX+xpF6hYZJ8rJm07PFFPMC9
26
- mS2VSMShvJHLKpfu94Ud4WP9z05qX8sq+2TWkKHxp5GKndHsGDfWLgLExcw+FHK2
27
- aSMVczp3gJjX9/Oz5cUDvplwUmuSgdZPG/OloA5THH9yP+uHssJHmveV5eokswID
28
- AQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUK1mG9LJ8
29
- oj7zMsGt3a72q8M7JqIwDQYJKoZIhvcNAQEFBQADggEBAHnGX2oDk+SQXrFGa/jO
30
- IXmx3pl4PxriRAdUnJJNKSEopGYh/mr/Mu2XDv4eW4GgBZbqvzuPWavsVYFIQwKK
31
- Sz4FylZ9fxpcY3mWsz31IwrjYkZ6U43DP/pIw6Sv0iw2xhZwJPt09jZexs2KaH6l
32
- Non+q//rdf1avbcuWNBeSJIK03s7C4pS3lKfRfF/9KsuIbDFvbwNKC00uiXmokSP
33
- UdFLVl8y27MG7seE2788E6WaHrLWNhN+/dReDiOA5VjrkPI2lfHRqXDnaZTjvCir
34
- 5Cd6/wLNizaHOQCmp6VxpCuDA67P+TzXCvR7ElyQ2ErG2IHeSAoB/57bxToe40Rz
35
- 1LE=
36
- -----END CERTIFICATE-----
16
+ cert_chain: []
37
17
 
38
- date: 2010-05-10 00:00:00 -07:00
18
+ date: 2010-07-23 00:00:00 -07:00
39
19
  default_executable:
40
20
  dependencies:
41
21
  - !ruby/object:Gem::Dependency
42
22
  name: thrift
43
23
  prerelease: false
44
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
45
26
  requirements:
46
27
  - - ">="
47
28
  - !ruby/object:Gem::Version
29
+ hash: 3
48
30
  segments:
49
31
  - 0
50
32
  version: "0"
@@ -110,16 +92,20 @@ rdoc_options:
110
92
  require_paths:
111
93
  - lib
112
94
  required_ruby_version: !ruby/object:Gem::Requirement
95
+ none: false
113
96
  requirements:
114
97
  - - ">="
115
98
  - !ruby/object:Gem::Version
99
+ hash: 3
116
100
  segments:
117
101
  - 0
118
102
  version: "0"
119
103
  required_rubygems_version: !ruby/object:Gem::Requirement
104
+ none: false
120
105
  requirements:
121
106
  - - ">="
122
107
  - !ruby/object:Gem::Version
108
+ hash: 27
123
109
  segments:
124
110
  - 0
125
111
  - 8
@@ -127,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
113
  requirements: []
128
114
 
129
115
  rubyforge_project: fauna
130
- rubygems_version: 1.3.6
116
+ rubygems_version: 1.3.7
131
117
  signing_key:
132
118
  specification_version: 3
133
119
  summary: A Thrift client wrapper that encapsulates some common failover behavior.
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
Binary file