amqp 0.9.8 → 0.9.9

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- describe AMQP do
5
+ describe "AMQP queue redeclaration with different attributes" do
6
6
 
7
7
  #
8
8
  # Environment
@@ -17,7 +17,7 @@ describe AMQP do
17
17
  # Examples
18
18
  #
19
19
 
20
- context "when queue is redeclared with different attributes" do
20
+ context "when :durable value is different" do
21
21
  let(:name) { "amqp-gem.nondurable.queue" }
22
22
  let(:options) {
23
23
  { :durable => false, :exclusive => true, :auto_delete => true, :arguments => {}, :passive => false }
@@ -25,35 +25,48 @@ describe AMQP do
25
25
  let(:different_options) {
26
26
  { :durable => true, :exclusive => true, :auto_delete => true, :arguments => {}, :passive => false}
27
27
  }
28
- let(:irrelevant_different_options) {
29
- { :durable => false, :exclusive => true, :auto_delete => true, :arguments => {}, :passive => false, :header => {:random => 'stuff' } }
30
- }
31
28
 
32
29
 
33
30
  it "should raise AMQP::IncompatibleOptionsError for incompatable options" do
34
31
  channel = AMQP::Channel.new
35
- channel.on_error do |ch, close|
36
- @callback_fired = true
32
+ channel.on_error do |ch, channel_close|
33
+ @error_code = channel_close.reply_code
37
34
  end
38
35
 
39
36
  channel.queue(name, options)
40
37
  expect {
41
38
  channel.queue(name, different_options)
42
39
  }.to raise_error(AMQP::IncompatibleOptionsError)
43
- done
40
+
41
+ done(0.5) {
42
+ @error_code.should == 406
43
+ }
44
44
  end
45
+ end
46
+
47
+ context "when :headers are different" do
48
+ let(:name) { "amqp-gem.nondurable.queue" }
49
+ let(:options) {
50
+ { :durable => false, :exclusive => true, :auto_delete => true, :arguments => {}, :passive => false }
51
+ }
52
+ let(:different_options) {
53
+ { :durable => false, :exclusive => true, :auto_delete => true, :arguments => {}, :passive => false, :header => {:random => 'stuff' } }
54
+ }
45
55
 
46
56
  it "should not raise AMQP::IncompatibleOptionsError for irrelevant options" do
47
57
  channel = AMQP::Channel.new
48
- channel.on_error do |ch, close|
49
- @callback_fired = true
58
+ channel.on_error do |ch, channel_close|
59
+ @error_code = channel_close.reply_code
50
60
  end
51
61
 
52
62
  channel.queue(name, options)
53
63
  expect {
54
- channel.queue(name, irrelevant_different_options)
64
+ channel.queue(name, different_options)
55
65
  }.to_not raise_error(AMQP::IncompatibleOptionsError)
56
- done
66
+
67
+ done(0.5) {
68
+ @error_code.should == 406
69
+ }
57
70
  end
58
71
  end
59
72
  end # describe AMQP
@@ -0,0 +1,51 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ describe "An individual binding" do
6
+
7
+ #
8
+ # Environment
9
+ #
10
+
11
+ include EventedSpec::AMQPSpec
12
+
13
+ default_timeout 3
14
+
15
+ amqp_before do
16
+ @channel = AMQP::Channel.new
17
+ @channel.should be_open
18
+ @channel.on_error do |ch, close|
19
+ raise "Channel-level error!: #{close.inspect}"
20
+ end
21
+ end
22
+
23
+
24
+ default_options AMQP_OPTS
25
+
26
+
27
+ it "can be deleted by specifying routing key" do
28
+ flag1 = false
29
+ flag2 = false
30
+
31
+ x = @channel.direct("amqpgem.examples.imaging")
32
+
33
+ q = @channel.queue("", :exclusive => true)
34
+ q.bind(x, :routing_key => "resize").bind(x, :routing_key => "watermark").subscribe do |meta, payload|
35
+ flag1 = (meta.routing_key == "watermark")
36
+ flag2 = (meta.routing_key == "resize")
37
+ end
38
+
39
+ EventMachine.add_timer(0.5) do
40
+ q.unbind(x, :routing_key => "resize") do
41
+ x.publish("some data", :routing_key => "resize")
42
+ x.publish("some data", :routing_key => "watermark")
43
+ end
44
+
45
+ done(1.0) {
46
+ flag1.should be_true
47
+ flag2.should be_false
48
+ }
49
+ end
50
+ end
51
+ end
metadata CHANGED
@@ -1,103 +1,101 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: amqp
3
- version: !ruby/object:Gem::Version
4
- hash: 43
5
- prerelease:
6
- segments:
7
- - 0
8
- - 9
9
- - 8
10
- version: 0.9.8
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.9
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Aman Gupta
14
9
  - Jakub Stastny aka botanicus
15
10
  - Michael S. Klishin
16
- autorequire:
11
+ autorequire:
17
12
  bindir: bin
18
13
  cert_chain: []
19
-
20
- date: 2012-10-11 00:00:00 Z
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
14
+ date: 2013-02-21 00:00:00.000000000 Z
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
23
17
  name: eventmachine
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
18
+ version_requirements: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: !binary |-
23
+ MA==
26
24
  none: false
27
- requirements:
25
+ requirement: !ruby/object:Gem::Requirement
26
+ requirements:
28
27
  - - ">="
29
- - !ruby/object:Gem::Version
30
- hash: 3
31
- segments:
32
- - 0
33
- version: "0"
28
+ - !ruby/object:Gem::Version
29
+ version: !binary |-
30
+ MA==
31
+ none: false
32
+ prerelease: false
34
33
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
34
+ - !ruby/object:Gem::Dependency
37
35
  name: amq-client
38
- prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.9.12
40
41
  none: false
41
- requirements:
42
- - - ~>
43
- - !ruby/object:Gem::Version
44
- hash: 49
45
- segments:
46
- - 0
47
- - 9
48
- - 5
49
- version: 0.9.5
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: 0.9.12
47
+ none: false
48
+ prerelease: false
50
49
  type: :runtime
51
- version_requirements: *id002
52
- - !ruby/object:Gem::Dependency
50
+ - !ruby/object:Gem::Dependency
53
51
  name: amq-protocol
54
- prerelease: false
55
- requirement: &id003 !ruby/object:Gem::Requirement
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: 1.2.0
56
57
  none: false
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- hash: 51
61
- segments:
62
- - 0
63
- - 9
64
- - 4
65
- version: 0.9.4
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: 1.2.0
63
+ none: false
64
+ prerelease: false
66
65
  type: :runtime
67
- version_requirements: *id003
68
- description: Widely used, feature-rich asynchronous AMQP 0.9.1 client with batteries included.
69
- email:
70
- - michael@novemberain.com
71
- - stastny@101ideas.cz
66
+ description: Widely used, feature-rich asynchronous AMQP RabbitMQ client with batteries included.
67
+ email:
68
+ - !binary |-
69
+ bWljaGFlbEBub3ZlbWJlcmFpbi5jb20=
70
+ - !binary |-
71
+ c3Rhc3RueUAxMDFpZGVhcy5jeg==
72
72
  executables: []
73
-
74
73
  extensions: []
75
-
76
- extra_rdoc_files:
74
+ extra_rdoc_files:
77
75
  - README.md
76
+ - docs/08Migration.textile
77
+ - docs/AMQP091ModelExplained.textile
78
+ - docs/Bindings.textile
79
+ - docs/Clustering.textile
80
+ - docs/ConnectingToTheBroker.textile
81
+ - docs/ConnectionEncryptionWithTLS.textile
82
+ - docs/DocumentationGuidesIndex.textile
78
83
  - docs/Durability.textile
84
+ - docs/ErrorHandling.textile
79
85
  - docs/Exchanges.textile
86
+ - docs/GettingStarted.textile
80
87
  - docs/PatternsAndUseCases.textile
81
- - docs/ConnectingToTheBroker.textile
82
- - docs/ConnectionEncryptionWithTLS.textile
88
+ - docs/Queues.textile
89
+ - docs/RabbitMQVersions.textile
83
90
  - docs/RunningTests.textile
84
- - docs/DocumentationGuidesIndex.textile
91
+ - docs/TestingWithEventedSpec.textile
85
92
  - docs/Troubleshooting.textile
86
- - docs/RabbitMQVersions.textile
87
- - docs/Queues.textile
88
- - docs/08Migration.textile
89
93
  - docs/VendorSpecificExtensions.textile
90
- - docs/AMQP091ModelExplained.textile
91
- - docs/Bindings.textile
92
- - docs/GettingStarted.textile
93
- - docs/ErrorHandling.textile
94
- - docs/Clustering.textile
95
- - docs/TestingWithEventedSpec.textile
96
- files:
97
- - .gitignore
98
- - .rspec
99
- - .travis.yml
100
- - .yardopts
94
+ files:
95
+ - ".gitignore"
96
+ - ".rspec"
97
+ - ".travis.yml"
98
+ - ".yardopts"
101
99
  - CHANGELOG
102
100
  - Gemfile
103
101
  - README.md
@@ -321,6 +319,7 @@ files:
321
319
  - spec/integration/regressions/concurrent_publishing_on_the_same_channel_spec.rb
322
320
  - spec/integration/regressions/empty_message_body_spec.rb
323
321
  - spec/integration/regressions/issue66_spec.rb
322
+ - spec/integration/remove_individual_binding_spec.rb
324
323
  - spec/integration/reply_queue_communication_spec.rb
325
324
  - spec/integration/store_and_forward_spec.rb
326
325
  - spec/integration/stress/publishing_of_messages_with_incrementing_sizes_spec.rb
@@ -333,41 +332,32 @@ files:
333
332
  - spec/unit/amqp/client_spec.rb
334
333
  - spec/unit/amqp/connection_spec.rb
335
334
  - spec/unit/amqp/int_allocator_spec.rb
336
- homepage: http://github.com/ruby-amqp/amqp
335
+ homepage: http://rubyamqp.info
337
336
  licenses: []
338
-
339
- post_install_message: "[\e[32mVersion 0.9.0 to 0.9.4\e[0m] [BUG] A couple of concurrency issues (race conditions) fixed for apps that actively close and/or reuse channels\n\
340
- [\e[32mVersion 0.9.0 to 0.9.4\e[0m] [BUG] AMQP::Queue#initialize with :nowait => true no longer fails with NoMethodError\n\
341
- [\e[32mVersion 0.9.0 to 0.9.4\e[0m] [FEATURE] Automatic recovery mode now works for publishers\n"
342
- rdoc_options:
343
- - --include=examples --main README.md
344
- require_paths:
337
+ post_install_message:
338
+ rdoc_options:
339
+ - "--include=examples --main README.md"
340
+ require_paths:
345
341
  - lib
346
- required_ruby_version: !ruby/object:Gem::Requirement
347
- none: false
348
- requirements:
342
+ required_ruby_version: !ruby/object:Gem::Requirement
343
+ requirements:
349
344
  - - ">="
350
- - !ruby/object:Gem::Version
351
- hash: 3
352
- segments:
353
- - 0
354
- version: "0"
355
- required_rubygems_version: !ruby/object:Gem::Requirement
345
+ - !ruby/object:Gem::Version
346
+ version: !binary |-
347
+ MA==
356
348
  none: false
357
- requirements:
349
+ required_rubygems_version: !ruby/object:Gem::Requirement
350
+ requirements:
358
351
  - - ">="
359
- - !ruby/object:Gem::Version
360
- hash: 3
361
- segments:
362
- - 0
363
- version: "0"
352
+ - !ruby/object:Gem::Version
353
+ version: !binary |-
354
+ MA==
355
+ none: false
364
356
  requirements: []
365
-
366
357
  rubyforge_project: amqp
367
358
  rubygems_version: 1.8.24
368
- signing_key:
359
+ signing_key:
369
360
  specification_version: 3
370
- summary: Widely used, feature-rich asynchronous AMQP 0.9.1 client with batteries included
361
+ summary: Widely used, feature-rich asynchronous RabbitMQ client with batteries included
371
362
  test_files: []
372
-
373
- has_rdoc:
363
+ has_rdoc: