amq-client 0.7.0.alpha17 → 0.7.0.alpha18
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/lib/amq/client/adapter.rb
CHANGED
@@ -217,7 +217,13 @@ module AMQ
|
|
217
217
|
|
218
218
|
self.on_disconnection(&block)
|
219
219
|
closing!
|
220
|
-
|
220
|
+
|
221
|
+
# ruby-amqp/amqp#66, MK.
|
222
|
+
if self.connection
|
223
|
+
self.connection.close(reply_code, reply_text)
|
224
|
+
else
|
225
|
+
self.disconnection_successful
|
226
|
+
end
|
221
227
|
end
|
222
228
|
alias close disconnect
|
223
229
|
|
@@ -257,7 +257,7 @@ module AMQ
|
|
257
257
|
# and protocol exceptions result in connection closure, check whether we are
|
258
258
|
# in the authentication stage. If so, it is likely to signal an authentication
|
259
259
|
# issue. Java client behaves the same way. MK.
|
260
|
-
if authenticating?
|
260
|
+
if authenticating? && !@intentionally_closing_connection
|
261
261
|
if sync?
|
262
262
|
raise PossibleAuthenticationFailureError.new(@settings)
|
263
263
|
else
|
data/lib/amq/client/version.rb
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'integration/eventmachine/spec_helper'
|
3
|
+
|
4
|
+
describe AMQ::Client::EventMachineClient, "handling immediate disconnection" do
|
5
|
+
include EventedSpec::SpecHelper
|
6
|
+
default_timeout 4
|
7
|
+
|
8
|
+
after :all do
|
9
|
+
done
|
10
|
+
end
|
11
|
+
|
12
|
+
it "successfully disconnects" do
|
13
|
+
em_amqp_connect do
|
14
|
+
EventMachine.run do
|
15
|
+
c = described_class.connect
|
16
|
+
|
17
|
+
c.disconnect do
|
18
|
+
puts "Disconnection callback has fired!"
|
19
|
+
done
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end # em_amqp_connect
|
23
|
+
end # it
|
24
|
+
end # describe
|
metadata
CHANGED
@@ -1,17 +1,10 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: amq-client
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.7.0.alpha18
|
5
5
|
prerelease: 6
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 7
|
9
|
-
- 0
|
10
|
-
- alpha
|
11
|
-
- 17
|
12
|
-
version: 0.7.0.alpha17
|
13
6
|
platform: ruby
|
14
|
-
authors:
|
7
|
+
authors:
|
15
8
|
- Jakub Stastny
|
16
9
|
- Michael S. Klishin
|
17
10
|
- Theo Hultberg
|
@@ -19,46 +12,41 @@ authors:
|
|
19
12
|
autorequire:
|
20
13
|
bindir: bin
|
21
14
|
cert_chain:
|
22
|
-
date: 2011-05-
|
15
|
+
date: 2011-05-06 00:00:00.000000000 +04:00
|
23
16
|
default_executable:
|
24
|
-
dependencies:
|
25
|
-
- !ruby/object:Gem::Dependency
|
17
|
+
dependencies:
|
18
|
+
- !ruby/object:Gem::Dependency
|
26
19
|
name: eventmachine
|
27
|
-
|
28
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
requirement: &2168779660 !ruby/object:Gem::Requirement
|
29
21
|
none: false
|
30
|
-
requirements:
|
31
|
-
- -
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
|
34
|
-
segments:
|
35
|
-
- 0
|
36
|
-
version: "0"
|
22
|
+
requirements:
|
23
|
+
- - ! '>='
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: '0'
|
37
26
|
type: :runtime
|
38
|
-
version_requirements: *id001
|
39
|
-
- !ruby/object:Gem::Dependency
|
40
|
-
name: amq-protocol
|
41
27
|
prerelease: false
|
42
|
-
|
28
|
+
version_requirements: *2168779660
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: amq-protocol
|
31
|
+
requirement: &2168779140 !ruby/object:Gem::Requirement
|
43
32
|
none: false
|
44
|
-
requirements:
|
45
|
-
- -
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
|
48
|
-
segments:
|
49
|
-
- 0
|
50
|
-
version: "0"
|
33
|
+
requirements:
|
34
|
+
- - ! '>='
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '0'
|
51
37
|
type: :runtime
|
52
|
-
|
53
|
-
|
54
|
-
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: *2168779140
|
40
|
+
description: amq-client supports multiple networking adapters (EventMachine, TCP sockets,
|
41
|
+
cool.io) and supposed to back more opinionated AMQP clients (such as amqp gem, bunny,
|
42
|
+
et cetera) or be used directly in cases when access to more advanced AMQP 0.9.1
|
43
|
+
features is more important that convenient APIs
|
44
|
+
email:
|
55
45
|
- stastny@101ideas.cz
|
56
46
|
- michael@novemberain.com
|
57
47
|
executables: []
|
58
|
-
|
59
48
|
extensions: []
|
60
|
-
|
61
|
-
extra_rdoc_files:
|
49
|
+
extra_rdoc_files:
|
62
50
|
- README.textile
|
63
51
|
- doc/_index.html
|
64
52
|
- doc/AMQ.html
|
@@ -69,7 +57,7 @@ extra_rdoc_files:
|
|
69
57
|
- doc/index.html
|
70
58
|
- doc/method_list.html
|
71
59
|
- doc/top-level-namespace.html
|
72
|
-
files:
|
60
|
+
files:
|
73
61
|
- .gitignore
|
74
62
|
- .gitmodules
|
75
63
|
- .rspec
|
@@ -196,6 +184,7 @@ files:
|
|
196
184
|
- spec/integration/eventmachine/connection_close_spec.rb
|
197
185
|
- spec/integration/eventmachine/connection_start_spec.rb
|
198
186
|
- spec/integration/eventmachine/exchange_declare_spec.rb
|
187
|
+
- spec/integration/eventmachine/regressions/amqp_gem_issue66_spec.rb
|
199
188
|
- spec/integration/eventmachine/spec_helper.rb
|
200
189
|
- spec/integration/eventmachine/tx_commit_spec.rb
|
201
190
|
- spec/integration/eventmachine/tx_rollback_spec.rb
|
@@ -220,38 +209,26 @@ files:
|
|
220
209
|
has_rdoc: true
|
221
210
|
homepage: http://github.com/ruby-amqp/amq-client
|
222
211
|
licenses: []
|
223
|
-
|
224
212
|
post_install_message:
|
225
213
|
rdoc_options: []
|
226
|
-
|
227
|
-
require_paths:
|
214
|
+
require_paths:
|
228
215
|
- lib
|
229
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
216
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
230
217
|
none: false
|
231
|
-
requirements:
|
232
|
-
- -
|
233
|
-
- !ruby/object:Gem::Version
|
234
|
-
|
235
|
-
|
236
|
-
- 0
|
237
|
-
version: "0"
|
238
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
218
|
+
requirements:
|
219
|
+
- - ! '>='
|
220
|
+
- !ruby/object:Gem::Version
|
221
|
+
version: '0'
|
222
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
239
223
|
none: false
|
240
|
-
requirements:
|
241
|
-
- -
|
242
|
-
- !ruby/object:Gem::Version
|
243
|
-
hash: 25
|
244
|
-
segments:
|
245
|
-
- 1
|
246
|
-
- 3
|
247
|
-
- 1
|
224
|
+
requirements:
|
225
|
+
- - ! '>'
|
226
|
+
- !ruby/object:Gem::Version
|
248
227
|
version: 1.3.1
|
249
228
|
requirements: []
|
250
|
-
|
251
229
|
rubyforge_project: amq-client
|
252
|
-
rubygems_version: 1.
|
230
|
+
rubygems_version: 1.6.2
|
253
231
|
signing_key:
|
254
232
|
specification_version: 3
|
255
233
|
summary: amq-client is a fully-featured, low-level AMQP 0.9.1 client
|
256
234
|
test_files: []
|
257
|
-
|