[DRE-commits] [stompserver] 06/08: added patch for Ruby 1.9/2.0

Jonas Genannt jonas at brachium-system.net
Sat Nov 30 22:47:19 UTC 2013


This is an automated email from the git hooks/post-receive script.

hggh-guest pushed a commit to branch master
in repository stompserver.

commit 30ef25bc2b032df8b7801fa40949f16b1cc87a9d
Author: Jonas Genannt <jonas at brachium-system.net>
Date:   Sat Nov 30 22:38:03 2013 +0100

    added patch for Ruby 1.9/2.0
---
 debian/patches/ruby19_20.patch | 57 ++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series          |  1 +
 2 files changed, 58 insertions(+)

diff --git a/debian/patches/ruby19_20.patch b/debian/patches/ruby19_20.patch
new file mode 100644
index 0000000..af1afc2
--- /dev/null
+++ b/debian/patches/ruby19_20.patch
@@ -0,0 +1,57 @@
+Author: Timothy Redaelli <timothy at redaelli.eu>
+Description: [PATCH] Adapt for ruby 1.9
+Forwarded: not-needed
+Origin: https://github.com/drizzt/stompserver/commit/b2dd714f9bc6d7b831767cc0d45d7f00cae2bde5.patch
+
+---
+ lib/stomp_server/stomp_frame.rb | 6 +++---
+ test/test_topic_manager.rb      | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/lib/stomp_server/stomp_frame.rb b/lib/stomp_server/stomp_frame.rb
+index 3833d98..b2cb950 100644
+--- a/lib/stomp_server/stomp_frame.rb
++++ b/lib/stomp_server/stomp_frame.rb
+@@ -10,7 +10,7 @@ def initialize(command=nil, headers=nil, body=nil)
+  
+   def to_s
+     result = @command + "\n"
+-    @headers['content-length'] = @body.size.to_s if @body.include?(0)
++    @headers['content-length'] = @body.size.to_s if @body.include?(0.chr)
+     @headers.each_pair do |key, value|
+       result << "#{key}:#{value}\n"
+     end
+@@ -37,7 +37,7 @@ def initialize
+   end
+   
+   def parse_body(len)
+-    raise RuntimeError.new("Invalid stompframe (missing null term)") unless @buffer[len] == 0
++    raise RuntimeError.new("Invalid stompframe (missing null term)") unless @buffer[len] == 0.chr
+     @frame.body = @buffer[0...len]
+     @buffer = @buffer[len+1..-1]
+     @frames << @frame
+@@ -51,7 +51,7 @@ def parse_binary_body
+   end
+   
+   def parse_text_body
+-    if pos = @buffer.index(0)
++    if pos = @buffer.index(0.chr)
+       parse_body(pos)
+     end
+   end
+diff --git a/test/test_topic_manager.rb b/test/test_topic_manager.rb
+index 152a577..1e23b6b 100644
+--- a/test/test_topic_manager.rb
++++ b/test/test_topic_manager.rb
+@@ -52,7 +52,7 @@ def test_unsubscribe
+     assert_equal('', u.data)        
+   end
+ 
+-  def test_sendmsg(msg)
++  def test_sendmsg
+     u = UserMock.new
+     t = 'foo'
+     @t.subscribe(t, u)
+-- 
+1.8.4
+
diff --git a/debian/patches/series b/debian/patches/series
index 31cd4dd..1a493a8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 ruby_hashbang.patch
 fhs_paths.patch
 fix_storagedir.patch
+ruby19_20.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/stompserver.git



More information about the Pkg-ruby-extras-commits mailing list