stomp 1.2.13 → 1.2.14

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,8 @@
1
+ == 1.2.14 20130819
2
+
3
+ * Version bump (1.2.13 release had Stomp::Version of 1.1.12.)
4
+ * Prevent dup subscription header on re-receive
5
+
1
6
  == 1.2.13 20130817
2
7
 
3
8
  * Issue #68, Stomp::Client#unreceive max_redeliveries off-by-one error
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.14. Cleanup.
15
16
  * Gem version 1.2.13. Stomp::Client#unreceive max_redeliveries fix.
16
17
  * Gem version 1.2.12. Miscellaneous issue fixes and cleanup.
17
18
  * Gem version 1.2.11. JRuby and AMQ support fixes.
@@ -336,12 +336,14 @@ module Stomp
336
336
  options = { :dead_letter_queue => "/queue/DLQ", :max_redeliveries => 6 }.merge(options)
337
337
  # Lets make sure all keys are symbols
338
338
  message.headers = message.headers.symbolize_keys
339
-
340
339
  retry_count = message.headers[:retry_count].to_i || 0
341
340
  message.headers[:retry_count] = retry_count + 1
342
341
  transaction_id = "transaction-#{message.headers[:'message-id']}-#{retry_count}"
343
342
  message_id = message.headers.delete(:'message-id')
344
343
 
344
+ # Prevent duplicate 'subscription' headers on subsequent receives
345
+ message.headers.delete(:subscription) if message.headers[:subscription]
346
+
345
347
  begin
346
348
  self.begin transaction_id
347
349
 
data/lib/stomp/version.rb CHANGED
@@ -6,7 +6,7 @@ module Stomp
6
6
  module Version #:nodoc: all
7
7
  MAJOR = 1
8
8
  MINOR = 2
9
- PATCH = 12
9
+ PATCH = 14
10
10
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
11
11
  end
12
12
  end
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.13"
8
+ s.version = "1.2.14"
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-17}
12
+ s.date = %q{2013-08-19}
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"]
data/test/test_client.rb CHANGED
@@ -443,7 +443,7 @@ class TestClient < Test::Unit::TestCase
443
443
 
444
444
  # Test that a connection frame is received.
445
445
  def test_connection_frame
446
- assert_not_nil @client.connection_frame
446
+ assert_not_nil @client.connection_frame
447
447
  checkEmsg(@client)
448
448
  end unless RUBY_ENGINE =~ /jruby/
449
449
 
@@ -614,6 +614,32 @@ class TestClient < Test::Unit::TestCase
614
614
  end
615
615
  end
616
616
 
617
+ # test max redeliveries is not broken (6c2c1c1)
618
+ def test_max_redeliveries
619
+ @client.close
620
+ rdmsg = "To Be Redelivered"
621
+ dest = make_destination
622
+ [1, 2, 3].each do |max_re|
623
+ @client = get_client()
624
+ sid = @client.uuid()
625
+ received = nil
626
+ rm_actual = 0
627
+ sh = @client.protocol() == Stomp::SPL_10 ? {} : {:id => sid}
628
+ @client.subscribe(dest, sh) {|msg|
629
+ rm_actual += 1
630
+ @client.unreceive(msg, :max_redeliveries => max_re)
631
+ received = msg if rm_actual - 1 == max_re
632
+ }
633
+ @client.publish(dest, rdmsg)
634
+ sleep 0.01 until received
635
+ assert_equal rdmsg, received.body
636
+ sleep 0.5
637
+ @client.unsubscribe dest, sh
638
+ assert_equal max_re, rm_actual - 1
639
+ @client.close
640
+ end
641
+ end
642
+
617
643
  private
618
644
  def message_text
619
645
  name = caller_method_name unless name
metadata CHANGED
@@ -1,15 +1,10 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: stomp
3
- version: !ruby/object:Gem::Version
4
- hash: 5
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.14
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 2
9
- - 13
10
- version: 1.2.13
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Brian McCallister
14
9
  - Marius Mathiesen
15
10
  - Thiago Morello
@@ -17,36 +12,36 @@ authors:
17
12
  autorequire:
18
13
  bindir: bin
19
14
  cert_chain: []
20
-
21
- date: 2013-08-17 00:00:00 Z
22
- dependencies:
23
- - !ruby/object:Gem::Dependency
15
+ date: 2013-08-19 00:00:00.000000000 Z
16
+ dependencies:
17
+ - !ruby/object:Gem::Dependency
24
18
  name: rspec
25
- prerelease: false
26
- requirement: &id001 !ruby/object:Gem::Requirement
19
+ requirement: !ruby/object:Gem::Requirement
27
20
  none: false
28
- requirements:
29
- - - ">="
30
- - !ruby/object:Gem::Version
31
- hash: 5
32
- segments:
33
- - 2
34
- - 3
35
- version: "2.3"
21
+ requirements:
22
+ - - ! '>='
23
+ - !ruby/object:Gem::Version
24
+ version: '2.3'
36
25
  type: :development
37
- version_requirements: *id001
38
- description: Ruby client for the Stomp messaging protocol. Note that this gem is no longer supported on rubyforge.
39
- email:
26
+ prerelease: false
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '2.3'
33
+ description: Ruby client for the Stomp messaging protocol. Note that this gem is
34
+ no longer supported on rubyforge.
35
+ email:
40
36
  - brianm@apache.org
41
37
  - marius@stones.com
42
38
  - morellon@gmail.com
43
39
  - allard.guy.m@gmail.com
44
- executables:
40
+ executables:
45
41
  - catstomp
46
42
  - stompcat
47
43
  extensions: []
48
-
49
- extra_rdoc_files:
44
+ extra_rdoc_files:
50
45
  - CHANGELOG.rdoc
51
46
  - LICENSE
52
47
  - README.rdoc
@@ -100,7 +95,7 @@ extra_rdoc_files:
100
95
  - test/test_ssl.rb
101
96
  - test/test_urlogin.rb
102
97
  - test/tlogger.rb
103
- files:
98
+ files:
104
99
  - CHANGELOG.rdoc
105
100
  - LICENSE
106
101
  - README.rdoc
@@ -166,36 +161,27 @@ files:
166
161
  - test/tlogger.rb
167
162
  homepage: https://github.com/stompgem/stomp
168
163
  licenses: []
169
-
170
164
  post_install_message:
171
165
  rdoc_options: []
172
-
173
- require_paths:
166
+ require_paths:
174
167
  - lib
175
- required_ruby_version: !ruby/object:Gem::Requirement
168
+ required_ruby_version: !ruby/object:Gem::Requirement
176
169
  none: false
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- hash: 3
181
- segments:
182
- - 0
183
- version: "0"
184
- required_rubygems_version: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ required_rubygems_version: !ruby/object:Gem::Requirement
185
175
  none: false
186
- requirements:
187
- - - ">="
188
- - !ruby/object:Gem::Version
189
- hash: 3
190
- segments:
191
- - 0
192
- version: "0"
176
+ requirements:
177
+ - - ! '>='
178
+ - !ruby/object:Gem::Version
179
+ version: '0'
193
180
  requirements: []
194
-
195
181
  rubyforge_project:
196
182
  rubygems_version: 1.8.25
197
183
  signing_key:
198
184
  specification_version: 3
199
185
  summary: Ruby client for the Stomp messaging protocol
200
186
  test_files: []
201
-
187
+ has_rdoc: