stomp 1.2.12 → 1.2.13

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.rdoc CHANGED
@@ -1,4 +1,8 @@
1
- == 1.2.12 20130728
1
+ == 1.2.13 20130817
2
+
3
+ * Issue #68, Stomp::Client#unreceive max_redeliveries off-by-one error
4
+
5
+ == 1.2.12 20130811
2
6
 
3
7
  * Fix infinite loop when max reconn attempts is reached
4
8
  * Enhance JRuby support in tests
data/README.rdoc CHANGED
@@ -12,6 +12,7 @@ An implementation of the Stomp protocol for Ruby. See:
12
12
 
13
13
  See _CHANGELOG.rdoc_ for details.
14
14
 
15
+ * Gem version 1.2.13. Stomp::Client#unreceive max_redeliveries fix.
15
16
  * Gem version 1.2.12. Miscellaneous issue fixes and cleanup.
16
17
  * Gem version 1.2.11. JRuby and AMQ support fixes.
17
18
  * Gem version 1.2.10. Support failover from heartbeat threads.
@@ -140,4 +141,5 @@ The following people have contributed to Stomp:
140
141
  * Jeremy Gailor
141
142
  * JP Hastings-Spital
142
143
  * Glenn Roberts
144
+ * Ian Smith
143
145
 
data/examples/ssl_uc2.rb CHANGED
@@ -26,7 +26,7 @@ class ExampleSSL2
26
26
  def run
27
27
  ts_flist = []
28
28
 
29
- # Change the following to the location of your CA's signed certificate.
29
+ # Change the following to the location of the server's CA signed certificate.
30
30
  ts_flist << "/home/gmallard/sslwork/2013/TestCA.crt"
31
31
 
32
32
  ssl_opts = Stomp::SSLParams.new(:ts_files => ts_flist.join(","),
data/examples/ssl_uc3.rb CHANGED
@@ -27,8 +27,8 @@ class ExampleSSL3
27
27
  # Run example.
28
28
  def run
29
29
  # Change the following:
30
- # * location of your client's signed certificate
31
- # * location of tour client's private key.
30
+ # * location of the client's signed certificate
31
+ # * location of the client's private key.
32
32
  ssl_opts = Stomp::SSLParams.new(
33
33
  :key_file => "/home/gmallard/sslwork/2013/client.key", # the client's private key
34
34
  :cert_file => "/home/gmallard/sslwork/2013/client.crt", # the client's signed certificate
@@ -349,7 +349,7 @@ module Stomp
349
349
  self.ack(message_id, :transaction => transaction_id)
350
350
  end
351
351
 
352
- if retry_count <= options[:max_redeliveries]
352
+ if message.headers[:retry_count] <= options[:max_redeliveries]
353
353
  self.publish(message.headers[:destination], message.body,
354
354
  message.headers.merge(:transaction => transaction_id))
355
355
  else
@@ -217,22 +217,23 @@ describe Stomp::Connection do
217
217
  @message.headers[:retry_count].should == 5
218
218
  end
219
219
 
220
- it "should not send the message to the dead letter queue as persistent if redeliveries equal max redeliveries" do
220
+ it "should not send the message to the dead letter queue as persistent if retry_count is less than max redeliveries" do
221
221
  max_redeliveries = 5
222
222
  dead_letter_queue = "/queue/Dead"
223
223
 
224
- @message.headers["retry_count"] = max_redeliveries
224
+ @message.headers["retry_count"] = max_redeliveries - 1
225
225
  transaction_id = "transaction-#{@message.headers["message-id"]}-#{@message.headers["retry_count"]}"
226
226
  @retry_headers = @retry_headers.merge :transaction => transaction_id, :retry_count => @message.headers["retry_count"] + 1
227
227
  @connection.should_receive(:publish).with(@message.headers["destination"], @message.body, @retry_headers)
228
228
  @connection.unreceive @message, :dead_letter_queue => dead_letter_queue, :max_redeliveries => max_redeliveries
229
229
  end
230
230
 
231
+ # If the retry_count has reached max_redeliveries, then we're done.
231
232
  it "should send the message to the dead letter queue as persistent if max redeliveries have been reached" do
232
233
  max_redeliveries = 5
233
234
  dead_letter_queue = "/queue/Dead"
234
235
 
235
- @message.headers["retry_count"] = max_redeliveries + 1
236
+ @message.headers["retry_count"] = max_redeliveries
236
237
  transaction_id = "transaction-#{@message.headers["message-id"]}-#{@message.headers["retry_count"]}"
237
238
  @retry_headers = @retry_headers.merge :persistent => true, :transaction => transaction_id, :retry_count => @message.headers["retry_count"] + 1, :original_destination=> @message.headers["destination"]
238
239
  @connection.should_receive(:publish).with(dead_letter_queue, @message.body, @retry_headers)
data/stomp.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{stomp}
8
- s.version = "1.2.12"
8
+ s.version = "1.2.13"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brian McCallister", "Marius Mathiesen", "Thiago Morello", "Guy M. Allard"]
12
- s.date = %q{2013-08-11}
12
+ s.date = %q{2013-08-17}
13
13
  s.description = %q{Ruby client for the Stomp messaging protocol. Note that this gem is no longer supported on rubyforge.}
14
14
  s.email = ["brianm@apache.org", "marius@stones.com", "morellon@gmail.com", "allard.guy.m@gmail.com"]
15
15
  s.executables = ["catstomp", "stompcat"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stomp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
5
- prerelease: false
4
+ hash: 5
5
+ prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 12
10
- version: 1.2.12
9
+ - 13
10
+ version: 1.2.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - Brian McCallister
@@ -18,8 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2013-08-11 00:00:00 -04:00
22
- default_executable:
21
+ date: 2013-08-17 00:00:00 Z
23
22
  dependencies:
24
23
  - !ruby/object:Gem::Dependency
25
24
  name: rspec
@@ -165,7 +164,6 @@ files:
165
164
  - test/test_ssl.rb
166
165
  - test/test_urlogin.rb
167
166
  - test/tlogger.rb
168
- has_rdoc: true
169
167
  homepage: https://github.com/stompgem/stomp
170
168
  licenses: []
171
169
 
@@ -195,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
193
  requirements: []
196
194
 
197
195
  rubyforge_project:
198
- rubygems_version: 1.3.7
196
+ rubygems_version: 1.8.25
199
197
  signing_key:
200
198
  specification_version: 3
201
199
  summary: Ruby client for the Stomp messaging protocol