Hello community,

here is the log from the commit of package rubygem-stomp for openSUSE:Factory 
checked in at 2020-03-07 21:40:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-stomp (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-stomp.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-stomp"

Sat Mar  7 21:40:19 2020 rev:6 rq:773856 version:1.4.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-stomp/rubygem-stomp.changes      
2019-01-21 10:54:48.987695224 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-stomp.new.26092/rubygem-stomp.changes   
2020-03-07 21:40:23.180359163 +0100
@@ -1,0 +2,17 @@
+Mon Feb 10 15:53:23 UTC 2020 - Stephan Kulow <[email protected]>
+
+- updated to version 1.4.9
+ see installed CHANGELOG.md
+
+  ## 1.4.9 20191116
+  
+  * More debugging messages in netio.rb.
+  * Test workaround for Artemis-2289.
+  * New put and get examples.
+  * Fix issue #160.
+  * Address issue #155.
+  * Suppress SSL stacktrace to stdout.
+  * Example logger enhancements.
+  * Optional STOMP frame in examples.
+
+-------------------------------------------------------------------

Old:
----
  stomp-1.4.8.gem

New:
----
  stomp-1.4.9.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-stomp.spec ++++++
--- /var/tmp/diff_new_pack.mXZQb1/_old  2020-03-07 21:40:23.924359665 +0100
+++ /var/tmp/diff_new_pack.mXZQb1/_new  2020-03-07 21:40:23.928359668 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-stomp
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-stomp
-Version:        1.4.8
+Version:        1.4.9
 Release:        0
 %define mod_name stomp
 %define mod_full_name %{mod_name}-%{version}
@@ -33,7 +33,7 @@
 BuildRequires:  %{ruby}
 BuildRequires:  ruby-macros >= 5
 BuildRequires:  update-alternatives
-Url:            https://github.com/stompgem/stomp
+URL:            https://github.com/stompgem/stomp
 Source:         https://rubygems.org/gems/%{mod_full_name}.gem
 Source1:        gem2rpm.yml
 Summary:        Ruby client for the Stomp messaging protocol

++++++ stomp-1.4.8.gem -> stomp-1.4.9.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    2018-12-19 16:44:53.000000000 +0100
+++ new/CHANGELOG.md    2019-11-16 19:32:57.000000000 +0100
@@ -1,5 +1,16 @@
 # Stomp Gem Change Log
 
+## 1.4.9 20191116
+
+* More debugging messages in netio.rb.
+* Test workaround for Artemis-2289.
+* New put and get examples.
+* Fix issue #160.
+* Address issue #155.
+* Suppress SSL stacktrace to stdout.
+* Example logger enhancements.
+* Optional STOMP frame in examples.
+
 ## 1.4.8 20181219
 
 * Fix missed merge from 1.4.7 release.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2018-12-19 16:44:53.000000000 +0100
+++ new/README.md       2019-11-16 19:32:57.000000000 +0100
@@ -6,94 +6,97 @@
 
 An implementation of the Stomp protocol for Ruby. See:
 
-* [STOMP 1.0, 1.1, and 1.2] (http://stomp.github.com/index.html)
+* [STOMP 1.0](http://stomp.github.io/stomp-specification-1.0.html)
+* [STOMP 1.1](http://stomp.github.io/stomp-specification-1.1.html)
+* [STOMP 1.2](http://stomp.github.io/stomp-specification-1.2.html)
 
 ## Hash Login Example Usage (**this is the recommended login technique**):
 
-```
-    hash = {
-        :hosts => [
-        # First connect is to remotehost1
-        {:login => "login1", :passcode => "passcode1", :host => "remotehost1", 
:port => 61612, :ssl => true},
-        # First failover connect is to remotehost2
-        {:login => "login2", :passcode => "passcode2", :host => "remotehost2", 
:port => 61613, :ssl => false},
-        ],
-        # These are the default parameters and do not need to be set
-        :reliable => true,                  # reliable (use failover)
-        :initial_reconnect_delay => 0.01,   # initial delay before reconnect 
(secs)
-        :max_reconnect_delay => 30.0,       # max delay before reconnect
-        :use_exponential_back_off => true,  # increase delay between reconnect 
attpempts
-        :back_off_multiplier => 2,          # next delay multiplier
-        :max_reconnect_attempts => 0,       # retry forever, use # for maximum 
attempts
-        :randomize => false,                # do not radomize hosts hash 
before reconnect
-        :connect_timeout => 0,              # Timeout for TCP/TLS connects, 
use # for max seconds
-        :connect_headers => {},             # user supplied CONNECT headers 
(req'd for Stomp 1.1+)
-        :parse_timeout => 5,                # IO::select wait time on socket 
reads
-        :logger => nil,                     # user suplied callback logger 
instance
-        :dmh => false,                      # do not support multihomed IPV4 / 
IPV6 hosts during failover
-        :closed_check => true,              # check first if closed in each 
protocol method
-        :hbser => false,                    # raise on heartbeat send exception
-        :stompconn => false,                # Use STOMP instead of CONNECT
-        :usecrlf => false,                  # Use CRLF command and header line 
ends (1.2+)
-        :max_hbread_fails => 0,             # Max HB read fails before retry.  
0 => never retry
-        :max_hbrlck_fails => 0,             # Max HB read lock obtain fails 
before retry.  0 => never retry
-        :fast_hbs_adjust => 0.0,            # Fast heartbeat senders sleep 
adjustment, seconds, needed ...
-                                            # For fast heartbeat senders.  
'fast' == YMMV.  If not
-                                            # correct for your environment, 
expect unnecessary fail overs
-        :connread_timeout => 0,             # Timeout during CONNECT for read 
of CONNECTED/ERROR, secs
-        :tcp_nodelay => true,               # Turns on the TCP_NODELAY socket 
option; disables Nagle's algorithm
-        :start_timeout => 0,                # Timeout around Stomp::Client 
initialization
-        :sslctx_newparm => nil,             # Param for SSLContext.new
-        :ssl_post_conn_check => true,       # Further verify broker identity
-        :nto_cmd_read => true,              # No timeout on COMMAND read
-      }
+```ruby
+hash = {
+  hosts: [
+    # First connect is to remotehost1
+    { login: 'login1', passcode: 'passcode1', host: 'remotehost1', port: 
61_612, ssl: true },
+    # First failover connect is to remotehost2
+    { login: 'login2', passcode: 'passcode2', host: 'remotehost2', port: 
61_613, ssl: false }
+  ],
+  # These are the default parameters and do not need to be set
+  reliable: true,                  # reliable (use failover)
+  initial_reconnect_delay: 0.01,   # initial delay before reconnect (secs)
+  max_reconnect_delay: 30.0,       # max delay before reconnect
+  use_exponential_back_off: true,  # increase delay between reconnect attpempts
+  back_off_multiplier: 2,          # next delay multiplier
+  max_reconnect_attempts: 0,       # retry forever, use # for maximum attempts
+  randomize: false,                # do not radomize hosts hash before 
reconnect
+  connect_timeout: 0,              # Timeout for TCP/TLS connects, use # for 
max seconds
+  connect_headers: {},             # user supplied CONNECT headers (req'd for 
Stomp 1.1+)
+  parse_timeout: 5,                # IO::select wait time on socket reads
+  logger: nil,                     # user suplied callback logger instance
+  dmh: false,                      # do not support multihomed IPV4 / IPV6 
hosts during failover
+  closed_check: true,              # check first if closed in each protocol 
method
+  hbser: false,                    # raise on heartbeat send exception
+  stompconn: false,                # Use STOMP instead of CONNECT
+  usecrlf: false,                  # Use CRLF command and header line ends 
(1.2+)
+  max_hbread_fails: 0,             # Max HB read fails before retry.  0 => 
never retry
+  max_hbrlck_fails: 0,             # Max HB read lock obtain fails before 
retry.  0 => never retry
+  fast_hbs_adjust: 0.0,            # Fast heartbeat senders sleep adjustment, 
seconds, needed ...
+  # For fast heartbeat senders.  'fast' == YMMV.  If not
+  # correct for your environment, expect unnecessary fail overs
+  connread_timeout: 0,             # Timeout during CONNECT for read of 
CONNECTED/ERROR, secs
+  tcp_nodelay: true,               # Turns on the TCP_NODELAY socket option; 
disables Nagle's algorithm
+  start_timeout: 0,                # Timeout around Stomp::Client 
initialization
+  sslctx_newparm: nil,             # Param for SSLContext.new
+  ssl_post_conn_check: true,       # Further verify broker identity
+  nto_cmd_read: true,              # No timeout on COMMAND read
+}
 
-      # for a client
-      client = Stomp::Client.new(hash)
+# for a client
+client = Stomp::Client.new(hash)
 
-      # for a connection
-      connection = Stomp::Connection.new(hash)
+# for a connection
+connection = Stomp::Connection.new(hash)
 ```
 
 ### Positional Parameter Usage:
 
-```
-    client = Stomp::Client.new("user", "pass", "localhost", 61613)
-    client.publish("/queue/mine", "hello world!")
-    client.subscribe("/queue/mine") do |msg|
-        p msg
-    end
+```ruby
+client = Stomp::Client.new("user", "pass", "localhost", 61613)
+client.publish("/queue/mine", "hello world!")
+client.subscribe("/queue/mine") do |msg|
+    p msg
+end
 ```
 
 ### Stomp URL Usage:
 
-A Stomp URL must begin with 'stomp://' and can be in one of the following 
forms:
+A Stomp URL must begin with `stomp://` and can be in one of the following 
forms:
 
 ```
-    stomp://host:port
-    stomp://host.domain.tld:port
-    stomp://login:passcode@host:port
-    stomp://login:[email protected]:port
-    
-    # e.g. c = Stomp::Client.new(urlstring)
+stomp://host:port
+stomp://host.domain.tld:port
+stomp://login:passcode@host:port
+stomp://login:[email protected]:port
+
+# e.g. c = Stomp::Client.new(urlstring)
 ```
 
 ### Failover + SSL Example URL Usage:
 
-```
-    options = 
"initialReconnectDelay=5000&randomize=false&useExponentialBackOff=false"
-    # remotehost1 uses SSL, remotehost2 doesn't
-    client = 
Stomp::Client.new("failover:(stomp+ssl://login1:passcode1@remotehost1:61612,stomp://login2:passcode2@remotehost2:61613)?#{options}")
-    client.publish("/queue/mine", "hello world!")
-    client.subscribe("/queue/mine") do |msg|
-        p msg
-    end
+```ruby
+options = 
'initialReconnectDelay=5000&randomize=false&useExponentialBackOff=false'
+# remotehost1 uses SSL, remotehost2 doesn't
+client = 
Stomp::Client.new("failover:(stomp+ssl://login1:passcode1@remotehost1:61612,stomp://login2:passcode2@remotehost2:61613)?#{options}")
+client.publish('/queue/mine', 'hello world!')
+client.subscribe('/queue/mine') do |msg|
+  p msg
+end
 ```
 
 ### New:
 
 See _CHANGELOG.rdoc_ for details.
 
+* Gem version 1.4.9. Fix two issues, enhance debugging and examples.
 * Gem version 1.4.8. Fix missed merge in 1.4.7 release.
 * Gem version 1.4.7. Add support for text SSL certs.  Do not use, use 1.4.8 
instead.
 * Gem version 1.4.6. Fix version 1.4.5 which breaks JRuby support.
@@ -322,7 +325,7 @@
 2010-03-23
 </td>
 <td style="border: 1px solid black;padding-left: 10px;" >
-(0092)
+(0106)
 </td>
 <td style="border: 1px solid black;padding-left: 10px;" >
 <span style="font-weight: bold;" >
@@ -821,4 +824,32 @@
  / &lt;[email protected]&gt;
 </td>
 </tr>
+<tr>
+<td style="border: 1px solid black;padding-left: 10px;" >
+2019-06-05
+</td>
+<td style="border: 1px solid black;padding-left: 10px;" >
+(0001)
+</td>
+<td style="border: 1px solid black;padding-left: 10px;" >
+<span style="font-weight: bold;" >
+Smit Patel
+</span>
+ / &lt;[email protected]&gt;
+</td>
+</tr>
+<tr>
+<td style="border: 1px solid black;padding-left: 10px;" >
+2019-09-16
+</td>
+<td style="border: 1px solid black;padding-left: 10px;" >
+(0001)
+</td>
+<td style="border: 1px solid black;padding-left: 10px;" >
+<span style="font-weight: bold;" >
+Thiago Xavier
+</span>
+ / &lt;[email protected]&gt;
+</td>
+</tr>
 </table>
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/examples/conn_get.rb new/examples/conn_get.rb
--- old/examples/conn_get.rb    1970-01-01 01:00:00.000000000 +0100
+++ new/examples/conn_get.rb    2019-11-16 19:32:57.000000000 +0100
@@ -0,0 +1,122 @@
+# -*- encoding: utf-8 -*-
+
+#
+# The current require dance for different Ruby versions.
+# Change this to suit your requirements.
+#
+if Kernel.respond_to?(:require_relative)
+  require_relative("./stomp_common")
+else
+  $LOAD_PATH << File.dirname(__FILE__)
+  require "stomp_common"
+end
+include Stomp1xCommon
+
+#
+# == Stomp 1.x Putt / Get Example
+#
+# Purpose: to demonstrate producing and consuming messages using a
+# Stomp#Connection instance.
+#
+# Note: this example assumes that you have at least the 1.2.0 gem release
+# installed.
+#
+# When you:
+#
+# * Use a Stomp compliant broker
+# * Want a Stomp 1.1+ connection and functionality
+#
+# then your code *must* specifically request that environment.
+#
+# You need to supply all of the normal values expected of course:
+#
+# * login - the user name
+# * passcode - the password
+# * host - the host to connect to
+# * port - the port to connect to
+#
+# Additionaly you are required to supply the 1.1+ connection data as documented
+# in the Stomp 1.1+ specifications:
+#
+# http://stomp.github.com/stomp-specification-1.0.html
+# http://stomp.github.com/stomp-specification-1.1.html
+# http://stomp.github.com/stomp-specification-1.2.html
+#
+# You are urged to become familiar with the specs.  They are short documents.
+#
+# This includes:
+#
+# * The Stomp version(s) you wish the broker to consider
+# * The broker vhost to connect to
+#
+# You may optionally specify other 1.1+ data:
+#
+# * heartbeat request
+#
+# Using the stomp gem, you should specify this data in the "connect_headers" 
Hash
+# parameter. This example uses the common get_connection() method to 
+# get a connection.
+#
+class ConnectionGetExample
+  # Initialize
+  def initialize
+  end
+  # Run example
+  def run
+    #
+    # Get a connection
+    # ================
+    #
+    conn = get_connection()
+    #
+    # Let's just do some sanity checks, and look around.
+    #
+    raise "Connection failed!!" unless conn.open?()
+    #
+    # The broker _could_ have returned an ERROR frame (unlikely).
+    #
+    raise "Connect error: #{conn.connection_frame.body}" if 
conn.connection_frame.command == Stomp::CMD_ERROR
+    #
+    puts "Connection complete."
+     #
+    # Get Destination
+    #
+    qname = dest()
+    nm = nmsgs()
+    puts
+    puts "Connection start receives"
+    #
+    # Receives
+    #
+    # Subscribe
+    #
+    uuid = conn.uuid() # uuid for Stomp::Connection is a public method
+    conn.subscribe(qname, {'id' => uuid}) # Subscribe
+    #
+    # Run gets
+    #
+    received = ""
+    1.upto(nm) do
+      received = conn.receive()
+      puts "Received headers: #{received.headers}"
+      puts "Received body: #{received.body}"
+    end
+    puts
+    received.headers.each do |h|
+      puts h
+    end
+    #
+    # And be polite, unsubscribe.
+    #
+    conn.unsubscribe(qname, {'id' => uuid})
+    #
+    # Finally disconnect
+    # ==================
+    #
+    conn.disconnect()   # Business as usual
+    puts "\nConnection disconnect complete"
+  end
+end
+#
+e = ConnectionGetExample.new()
+e.run
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/examples/conn_put.rb new/examples/conn_put.rb
--- old/examples/conn_put.rb    1970-01-01 01:00:00.000000000 +0100
+++ new/examples/conn_put.rb    2019-11-16 19:32:57.000000000 +0100
@@ -0,0 +1,111 @@
+# -*- encoding: utf-8 -*-
+
+#
+# The current require dance for different Ruby versions.
+# Change this to suit your requirements.
+#
+if Kernel.respond_to?(:require_relative)
+  require_relative("./stomp_common")
+else
+  $LOAD_PATH << File.dirname(__FILE__)
+  require "stomp_common"
+end
+include Stomp1xCommon
+
+#
+# == Stomp 1.x Putt / Get Example
+#
+# Purpose: to demonstrate producing and consuming messages using a
+# Stomp#Connection instance.
+#
+# Note: this example assumes that you have at least the 1.2.0 gem release
+# installed.
+#
+# When you:
+#
+# * Use a Stomp compliant broker
+# * Want a Stomp 1.1+ connection and functionality
+#
+# then your code *must* specifically request that environment.
+#
+# You need to supply all of the normal values expected of course:
+#
+# * login - the user name
+# * passcode - the password
+# * host - the host to connect to
+# * port - the port to connect to
+#
+# Additionaly you are required to supply the 1.1+ connection data as documented
+# in the Stomp 1.1+ specifications:
+#
+# http://stomp.github.com/stomp-specification-1.0.html
+# http://stomp.github.com/stomp-specification-1.1.html
+# http://stomp.github.com/stomp-specification-1.2.html
+#
+# You are urged to become familiar with the specs.  They are short documents.
+#
+# This includes:
+#
+# * The Stomp version(s) you wish the broker to consider
+# * The broker vhost to connect to
+#
+# You may optionally specify other 1.1+ data:
+#
+# * heartbeat request
+#
+# Using the stomp gem, you should specify this data in the "connect_headers" 
Hash
+# parameter. This example uses the common get_connection() method to 
+# get a connection.
+#
+class ConnectionPutExample
+  # Initialize
+  def initialize
+  end
+  # Run example
+  def run
+    #
+    # Get a connection
+    # ================
+    #
+    conn = get_connection()
+    #
+    # Let's just do some sanity checks, and look around.
+    #
+    raise "Connection failed!!" unless conn.open?()
+    #
+    # The broker _could_ have returned an ERROR frame (unlikely).
+    #
+    raise "Connect error: #{conn.connection_frame.body}" if 
conn.connection_frame.command == Stomp::CMD_ERROR
+    #
+    puts "Connection complete."
+     #
+    # Get Destination
+    #
+    qname = dest()
+    #
+    # Publish/put messages
+    #
+    puts "\nConnection start puts"
+    nm = nmsgs()
+    ph = {:persistent => true}
+    ph['suppress_content_length'] = 'yes' if suppresscl()
+    ph['K:A'] = 'V:A'
+    ph['K\B'] = 'V\B'
+    ph['K:C'] = 'V\C'
+    puts "Put Headers: #{ph}"
+    1.upto(nm) do |n|
+      data = "message payload: #{n} #{Time.now.to_f}"
+      conn.publish(qname, data, ph)
+      puts "Sent: #{data}"
+    end
+    #
+    # Finally disconnect
+    # ==================
+    #
+    conn.disconnect()   # Business as usual
+    puts "\nConnection disconnect complete"
+  end
+end
+#
+e = ConnectionPutExample.new()
+e.run
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/examples/conn_put_pace.rb 
new/examples/conn_put_pace.rb
--- old/examples/conn_put_pace.rb       1970-01-01 01:00:00.000000000 +0100
+++ new/examples/conn_put_pace.rb       2019-11-16 19:32:57.000000000 +0100
@@ -0,0 +1,117 @@
+# -*- encoding: utf-8 -*-
+
+#
+# The current require dance for different Ruby versions.
+# Change this to suit your requirements.
+#
+if Kernel.respond_to?(:require_relative)
+  require_relative("./stomp_common")
+else
+  $LOAD_PATH << File.dirname(__FILE__)
+  require "stomp_common"
+end
+include Stomp1xCommon
+
+#
+# == Stomp 1.x Putt / Get Example
+#
+# Purpose: to demonstrate producing and consuming messages using a
+# Stomp#Connection instance.
+#
+# Note: this example assumes that you have at least the 1.2.0 gem release
+# installed.
+#
+# When you:
+#
+# * Use a Stomp compliant broker
+# * Want a Stomp 1.1+ connection and functionality
+#
+# then your code *must* specifically request that environment.
+#
+# You need to supply all of the normal values expected of course:
+#
+# * login - the user name
+# * passcode - the password
+# * host - the host to connect to
+# * port - the port to connect to
+#
+# Additionaly you are required to supply the 1.1+ connection data as documented
+# in the Stomp 1.1+ specifications:
+#
+# http://stomp.github.com/stomp-specification-1.0.html
+# http://stomp.github.com/stomp-specification-1.1.html
+# http://stomp.github.com/stomp-specification-1.2.html
+#
+# You are urged to become familiar with the specs.  They are short documents.
+#
+# This includes:
+#
+# * The Stomp version(s) you wish the broker to consider
+# * The broker vhost to connect to
+#
+# You may optionally specify other 1.1+ data:
+#
+# * heartbeat request
+#
+# Using the stomp gem, you should specify this data in the "connect_headers" 
Hash
+# parameter. This example uses the common get_connection() method to 
+# get a connection.
+#
+class ConnectionPutExample
+  # Initialize
+  def initialize
+  end
+  # Run example
+  def run
+    #
+    # Get a connection
+    # ================
+    #
+    conn = get_connection()
+    #
+    # Let's just do some sanity checks, and look around.
+    #
+    raise "Connection failed!!" unless conn.open?()
+    #
+    # The broker _could_ have returned an ERROR frame (unlikely).
+    #
+    raise "Connect error: #{conn.connection_frame.body}" if 
conn.connection_frame.command == Stomp::CMD_ERROR
+    #
+    puts "Connection complete."
+     #
+    # Get Destination
+    #
+    qname = dest()
+    puts "Destination: #{qname}"
+    #
+    # Set Pace Time
+    #
+    pt = ENV['STOMP_PACETIME'] ? ENV['STOMP_PACETIME'].to_f : 15.0
+    puts "Pace Time: #{pt} seconds"
+    #
+    nm = nmsgs()
+    puts "Number of messages: #{nm}"
+    #
+    ph = {:persistent => true}
+    puts "Put Headers: #{ph}"
+    #
+    # Publish/put messages
+    #
+    puts "\nConnection start puts"
+    1.upto(nm) do |n|
+      data = "message payload: #{n} #{Time.now.to_f}"
+      conn.publish(qname, data, ph)
+      puts "Sent: #{data}"
+      sleep pt
+    end
+    #
+    # Finally disconnect
+    # ==================
+    #
+    conn.disconnect()   # Business as usual
+    puts "\nConnection disconnect complete"
+  end
+end
+#
+e = ConnectionPutExample.new()
+e.run
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/examples/conn_putget.rb new/examples/conn_putget.rb
--- old/examples/conn_putget.rb 2018-12-19 16:44:53.000000000 +0100
+++ new/examples/conn_putget.rb 2019-11-16 19:32:57.000000000 +0100
@@ -87,11 +87,18 @@
     #
     puts "\nConnection start puts"
     nm = nmsgs()
+    ph = {:persistent => true}
+    ph['suppress_content_length'] = 'yes' if suppresscl()
+    puts "Put Headers: #{ph}"
     1.upto(nm) do |n|
       data = "message payload: #{n} #{Time.now.to_f}"
-      conn.publish(qname, data)
+      conn.publish(qname, data, ph)
       puts "Sent: #{data}"
     end
+
+    #conn.disconnect()
+    #conn = get_connection()
+    
     puts
     puts "Connection start receives"
     # Receives
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/examples/examplogger.rb new/examples/examplogger.rb
--- old/examples/examplogger.rb 2018-12-19 16:44:53.000000000 +0100
+++ new/examples/examplogger.rb 2019-11-16 19:32:57.000000000 +0100
@@ -66,14 +66,7 @@
   def _init
     @log = Logger::new(STDOUT)         # User preference
     @log.level = Logger::DEBUG         # User preference
-  end
-
-  def marshal_dump
-    []
-  end
-
-  def marshal_load(array)
-    _init
+    @maxml = 100
   end
 
   # Log connecting events
@@ -98,6 +91,13 @@
   def on_connectfail(parms)
     begin
       @log.debug "Connect Fail #{info(parms)}"
+                       @log.debug parms
+                       @log.debug "Connect Fail Socket status: 
#{parms[:openstat]}"
+      if parms[:cur_failure]
+        @log.debug "Connect Fail Error Message: #{parms[:cur_failure].message}"
+                               btr = parms[:cur_failure].backtrace.join("\n")
+                               @log.debug "Backtrace CF: #{btr}"
+      end
     rescue
       @log.debug "Connect Fail oops"
     end
@@ -124,6 +124,19 @@
     begin
       @log.debug "Miscellaneous Error #{info(parms)}"
       @log.debug "Miscellaneous Error String #{errstr}"
+      @log.debug "Miscellaneous Error All Parms #{parms.inspect}"      
+                       if parms[:ssl_exception]
+                   @log.debug "SSL Miscellaneous Error Parms: 
#{parms[:ssl_exception]}"
+                   @log.debug "SSL Miscellaneous Error Message: 
#{parms[:ssl_exception].message}"
+                               btr = parms[:ssl_execption].backtrace.join("\n")
+                               @log.debug "Backtrace SME: #{btr}"
+                       end
+                       if parms[:cur_failure]
+                   @log.debug "SSL Miscellaneous Error Parms2: 
#{parms[:cur_failure]}"
+                   @log.debug "SSL Miscellaneous Error Message2: 
#{parms[:cur_failure].message}"
+                               btr = parms[:cur_failure].backtrace.join("\n")
+                               @log.debug "Backtrace SME2: #{btr}"
+                       end
     rescue
       @log.debug "Miscellaneous Error oops"
     end
@@ -163,8 +176,10 @@
   # Log Receive
   def on_receive(parms, result)
     begin
-      @log.debug "Receive Parms #{info(parms)}"
-      @log.debug "Receive Result #{result}"
+      @log.debug "Receive Message, Command: #{result.command}"
+      pl = result.body.length < @maxml ? result.body.length : @maxml
+      @log.debug "Receive Message, Body: #{result.body[0..pl]}"
+      @log.debug "Receive Message, Headers: #{result.headers}"
     rescue
       @log.debug "Receive oops"
     end
@@ -262,7 +277,13 @@
   def on_ssl_connectfail(parms)
     begin
       @log.debug "SSL Connect Fail Parms #{info(parms)}"
-      @log.debug "SSL Connect Fail Exception #{parms[:ssl_exception]}, 
#{parms[:ssl_exception].message}"
+                       if parms[:ssl_exception]
+                   @log.debug "SSL Connect Fail Exception Parms: 
#{parms[:ssl_exception]}"
+                   @log.debug "SSL Connect Fail Message: 
#{parms[:ssl_exception].message}"
+                               btr = parms[:ssl_exception].backtrace.join("\n")
+                               @log.debug "Backtrace SCF: #{btr}"
+                       end
+
     rescue
       @log.debug "SSL Connect Fail oops"
     end
@@ -278,6 +299,7 @@
     begin
       @log.debug "HeartBeat Fire Parms #{info(parms)}"
       @log.debug "HeartBeat Fire Send/Receive #{srind}"
+      @log.debug "HeartBeat Fire Firedata #{firedata.inspect}"
     rescue
       @log.debug "HeartBeat Fire oops"
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/examples/logexamp.rb new/examples/logexamp.rb
--- old/examples/logexamp.rb    2018-12-19 16:44:53.000000000 +0100
+++ new/examples/logexamp.rb    2019-11-16 19:32:57.000000000 +0100
@@ -40,6 +40,9 @@
     # 
//////////////////////////////////////////////////////////////////////////////
     # A hash type connect *MUST* be used to enable callback logging.
     # 
//////////////////////////////////////////////////////////////////////////////
+    # Note:  running this example will generate a number of connect failures,
+    # because of the fake host in this connect hash.
+    # 
//////////////////////////////////////////////////////////////////////////////
     hash = { :hosts => [
         {:login => user, :passcode => password, :host => 'noonehome', :port => 
2525,
           :ssl => so},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/examples/putget_file.rb new/examples/putget_file.rb
--- old/examples/putget_file.rb 2018-12-19 16:44:53.000000000 +0100
+++ new/examples/putget_file.rb 2019-11-16 19:32:57.000000000 +0100
@@ -38,7 +38,7 @@
     conn = get_connection()
     puts "pgf005: Qname is: #{@qname}"
     # Try to gracefully handle files that exceed broker size limits.
-    ph = {:presistent => true}
+    ph = {:persistent => true}
     ph['suppress_content_length'] = 'yes' if suppresscl()
     puts "pgf006: Headers are: #{ph.inspect}"
     begin
@@ -76,4 +76,4 @@
 #
 e = FilePutGet.new()
 e.doput()
-e.doget()
+# e.doget()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/examples/stomp_common.rb new/examples/stomp_common.rb
--- old/examples/stomp_common.rb        2018-12-19 16:44:53.000000000 +0100
+++ new/examples/stomp_common.rb        2019-11-16 19:32:57.000000000 +0100
@@ -55,6 +55,7 @@
       ],
       :connect_headers => conn_hdrs,
     }
+    conn_hash[:stompconn] = ENV["STOMP_USESTOMP"] ? true : false
     conn = Stomp::Connection.new(conn_hash)
   end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/client/utils.rb new/lib/client/utils.rb
--- old/lib/client/utils.rb     2018-12-19 16:44:53.000000000 +0100
+++ new/lib/client/utils.rb     2019-11-16 19:32:57.000000000 +0100
@@ -175,6 +175,7 @@
       @replay_messages_by_txn = {}
 
       @listener_map = Hash.new do |message|
+        @failure = nil
         unless @connection.slog(:on_miscerr, @connection.log_params, "Received 
unknown frame type: '#{message.command}'\n")
           warn "Received unknown frame type: '#{message.command}'\n"
         end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/connection/netio.rb new/lib/connection/netio.rb
--- old/lib/connection/netio.rb 2018-12-19 16:44:53.000000000 +0100
+++ new/lib/connection/netio.rb 2019-11-16 19:32:57.000000000 +0100
@@ -156,7 +156,8 @@
             raise sfex
           end
           #
-          if @protocol >= Stomp::SPL_11 && msg.command != Stomp::CMD_CONNECTED
+          # Always decode headers, even for 1.0. Issue #160.
+          if msg.command != Stomp::CMD_CONNECTED
             msg.headers = _decodeHeaders(msg.headers)
           end
           p [ "_receive_ends", msg.command, msg.headers ] if drdbg
@@ -227,9 +228,10 @@
         dtrdbg = ENV['DTRDBG'] ? true : false
         # p [ "wirewrite" ]
         # _dump_callstack()
-
+        p [ "_transmit_headers_in1", headers ] if dtrdbg
         if @protocol >= Stomp::SPL_11 && command != Stomp::CMD_CONNECT
           headers = _encodeHeaders(headers)
+          p [ "_transmit_headers_in2", headers ] if dtrdbg
         end
         @transmit_semaphore.synchronize do
           p [ "_transmit_lock", Thread::current() ] if dtrdbg
@@ -248,7 +250,9 @@
           # Lets send this header in the message, so it can maintain state 
when using unreceive
           headers[:'content-length'] = "#{body_length_bytes}" unless 
headers[:suppress_content_length]
           headers[:'content-type'] = "text/plain; charset=UTF-8" unless 
headers[:'content-type'] || headers[:suppress_content_type]
+          p [ "_transmit_command", command ] if dtrdbg
           _wire_write(used_socket,command)
+          p [ "_transmit_headers", headers ] if dtrdbg
           headers.each do |k,v|
             if v.is_a?(Array)
               v.each do |e|
@@ -258,8 +262,10 @@
               _wire_write(used_socket,"#{k}:#{v}")
             end
           end
+          p [ "_transmit_headers done" ] if dtrdbg
           _wire_write(used_socket,"")
           if body != ''
+            p [ "_transmit_body", body ] if dtrdbg
             if headers[:suppress_content_length]
               if tz = body.index("\00")
                 used_socket.write body[0..tz-1]
@@ -271,7 +277,8 @@
             end
           end
           used_socket.write "\0"
-          used_socket.flush if autoflush
+          # used_socket.flush if autoflush
+          used_socket.flush
 
           if @protocol >= Stomp::SPL_11
             @ls = Time.now.to_f if @hbs
@@ -321,6 +328,7 @@
       # open_ssl_socket opens an SSL socket.
       def open_ssl_socket()
         require 'openssl' unless defined?(OpenSSL)
+        ossdbg = ENV['OSSDBG'] ? true : false
         begin # Any raised SSL exceptions
           ctx = @sslctx_newparm ? 
OpenSSL::SSL::SSLContext.new(@sslctx_newparm) : OpenSSL::SSL::SSLContext.new
           ctx.verify_mode = OpenSSL::SSL::VERIFY_NONE # Assume for now
@@ -366,37 +374,66 @@
               end
               ctx.cert_store = truststores
             end
-
+            #
+            p [ "OSSL50", "old code starts" ] if ossdbg
+            usecert = nil
+            usekey = nil
             # Client authentication
             # If cert exists as a file, then it should not be input as text
-            raise Stomp::Error::SSLClientParamsError if [email protected]_file.nil? 
&& [email protected]_text.nil?
+            raise Stomp::Error::SSLClientParamsError if [email protected]_file.nil? &&
+              [email protected]_text.nil?
             # If cert exists as file, then key must exist, either as text or 
file
-            raise Stomp::Error::SSLClientParamsError if [email protected]_file.nil? 
&& @ssl.key_file.nil? && @ssl.key_text.nil?
+            raise Stomp::Error::SSLClientParamsError if [email protected]_file.nil? &&
+              @ssl.key_file.nil? && @ssl.key_text.nil?
             if @ssl.cert_file
               raise Stomp::Error::SSLNoCertFileError if 
!File::exists?(@ssl.cert_file)
               raise Stomp::Error::SSLUnreadableCertFileError if 
!File::readable?(@ssl.cert_file)
-              ctx.cert = 
OpenSSL::X509::Certificate.new(File.read(@ssl.cert_file))
+              p [ "OSSL51", "old code cert file read" ] if ossdbg
+              usecert = 
OpenSSL::X509::Certificate.new(File.read(@ssl.cert_file))
             end
-
             # If cert exists as file, then key must exist, either as text or 
file
-            raise Stomp::Error::SSLClientParamsError if [email protected]_text.nil? 
&& @ssl.key_file.nil? && @ssl.key_text.nil?
+            raise Stomp::Error::SSLClientParamsError if [email protected]_text.nil? &&
+              @ssl.key_file.nil? && @ssl.key_text.nil?
             if @ssl.cert_text
-              ctx.cert = OpenSSL::X509::Certificate.new(@ssl.cert_text)
+              p [ "OSSL52", "old code cert text get" ] if ossdbg
+              usecert = OpenSSL::X509::Certificate.new(@ssl.cert_text)
             end
 
             # If key exists as a text, then it should not be input as file
-            raise Stomp::Error::SSLClientParamsError if [email protected]_text.nil? && 
[email protected]_file.nil?
+            raise Stomp::Error::SSLClientParamsError if [email protected]_text.nil? &&
+              [email protected]_file.nil?
             if @ssl.key_file
               raise Stomp::Error::SSLNoKeyFileError if 
!File::exists?(@ssl.key_file)
               raise Stomp::Error::SSLUnreadableKeyFileError if 
!File::readable?(@ssl.key_file)
-              ctx.key  = OpenSSL::PKey::RSA.new(File.read(@ssl.key_file), 
@ssl.key_password)
+              p [ "OSSL53", "old code key file read" ] if ossdbg
+              usekey  = OpenSSL::PKey::RSA.new(File.read(@ssl.key_file), 
@ssl.key_password)
             end
 
             if @ssl.key_text
               nt = @ssl.key_text.gsub(/\t/, "")
-              ctx.key  = OpenSSL::PKey::RSA.new(nt, @ssl.key_password)
+              p [ "OSSL54", "old code key text get" ] if ossdbg
+              usekey  = OpenSSL::PKey::RSA.new(nt, @ssl.key_password)
             end
-
+            #
+            # This style of code because:  in newer Ruby versions the 'cert'
+            # and 'key' attributes are deprecated.  It is suggested that the
+            # 'add_certificate' method be used instead.
+            #
+            if ctx.respond_to?(:add_certificate)  # Newer Ruby version ??
+              p [ "OSSL55", "new code option", usecert, usekey ] if ossdbg
+              if !usecert.nil? && !usekey.nil?
+                p [ "OSSL55", "new code add_certificate" ] if ossdbg
+                ctx.add_certificate(usecert, usekey)
+              else
+                p [ "OSSL56", "new code SKIP add_certificate" ] if ossdbg
+              end
+            else
+              # Older Ruby versions
+              p [ "OSSL56", "old code option", usecert, usekey ] if ossdbg
+              ctx.cert = usecert
+              ctx.key = usekey
+            end
+            p [ "OSSL99", "old code ends" ] if ossdbg
             # Cipher list
             # As of this writing, there are numerous problems with supplying
             # cipher lists to jruby.  So we do not attempt to do that here.
@@ -457,8 +494,8 @@
             ssl.close
           end
           #
-          puts ex.backtrace
-          $stdout.flush
+          puts ex.backtrace if ossdbg
+          $stdout.flush if ossdbg
           raise # Reraise
         end
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/connection/utils.rb new/lib/connection/utils.rb
--- old/lib/connection/utils.rb 2018-12-19 16:44:53.000000000 +0100
+++ new/lib/connection/utils.rb 2019-11-16 19:32:57.000000000 +0100
@@ -252,6 +252,7 @@
           noiosel = (@ssl || @jruby) ? true : false
           return _receive(used_socket, connread, noiosel)
         rescue Stomp::Error::MaxReconnectAttempts
+          @failure = $!
           unless slog(:on_miscerr, log_params, "Reached MaxReconnectAttempts")
             $stderr.print "Reached MaxReconnectAttempts\n"
           end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/stomp/connection.rb new/lib/stomp/connection.rb
--- old/lib/stomp/connection.rb 2018-12-19 16:44:53.000000000 +0100
+++ new/lib/stomp/connection.rb 2019-11-16 19:32:57.000000000 +0100
@@ -492,6 +492,7 @@
       super_result = __old_receive()
       if super_result.nil? && @reliable && !closed?
         errstr = "connection.receive returning EOF as nil - resetting 
connection.\n"
+        @failure = nil
         unless slog(:on_miscerr, log_params, "es_recv: " + errstr)
           $stderr.print errstr
         end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/stomp/version.rb new/lib/stomp/version.rb
--- old/lib/stomp/version.rb    2018-12-19 16:44:53.000000000 +0100
+++ new/lib/stomp/version.rb    2019-11-16 19:32:57.000000000 +0100
@@ -6,7 +6,7 @@
   module Version  #:nodoc: all
     MAJOR = 1
     MINOR = 4
-    PATCH = 8
+    PATCH = 9
     # PATCH = "8.plvl.001"
     STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2018-12-19 16:44:53.000000000 +0100
+++ new/metadata        2019-11-16 19:32:57.000000000 +0100
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: stomp
 version: !ruby/object:Gem::Version
-  version: 1.4.8
+  version: 1.4.9
 platform: ruby
 authors:
 - Brian McCallister
@@ -11,7 +11,7 @@
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2018-12-19 00:00:00.000000000 Z
+date: 2019-11-16 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: rspec
@@ -69,6 +69,9 @@
 - examples/client_conndisc.rb
 - examples/client_putget.rb
 - examples/conn_conndisc.rb
+- examples/conn_get.rb
+- examples/conn_put.rb
+- examples/conn_put_pace.rb
 - examples/conn_putget.rb
 - examples/contrib.sh
 - examples/contributors.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stomp.gemspec new/stomp.gemspec
--- old/stomp.gemspec   2018-12-19 16:44:54.000000000 +0100
+++ new/stomp.gemspec   2019-11-16 19:32:57.000000000 +0100
@@ -2,16 +2,16 @@
 # DO NOT EDIT THIS FILE DIRECTLY
 # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
 # -*- encoding: utf-8 -*-
-# stub: stomp 1.4.8 ruby lib
+# stub: stomp 1.4.9 ruby lib
 
 Gem::Specification.new do |s|
   s.name = "stomp".freeze
-  s.version = "1.4.8"
+  s.version = "1.4.9"
 
   s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if 
s.respond_to? :required_rubygems_version=
   s.require_paths = ["lib".freeze]
   s.authors = ["Brian McCallister".freeze, "Marius Mathiesen".freeze, "Thiago 
Morello".freeze, "Guy M. Allard".freeze]
-  s.date = "2018-12-19"
+  s.date = "2019-11-16"
   s.description = "Ruby client for the Stomp messaging protocol.".freeze
   s.email = ["[email protected]".freeze, "[email protected]".freeze, 
"[email protected]".freeze, "[email protected]".freeze]
   s.executables = ["catstomp".freeze, "stompcat".freeze]
@@ -42,6 +42,9 @@
     "examples/client_conndisc.rb",
     "examples/client_putget.rb",
     "examples/conn_conndisc.rb",
+    "examples/conn_get.rb",
+    "examples/conn_put.rb",
+    "examples/conn_put_pace.rb",
     "examples/conn_putget.rb",
     "examples/contrib.sh",
     "examples/contributors.rb",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/test_anonymous.rb new/test/test_anonymous.rb
--- old/test/test_anonymous.rb  2018-12-19 16:44:54.000000000 +0100
+++ new/test/test_anonymous.rb  2019-11-16 19:32:57.000000000 +0100
@@ -84,7 +84,9 @@
     p [ "01", mn, "starts" ] if @tandbg
     conn_subscribe make_destination, :receipt => "abc"
     msg = @conn.receive
-    assert_equal "abc", msg.headers['receipt-id']
+    tval = msg.headers['receipt-id']
+    tval = msg.headers['receipt-id'][0] if 
msg.headers['receipt-id'].is_a?(Array)
+    assert_equal "abc", tval
     checkEmsg(@conn)
     p [ "99", mn, "ends" ] if @tandbg
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/test_connection.rb new/test/test_connection.rb
--- old/test/test_connection.rb 2018-12-19 16:44:54.000000000 +0100
+++ new/test/test_connection.rb 2019-11-16 19:32:57.000000000 +0100
@@ -82,9 +82,14 @@
   def test_receipt
     mn = "test_receipt" if @tcndbg
     p [ "01", mn, "starts" ] if @tcndbg
+    p [ "02", @conn.protocol ] if @tcndbg
     conn_subscribe make_destination, :receipt => "abc"
     msg = @conn.receive
-    assert_equal "abc", msg.headers['receipt-id']
+    p [ "05", msg.headers['receipt-id'].class,  
msg.headers['receipt-id'].is_a?(Array) ]  if @tcndbg
+    #
+    tval = msg.headers['receipt-id']
+    tval = msg.headers['receipt-id'][0] if 
msg.headers['receipt-id'].is_a?(Array)
+    assert_equal "abc", tval
     checkEmsg(@conn)
     p [ "99", mn, "ends" ] if @tcndbg
   end


Reply via email to