Hello community,

here is the log from the commit of package rubygem-websocket-driver for 
openSUSE:Factory checked in at 2020-05-28 09:19:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-websocket-driver (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-websocket-driver.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-websocket-driver"

Thu May 28 09:19:15 2020 rev:5 rq:809525 version:0.7.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/rubygem-websocket-driver/rubygem-websocket-driver.changes
        2019-06-30 10:22:32.631717373 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-websocket-driver.new.3606/rubygem-websocket-driver.changes
      2020-05-28 09:19:18.109206893 +0200
@@ -1,0 +2,8 @@
+Wed May 27 11:23:40 UTC 2020 - Manuel Schnitzer <[email protected]>
+
+- updated to version 0.7.2
+
+  * Emit `ping` and `pong` events from the `Server` driver
+  * Handle draft-76 handshakes correctly if the request's body is a frozen 
string
+
+-------------------------------------------------------------------

Old:
----
  websocket-driver-0.7.1.gem

New:
----
  websocket-driver-0.7.2.gem

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

Other differences:
------------------
++++++ rubygem-websocket-driver.spec ++++++
--- /var/tmp/diff_new_pack.ydI0df/_old  2020-05-28 09:19:18.905208351 +0200
+++ /var/tmp/diff_new_pack.ydI0df/_new  2020-05-28 09:19:18.909208358 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-websocket-driver
 #
-# 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-websocket-driver
-Version:        0.7.1
+Version:        0.7.2
 Release:        0
 %define mod_name websocket-driver
 %define mod_full_name %{mod_name}-%{version}
@@ -33,7 +33,7 @@
 BuildRequires:  %{rubygem gem2rpm}
 BuildRequires:  %{rubygem rdoc > 3.10}
 BuildRequires:  ruby-macros >= 5
-Url:            https://github.com/faye/websocket-driver-ruby
+URL:            https://github.com/faye/websocket-driver-ruby
 Source:         https://rubygems.org/gems/%{mod_full_name}.gem
 Source1:        gem2rpm.yml
 Summary:        WebSocket protocol handler with pluggable I/O

++++++ websocket-driver-0.7.1.gem -> websocket-driver-0.7.2.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    2019-06-10 13:40:12.000000000 +0200
+++ new/CHANGELOG.md    2020-05-22 17:07:46.000000000 +0200
@@ -1,3 +1,8 @@
+### 0.7.2 / 2020-05-22
+
+- Emit `ping` and `pong` events from the `Server` driver
+- Handle draft-76 handshakes correctly if the request's body is a frozen string
+
 ### 0.7.1 / 2019-06-10
 
 - Catch any exceptions produced while generating a handshake response and send 
a
@@ -5,6 +10,7 @@
 - Pick the RFC-6455 protocol version if the request contains any of the headers
   used by that version
 - Handle errors encountered while handling malformed draft-76 requests
+- Change license from MIT to Apache 2.0
 
 ### 0.7.0 / 2017-09-11
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LICENSE.md new/LICENSE.md
--- old/LICENSE.md      2019-06-10 13:40:12.000000000 +0200
+++ new/LICENSE.md      2020-05-22 17:07:46.000000000 +0200
@@ -1,4 +1,4 @@
-Copyright 2010-2019 James Coglan
+Copyright 2010-2020 James Coglan
 
 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
 this file except in compliance with the License. You may obtain a copy of the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2019-06-10 13:40:12.000000000 +0200
+++ new/README.md       2020-05-22 17:07:46.000000000 +0200
@@ -274,33 +274,33 @@
 be sent over the socket, they will give this to you by calling
 `socket.write(string)`.
 
-#### `driver.on :open, -> (event) { }`
+#### `driver.on :open, -> (event) {}`
 
 Adds a callback block to execute when the socket becomes open.
 
-#### `driver.on :message, -> (event) { }`
+#### `driver.on :message, -> (event) {}`
 
 Adds a callback block to execute when a message is received. `event` will have 
a
 `data` attribute containing either a string in the case of a text message or an
 array of integers in the case of a binary message.
 
-#### `driver.on :error, -> (event) { }`
+#### `driver.on :error, -> (event) {}`
 
 Adds a callback to execute when a protocol error occurs due to the other peer
 sending an invalid byte sequence. `event` will have a `message` attribute
 describing the error.
 
-#### `driver.on :close, -> (event) { }`
+#### `driver.on :close, -> (event) {}`
 
 Adds a callback block to execute when the socket becomes closed. The `event`
 object has `code` and `reason` attributes.
 
-#### `driver.on :ping, -> (event) { }`
+#### `driver.on :ping, -> (event) {}`
 
 Adds a callback block to execute when a ping is received. You do not need to
 handle this by sending a pong frame yourself; the driver handles this for you.
 
-#### `driver.on :pong, -> (event) { }`
+#### `driver.on :pong, -> (event) {}`
 
 Adds a callback block to execute when a pong is received. If this was in
 response to a ping you sent, you can also handle this event via the
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/driver/client.rb 
new/lib/websocket/driver/client.rb
--- old/lib/websocket/driver/client.rb  2019-06-10 13:40:12.000000000 +0200
+++ new/lib/websocket/driver/client.rb  2020-05-22 17:07:46.000000000 +0200
@@ -20,10 +20,10 @@
 
         uri = URI.parse(@socket.url)
         unless VALID_SCHEMES.include?(uri.scheme)
-          raise URIError, "#{socket.url} is not a valid WebSocket URL"
+          raise URIError, "#{ socket.url } is not a valid WebSocket URL"
         end
 
-        host      = uri.host + (uri.port ? ":#{uri.port}" : '')
+        host      = uri.host + (uri.port ? ":#{ uri.port }" : '')
         path      = (uri.path == '') ? '/' : uri.path
         @pathname = path + (uri.query ? '?' + uri.query : '')
 
@@ -44,7 +44,7 @@
       end
 
       def version
-        "hybi-#{VERSION}"
+        "hybi-#{ VERSION }"
       end
 
       def proxy(origin, options = {})
@@ -73,19 +73,19 @@
         parse(@http.body)
       end
 
-    private 
+    private
 
       def handshake_request
         extensions = @extensions.generate_offer
         @headers['Sec-WebSocket-Extensions'] = extensions if extensions
 
-        start   = "GET #{@pathname} HTTP/1.1"
+        start   = "GET #{ @pathname } HTTP/1.1"
         headers = [start, @headers.to_s, '']
         headers.join("\r\n")
       end
 
       def fail_handshake(message)
-        message = "Error during WebSocket handshake: #{message}"
+        message = "Error during WebSocket handshake: #{ message }"
         @ready_state = 3
         emit(:error, ProtocolError.new(message))
         emit(:close, CloseEvent.new(ERRORS[:protocol_error], message))
@@ -96,7 +96,7 @@
         @headers = Headers.new(@http.headers)
 
         unless @http.code == 101
-          return fail_handshake("Unexpected response code: #{@http.code}")
+          return fail_handshake("Unexpected response code: #{ @http.code }")
         end
 
         upgrade    = @http['Upgrade'] || ''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/driver/draft76.rb 
new/lib/websocket/driver/draft76.rb
--- old/lib/websocket/driver/draft76.rb 2019-06-10 13:40:12.000000000 +0200
+++ new/lib/websocket/driver/draft76.rb 2020-05-22 17:07:46.000000000 +0200
@@ -6,9 +6,10 @@
 
       def initialize(socket, options = {})
         super
-        input  = @socket.env['rack.input']
+        input  = (@socket.env['rack.input'] || StringIO.new('')).read
+        input  = input.dup if input.frozen?
         @stage = -1
-        @body  = (input ? input.read : String.new('')).force_encoding(BINARY)
+        @body  = input.force_encoding(BINARY)
 
         @headers.clear
         @headers['Upgrade'] = 'WebSocket'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/driver/headers.rb 
new/lib/websocket/driver/headers.rb
--- old/lib/websocket/driver/headers.rb 2019-06-10 13:40:12.000000000 +0200
+++ new/lib/websocket/driver/headers.rb 2020-05-22 17:07:46.000000000 +0200
@@ -25,7 +25,7 @@
         return if value.nil?
         key = HTTP.normalize_header(name)
         return unless @sent.add?(key) or ALLOWED_DUPLICATES.include?(key)
-        @lines << "#{name.strip}: #{value.to_s.strip}\r\n"
+        @lines << "#{ name.strip }: #{ value.to_s.strip }\r\n"
       end
 
       def inspect
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/driver/hybi.rb 
new/lib/websocket/driver/hybi.rb
--- old/lib/websocket/driver/hybi.rb    2019-06-10 13:40:12.000000000 +0200
+++ new/lib/websocket/driver/hybi.rb    2020-05-22 17:07:46.000000000 +0200
@@ -52,7 +52,7 @@
       MIN_RESERVED_ERROR = 3000
       MAX_RESERVED_ERROR = 4999
 
-      PACK_FORMATS = {2 => 'n', 8 => 'Q>'}
+      PACK_FORMATS = { 2 => 'n', 8 => 'Q>' }
 
       def initialize(socket, options = {})
         super
@@ -78,7 +78,7 @@
       end
 
       def version
-        "hybi-#{VERSION}"
+        "hybi-#{ VERSION }"
       end
 
       def add_extension(extension)
@@ -228,7 +228,7 @@
         version = @socket.env['HTTP_SEC_WEBSOCKET_VERSION']
 
         unless version == VERSION
-          raise ProtocolError.new("Unsupported WebSocket version: #{VERSION}")
+          raise ProtocolError.new("Unsupported WebSocket version: #{ VERSION 
}")
         end
 
         unless sec_key
@@ -281,17 +281,17 @@
 
         unless @extensions.valid_frame_rsv?(@frame)
           return fail(:protocol_error,
-              "One or more reserved bits are on: reserved1 = #{@frame.rsv1 ? 1 
: 0}" +
-              ", reserved2 = #{@frame.rsv2 ? 1 : 0 }" +
-              ", reserved3 = #{@frame.rsv3 ? 1 : 0 }")
+              "One or more reserved bits are on: reserved1 = #{ @frame.rsv1 ? 
1 : 0 }" +
+              ", reserved2 = #{ @frame.rsv2 ? 1 : 0 }" +
+              ", reserved3 = #{ @frame.rsv3 ? 1 : 0 }")
         end
 
         unless OPCODES.values.include?(@frame.opcode)
-          return fail(:protocol_error, "Unrecognized frame opcode: 
#{@frame.opcode}")
+          return fail(:protocol_error, "Unrecognized frame opcode: #{ 
@frame.opcode }")
         end
 
         unless MESSAGE_OPCODES.include?(@frame.opcode) or @frame.final
-          return fail(:protocol_error, "Received fragmented control frame: 
opcode = #{@frame.opcode}")
+          return fail(:protocol_error, "Received fragmented control frame: 
opcode = #{ @frame.opcode }")
         end
 
         if @message and OPENING_OPCODES.include?(@frame.opcode)
@@ -321,7 +321,7 @@
         @stage = @frame.masked ? 3 : 4
 
         unless MESSAGE_OPCODES.include?(@frame.opcode) or @frame.length <= 125
-          return fail(:protocol_error, "Received control frame having too long 
payload: #{@frame.length}")
+          return fail(:protocol_error, "Received control frame having too long 
payload: #{ @frame.length }")
         end
 
         return unless check_frame_length
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/driver/proxy.rb 
new/lib/websocket/driver/proxy.rb
--- old/lib/websocket/driver/proxy.rb   2019-06-10 13:40:12.000000000 +0200
+++ new/lib/websocket/driver/proxy.rb   2020-05-22 17:07:46.000000000 +0200
@@ -4,7 +4,7 @@
     class Proxy
       include EventEmitter
 
-      PORTS = {'ws' => 80, 'wss' => 443}
+      PORTS = { 'ws' => 80, 'wss' => 443 }
 
       attr_reader :status, :headers
 
@@ -20,7 +20,7 @@
         @state   = 0
 
         @headers = Headers.new
-        @headers['Host'] = @origin.host + (@origin.port ? ":#{@origin.port}" : 
'')
+        @headers['Host'] = @origin.host + (@origin.port ? ":#{ @origin.port }" 
: '')
         @headers['Connection'] = 'keep-alive'
         @headers['Proxy-Connection'] = 'keep-alive'
 
@@ -41,7 +41,7 @@
         @state = 1
 
         port    = @origin.port || PORTS[@origin.scheme]
-        start   = "CONNECT #{@origin.host}:#{port} HTTP/1.1"
+        start   = "CONNECT #{ @origin.host }:#{ port } HTTP/1.1"
         headers = [start, @headers.to_s, '']
 
         @socket.write(headers.join("\r\n"))
@@ -58,7 +58,7 @@
         if @status == 200
           emit(:connect, ConnectEvent.new)
         else
-          message = "Can't establish a connection to the server at 
#{@socket.url}"
+          message = "Can't establish a connection to the server at #{ 
@socket.url }"
           emit(:error, ProtocolError.new(message))
         end
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/driver/server.rb 
new/lib/websocket/driver/server.rb
--- old/lib/websocket/driver/server.rb  2019-06-10 13:40:12.000000000 +0200
+++ new/lib/websocket/driver/server.rb  2020-05-22 17:07:46.000000000 +0200
@@ -2,7 +2,7 @@
   class Driver
 
     class Server < Driver
-      EVENTS = %w[open message error close]
+      EVENTS = %w[open message error close ping pong]
 
       def initialize(socket, options = {})
         super
@@ -17,9 +17,9 @@
       def url
         return nil unless e = env
 
-        url  = "ws://#{e['HTTP_HOST']}"
+        url  = "ws://#{ e['HTTP_HOST'] }"
         url << e['PATH_INFO']
-        url << "?#{e['QUERY_STRING']}" unless e['QUERY_STRING'] == ''
+        url << "?#{ e['QUERY_STRING'] }" unless e['QUERY_STRING'] == ''
         url
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/driver.rb new/lib/websocket/driver.rb
--- old/lib/websocket/driver.rb 2019-06-10 13:40:12.000000000 +0200
+++ new/lib/websocket/driver.rb 2020-05-22 17:07:46.000000000 +0200
@@ -215,7 +215,7 @@
     def self.validate_options(options, valid_keys)
       options.keys.each do |key|
         unless valid_keys.include?(key)
-          raise ConfigurationError, "Unrecognized option: #{key.inspect}"
+          raise ConfigurationError, "Unrecognized option: #{ key.inspect }"
         end
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/http/request.rb 
new/lib/websocket/http/request.rb
--- old/lib/websocket/http/request.rb   2019-06-10 13:40:12.000000000 +0200
+++ new/lib/websocket/http/request.rb   2020-05-22 17:07:46.000000000 +0200
@@ -30,11 +30,11 @@
         super
         @headers.each do |name, value|
           rack_name = name.upcase.gsub(/-/, '_')
-          rack_name = "HTTP_#{rack_name}" unless 
RESERVED_HEADERS.include?(name)
+          rack_name = "HTTP_#{ rack_name }" unless 
RESERVED_HEADERS.include?(name)
           @env[rack_name] = value
         end
         if host = @env['HTTP_HOST']
-          uri = URI.parse("http://#{host}";)
+          uri = URI.parse("http://#{ host }")
           @env['SERVER_NAME'] = uri.host
           @env['SERVER_PORT'] = uri.port.to_s
         end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2019-06-10 13:40:12.000000000 +0200
+++ new/metadata        2020-05-22 17:07:46.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: websocket-driver
 version: !ruby/object:Gem::Version
-  version: 0.7.1
+  version: 0.7.2
 platform: ruby
 authors:
 - James Coglan
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2019-06-10 00:00:00.000000000 Z
+date: 2020-05-22 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: websocket-extensions
@@ -135,7 +135,7 @@
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubygems_version: 3.0.3
+rubygems_version: 3.1.2
 signing_key: 
 specification_version: 4
 summary: WebSocket protocol handler with pluggable I/O


Reply via email to