Hello community,

here is the log from the commit of package rubygem-websocket for 
openSUSE:Factory checked in at 2018-03-06 10:46:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-websocket (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-websocket.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-websocket"

Tue Mar  6 10:46:32 2018 rev:15 rq:581515 version:1.2.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-websocket/rubygem-websocket.changes      
2017-04-11 09:31:40.271435049 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-websocket.new/rubygem-websocket.changes 
2018-03-06 10:46:33.765855965 +0100
@@ -1,0 +2,10 @@
+Tue Feb 27 05:40:41 UTC 2018 - factory-a...@kulow.org
+
+- updated to version 1.2.5
+ see installed CHANGELOG.md
+
+  ## 1.2.5
+  
+  - make handshake server resilient to non-string Rack env keys
+
+-------------------------------------------------------------------

Old:
----
  websocket-1.2.4.gem

New:
----
  websocket-1.2.5.gem

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

Other differences:
------------------
++++++ rubygem-websocket.spec ++++++
--- /var/tmp/diff_new_pack.kVusrj/_old  2018-03-06 10:46:34.313836170 +0100
+++ /var/tmp/diff_new_pack.kVusrj/_new  2018-03-06 10:46:34.313836170 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-websocket
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,16 +24,16 @@
 #
 
 Name:           rubygem-websocket
-Version:        1.2.4
+Version:        1.2.5
 Release:        0
 %define mod_name websocket
 %define mod_full_name %{mod_name}-%{version}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+BuildRequires:  %{ruby >= 2.0}
 BuildRequires:  %{rubygem gem2rpm}
-BuildRequires:  %{ruby}
 BuildRequires:  ruby-macros >= 5
 Url:            http://github.com/imanel/websocket-ruby
-Source:         http://rubygems.org/gems/%{mod_full_name}.gem
+Source:         https://rubygems.org/gems/%{mod_full_name}.gem
 Source1:        gem2rpm.yml
 Summary:        Universal Ruby library to handle WebSocket protocol
 License:        MIT

++++++ websocket-1.2.4.gem -> websocket-1.2.5.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.codeclimate.yml new/.codeclimate.yml
--- old/.codeclimate.yml        1970-01-01 01:00:00.000000000 +0100
+++ new/.codeclimate.yml        2017-11-14 21:47:49.000000000 +0100
@@ -0,0 +1,16 @@
+---
+engines:
+  duplication:
+    enabled: true
+    config:
+      languages:
+      - ruby
+  fixme:
+    enabled: true
+  rubocop:
+    enabled: true
+ratings:
+  paths:
+  - "**.rb"
+exclude_paths:
+- spec/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.rubocop.yml new/.rubocop.yml
--- old/.rubocop.yml    2017-01-31 19:34:39.000000000 +0100
+++ new/.rubocop.yml    2017-11-14 21:47:49.000000000 +0100
@@ -1,5 +1,8 @@
+require: rubocop-rspec
+
 AllCops:
   DisplayCopNames: true
+  TargetRubyVersion: 2.1
 
 # Target: 15
 Metrics/AbcSize:
@@ -37,8 +40,20 @@
     - lib/websocket/frame/handler/handler75.rb
     - spec/support/handshake_requests.rb
 
-Style/Documentation:
+RSpec/DescribeClass:
+  Enabled: false
+
+RSpec/ExampleLength:
+  Enabled: false
+
+RSpec/InstanceVariable:
   Enabled: false
 
-Style/TrivialAccessors:
-  AllowPredicates: true
+RSpec/MultipleExpectations:
+  Enabled: false
+
+RSpec/NamedSubject:
+  Enabled: false
+
+Style/Documentation:
+  Enabled: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.travis.yml new/.travis.yml
--- old/.travis.yml     2017-01-31 19:34:39.000000000 +0100
+++ new/.travis.yml     2017-11-14 21:47:49.000000000 +0100
@@ -1,23 +1,21 @@
+dist: trusty
 language: ruby
 script: "bundle exec rake"
 rvm:
-  - 1.9.3
-  - 2.0
   - 2.1
   - 2.2
   - 2.3
+  - 2.4
   - ruby-head
-  - jruby
+  - jruby-9.1.9.0 # https://github.com/travis-ci/travis-ci/issues/8446
   - jruby-head
-  - rbx
-  - rbx-head
+  - rbx-3
 
 matrix:
   allow_failures:
     - rvm: ruby-head
     - rvm: jruby-head
-    - rvm: rbx
-    - rvm: rbx-head
+    - rvm: rbx-3
 
 before_install:
-  - gem install bundler
+  - gem update bundler
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    2017-01-31 19:34:39.000000000 +0100
+++ new/CHANGELOG.md    2017-11-14 21:47:49.000000000 +0100
@@ -1,5 +1,9 @@
 # Changelog
 
+## 1.2.5
+
+- make handshake server resilient to non-string Rack env keys
+
 ## 1.2.4
 
 - add subprotocol handling for both server and client
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Gemfile new/Gemfile
--- old/Gemfile 2017-01-31 19:34:39.000000000 +0100
+++ new/Gemfile 2017-11-14 21:47:49.000000000 +0100
@@ -1,3 +1,13 @@
 source 'http://rubygems.org'
 
+group :development do
+  gem 'rake'
+  gem 'rspec', '~> 3.0'
+
+  # Use same version as Code Climate for consistency with CI
+  # https://github.com/codeclimate/codeclimate-rubocop/blob/master/Gemfile.lock
+  gem 'rubocop', '0.46.0', require: false
+  gem 'rubocop-rspec', '1.8.0', require: false
+end
+
 gemspec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2017-01-31 19:34:39.000000000 +0100
+++ new/README.md       2017-11-14 21:47:49.000000000 +0100
@@ -4,8 +4,8 @@
 
 [![Gem 
Version](https://badge.fury.io/rb/websocket.svg)](http://badge.fury.io/rb/websocket)
 [![Gem 
Downloads](https://img.shields.io/gem/dt/websocket.svg?maxAge=2592000)](https://rubygems.org/gems/websocket)
-[![Travis 
CI](https://travis-ci.org/imanel/websocket-ruby.png)](http://travis-ci.org/imanel/websocket-ruby)
-[![Code 
Climate](https://codeclimate.com/github/imanel/websocket-ruby.png)](https://codeclimate.com/github/imanel/websocket-ruby)
+[![Travis 
CI](https://travis-ci.org/imanel/websocket-ruby.svg)](http://travis-ci.org/imanel/websocket-ruby)
+[![Code 
Climate](https://codeclimate.com/github/imanel/websocket-ruby.svg)](https://codeclimate.com/github/imanel/websocket-ruby)
 
 **Autobahn tests:** 
[server](http://imanel.github.com/websocket-ruby/autobahn/server/), 
[client](http://imanel.github.com/websocket-ruby/autobahn/client/)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Rakefile new/Rakefile
--- old/Rakefile        2017-01-31 19:34:39.000000000 +0100
+++ new/Rakefile        2017-11-14 21:47:49.000000000 +0100
@@ -11,7 +11,7 @@
 
 RuboCop::RakeTask.new
 
-task default: [:spec, :rubocop]
+task default: %i(spec rubocop)
 
 namespace :autobahn do
   desc 'Run autobahn tests for client'
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/frame/base.rb 
new/lib/websocket/frame/base.rb
--- old/lib/websocket/frame/base.rb     2017-01-31 19:34:39.000000000 +0100
+++ new/lib/websocket/frame/base.rb     2017-11-14 21:47:49.000000000 +0100
@@ -3,6 +3,7 @@
     # @abstract Subclass and override to implement custom frames
     class Base
       include ExceptionHandler
+      include NiceInspect
 
       attr_reader :type, :version, :error
       attr_accessor :data, :code
@@ -39,13 +40,6 @@
         raise NotImplementedError
       end
 
-      # Recreate inspect as #to_s was overwritten
-      def inspect
-        vars = instance_variables.map { |v| 
"#{v}=#{instance_variable_get(v).inspect}" }.join(', ')
-        insp = Kernel.format("#{self.class}:0x%08x", __id__)
-        "<#{insp} #{vars}>"
-      end
-
       private
 
       # Include set of methods for selected protocol version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/frame/handler/base.rb 
new/lib/websocket/frame/handler/base.rb
--- old/lib/websocket/frame/handler/base.rb     2017-01-31 19:34:39.000000000 
+0100
+++ new/lib/websocket/frame/handler/base.rb     2017-11-14 21:47:49.000000000 
+0100
@@ -24,14 +24,14 @@
         # @param [Symbol] frame_type Frame type
         # @return [Boolean] True if given frame type is control frame
         def control_frame?(frame_type)
-          ![:text, :binary, :continuation].include?(frame_type)
+          !%i(text binary continuation).include?(frame_type)
         end
 
         # Check if frame is one of data frames
         # @param [Symbol] frame_type Frame type
         # @return [Boolean] True if given frame type is data frame
         def data_frame?(frame_type)
-          [:text, :binary].include?(frame_type)
+          %i(text binary).include?(frame_type)
         end
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/frame/handler/handler03.rb 
new/lib/websocket/frame/handler/handler03.rb
--- old/lib/websocket/frame/handler/handler03.rb        2017-01-31 
19:34:39.000000000 +0100
+++ new/lib/websocket/frame/handler/handler03.rb        2017-11-14 
21:47:49.000000000 +0100
@@ -1,4 +1,5 @@
 # encoding: binary
+
 require 'securerandom'
 
 module WebSocket
@@ -20,7 +21,7 @@
 
         # @see WebSocket::Frame::Base#supported_frames
         def supported_frames
-          [:text, :binary, :close, :ping, :pong]
+          %i(text binary close ping pong)
         end
 
         # @see WebSocket::Frame::Handler::Base#encode_frame
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/frame/handler/handler75.rb 
new/lib/websocket/frame/handler/handler75.rb
--- old/lib/websocket/frame/handler/handler75.rb        2017-01-31 
19:34:39.000000000 +0100
+++ new/lib/websocket/frame/handler/handler75.rb        2017-11-14 
21:47:49.000000000 +0100
@@ -6,7 +6,7 @@
       class Handler75 < Base
         # @see WebSocket::Frame::Base#supported_frames
         def supported_frames
-          [:text, :close]
+          %i(text close)
         end
 
         # @see WebSocket::Frame::Handler::Base#encode_frame
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/handshake/base.rb 
new/lib/websocket/handshake/base.rb
--- old/lib/websocket/handshake/base.rb 2017-01-31 19:34:39.000000000 +0100
+++ new/lib/websocket/handshake/base.rb 2017-11-14 21:47:49.000000000 +0100
@@ -3,6 +3,7 @@
     # @abstract Subclass and override to implement custom handshakes
     class Base
       include ExceptionHandler
+      include NiceInspect
 
       attr_reader :host, :port, :path, :query,
                   :state, :version, :secure,
@@ -32,13 +33,6 @@
       end
       rescue_method :to_s, return: ''
 
-      # Recreate inspect as #to_s was overwritten
-      def inspect
-        vars = instance_variables.map { |v| 
"#{v}=#{instance_variable_get(v).inspect}" }.join(', ')
-        insp = Kernel.format("#{self.class}:0x%08x", __id__)
-        "<#{insp} #{vars}>"
-      end
-
       # Is parsing of data finished?
       # @return [Boolena] True if request was completely parsed or error 
occured. False otherwise
       def finished?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/handshake/handler/client.rb 
new/lib/websocket/handshake/handler/client.rb
--- old/lib/websocket/handshake/handler/client.rb       2017-01-31 
19:34:39.000000000 +0100
+++ new/lib/websocket/handshake/handler/client.rb       2017-11-14 
21:47:49.000000000 +0100
@@ -15,6 +15,15 @@
         def handshake_keys
           super + @handshake.headers.to_a
         end
+
+        # Verify if received header matches with one of the sent ones
+        # @return [Boolean] True if matching. False otherwise(appropriate 
error is set)
+        def verify_protocol
+          return true if supported_protocols.empty?
+          protos = provided_protocols & supported_protocols
+          raise WebSocket::Error::Handshake::UnsupportedProtocol if 
protos.empty?
+          true
+        end
       end
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/handshake/handler/client04.rb 
new/lib/websocket/handshake/handler/client04.rb
--- old/lib/websocket/handshake/handler/client04.rb     2017-01-31 
19:34:39.000000000 +0100
+++ new/lib/websocket/handshake/handler/client04.rb     2017-11-14 
21:47:49.000000000 +0100
@@ -48,13 +48,12 @@
           true
         end
 
-        # Verify if received header Sec-WebSocket-Protocol matches with one of 
the sent ones
-        # @return [Boolean] True if matching. False otherwise(appropriate 
error is set)
-        def verify_protocol
-          return true if @handshake.protocols.empty?
-          protos = @handshake.headers['sec-websocket-protocol'].split(/ *, */) 
& @handshake.protocols
-          raise WebSocket::Error::Handshake::UnsupportedProtocol if 
protos.empty?
-          true
+        def supported_protocols
+          @handshake.protocols
+        end
+
+        def provided_protocols
+          @handshake.headers['sec-websocket-protocol'].to_s.split(/ *, */)
         end
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/handshake/handler/client75.rb 
new/lib/websocket/handshake/handler/client75.rb
--- old/lib/websocket/handshake/handler/client75.rb     2017-01-31 
19:34:39.000000000 +0100
+++ new/lib/websocket/handshake/handler/client75.rb     2017-11-14 
21:47:49.000000000 +0100
@@ -24,13 +24,12 @@
           keys
         end
 
-        # Verify if received header WebSocket-Protocol matches with the sent 
one
-        # @return [Boolean] True if matching. False otherwise(appropriate 
error is set)
-        def verify_protocol
-          return true if @handshake.protocols.empty?
-          invalid = @handshake.headers['websocket-protocol'].strip != 
@handshake.protocols.first
-          raise WebSocket::Error::Handshake::UnsupportedProtocol if invalid
-          true
+        def supported_protocols
+          Array(@handshake.protocols.first)
+        end
+
+        def provided_protocols
+          Array(@handshake.headers['websocket-protocol'].to_s.strip)
         end
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/handshake/handler/client76.rb 
new/lib/websocket/handshake/handler/client76.rb
--- old/lib/websocket/handshake/handler/client76.rb     2017-01-31 
19:34:39.000000000 +0100
+++ new/lib/websocket/handshake/handler/client76.rb     2017-11-14 
21:47:49.000000000 +0100
@@ -94,13 +94,8 @@
           [rand(0x100000000)].pack('N') + [rand(0x100000000)].pack('N')
         end
 
-        # Verify if received header Sec-WebSocket-Protocol matches with the 
sent one
-        # @return [Boolean] True if matching. False otherwise(appropriate 
error is set)
-        def verify_protocol
-          return true if @handshake.protocols.empty?
-          invalid = @handshake.headers['sec-websocket-protocol'].strip != 
@handshake.protocols.first
-          raise WebSocket::Error::Handshake::UnsupportedProtocol if invalid
-          true
+        def provided_protocols
+          Array(@handshake.headers['sec-websocket-protocol'].to_s.strip)
         end
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/handshake/handler/server75.rb 
new/lib/websocket/handshake/handler/server75.rb
--- old/lib/websocket/handshake/handler/server75.rb     2017-01-31 
19:34:39.000000000 +0100
+++ new/lib/websocket/handshake/handler/server75.rb     2017-11-14 
21:47:49.000000000 +0100
@@ -4,6 +4,14 @@
       class Server75 < Server
         private
 
+        def headers
+          {
+            origin: 'WebSocket-Origin',
+            location: 'WebSocket-Location',
+            protocol: 'WebSocket-Protocol'
+          }.freeze
+        end
+
         # @see WebSocket::Handshake::Handler::Base#header_line
         def header_line
           'HTTP/1.1 101 Web Socket Protocol Handshake'
@@ -14,15 +22,15 @@
           [
             %w(Upgrade WebSocket),
             %w(Connection Upgrade),
-            ['WebSocket-Origin', @handshake.headers['origin']],
-            ['WebSocket-Location', @handshake.uri]
+            [headers[:origin], @handshake.headers['origin']],
+            [headers[:location], @handshake.uri]
           ] + protocol
         end
 
         def protocol
-          return [] unless @handshake.headers.key?('websocket-protocol')
-          proto = @handshake.headers['websocket-protocol']
-          [['WebSocket-Protocol', @handshake.protocols.include?(proto) ? proto 
: nil]]
+          return [] unless @handshake.headers.key?(headers[:protocol].downcase)
+          proto = @handshake.headers[headers[:protocol].downcase]
+          [[headers[:protocol], @handshake.protocols.include?(proto) ? proto : 
nil]]
         end
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/handshake/handler/server76.rb 
new/lib/websocket/handshake/handler/server76.rb
--- old/lib/websocket/handshake/handler/server76.rb     2017-01-31 
19:34:39.000000000 +0100
+++ new/lib/websocket/handshake/handler/server76.rb     2017-11-14 
21:47:49.000000000 +0100
@@ -3,7 +3,7 @@
 module WebSocket
   module Handshake
     module Handler
-      class Server76 < Server
+      class Server76 < Server75
         # @see WebSocket::Handshake::Base#valid?
         def valid?
           super && !finishing_line.nil?
@@ -11,6 +11,14 @@
 
         private
 
+        def headers
+          {
+            origin: 'Sec-WebSocket-Origin',
+            location: 'Sec-WebSocket-Location',
+            protocol: 'Sec-WebSocket-Protocol'
+          }.freeze
+        end
+
         # @see WebSocket::Handshake::Base#reserved_leftover_lines
         def reserved_leftover_lines
           1
@@ -21,16 +29,6 @@
           'HTTP/1.1 101 WebSocket Protocol Handshake'
         end
 
-        # @see WebSocket::Handshake::Handler::Base#handshake_keys
-        def handshake_keys
-          [
-            %w(Upgrade WebSocket),
-            %w(Connection Upgrade),
-            ['Sec-WebSocket-Origin', @handshake.headers['origin']],
-            ['Sec-WebSocket-Location', @handshake.uri]
-          ] + protocol
-        end
-
         # @see WebSocket::Handshake::Handler::Base#finishing_line
         def finishing_line
           @finishing_line ||= challenge_response
@@ -69,12 +67,6 @@
 
           quotient
         end
-
-        def protocol
-          return [] unless @handshake.headers.key?('sec-websocket-protocol')
-          proto = @handshake.headers['sec-websocket-protocol']
-          [['Sec-WebSocket-Protocol', @handshake.protocols.include?(proto) ? 
proto : nil]]
-        end
       end
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/handshake/server.rb 
new/lib/websocket/handshake/server.rb
--- old/lib/websocket/handshake/server.rb       2017-01-31 19:34:39.000000000 
+0100
+++ new/lib/websocket/handshake/server.rb       2017-11-14 21:47:49.000000000 
+0100
@@ -71,7 +71,7 @@
       # @example
       #   @handshake.from_rack(env)
       def from_rack(env)
-        @headers = env.select { |key, _value| key.start_with? 'HTTP_' 
}.each_with_object({}) do |tuple, memo|
+        @headers = env.select { |key, _value| key.to_s.start_with? 'HTTP_' 
}.each_with_object({}) do |tuple, memo|
           key, value = tuple
           memo[key.gsub(/\AHTTP_/, '').tr('_', '-').downcase] = value
         end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/nice_inspect.rb 
new/lib/websocket/nice_inspect.rb
--- old/lib/websocket/nice_inspect.rb   1970-01-01 01:00:00.000000000 +0100
+++ new/lib/websocket/nice_inspect.rb   2017-11-14 21:47:49.000000000 +0100
@@ -0,0 +1,10 @@
+module WebSocket
+  module NiceInspect
+    # Recreate inspect as #to_s will be overwritten
+    def inspect
+      vars = instance_variables.map { |v| 
"#{v}=#{instance_variable_get(v).inspect}" }.join(', ')
+      insp = Kernel.format("#{self.class}:0x%08x", __id__)
+      "<#{insp} #{vars}>"
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket/version.rb new/lib/websocket/version.rb
--- old/lib/websocket/version.rb        2017-01-31 19:34:39.000000000 +0100
+++ new/lib/websocket/version.rb        2017-11-14 21:47:49.000000000 +0100
@@ -1,3 +1,3 @@
 module WebSocket
-  VERSION = '1.2.4'.freeze
+  VERSION = '1.2.5'.freeze
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/websocket.rb new/lib/websocket.rb
--- old/lib/websocket.rb        2017-01-31 19:34:39.000000000 +0100
+++ new/lib/websocket.rb        2017-11-14 21:47:49.000000000 +0100
@@ -12,6 +12,7 @@
   autoload :ExceptionHandler, "#{ROOT}/websocket/exception_handler"
   autoload :Frame,            "#{ROOT}/websocket/frame"
   autoload :Handshake,        "#{ROOT}/websocket/handshake"
+  autoload :NiceInspect,      "#{ROOT}/websocket/nice_inspect"
 
   # Limit of frame size payload in bytes
   def self.max_frame_size
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2017-01-31 19:34:39.000000000 +0100
+++ new/metadata        2017-11-14 21:47:49.000000000 +0100
@@ -1,71 +1,15 @@
 --- !ruby/object:Gem::Specification
 name: websocket
 version: !ruby/object:Gem::Version
-  version: 1.2.4
+  version: 1.2.5
 platform: ruby
 authors:
 - Bernard Potocki
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2017-01-31 00:00:00.000000000 Z
-dependencies:
-- !ruby/object:Gem::Dependency
-  name: rake
-  requirement: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '0'
-  type: :development
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '0'
-- !ruby/object:Gem::Dependency
-  name: rspec
-  requirement: !ruby/object:Gem::Requirement
-    requirements:
-    - - "~>"
-      - !ruby/object:Gem::Version
-        version: '3.0'
-  type: :development
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    requirements:
-    - - "~>"
-      - !ruby/object:Gem::Version
-        version: '3.0'
-- !ruby/object:Gem::Dependency
-  name: rspec-its
-  requirement: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '0'
-  type: :development
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '0'
-- !ruby/object:Gem::Dependency
-  name: rubocop
-  requirement: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '0'
-  type: :development
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '0'
+date: 2017-11-14 00:00:00.000000000 Z
+dependencies: []
 description: Universal Ruby library to handle WebSocket protocol
 email:
 - bernard.poto...@imanel.org
@@ -73,6 +17,7 @@
 extensions: []
 extra_rdoc_files: []
 files:
+- ".codeclimate.yml"
 - ".gitignore"
 - ".rubocop.yml"
 - ".travis.yml"
@@ -115,6 +60,7 @@
 - lib/websocket/handshake/handler/server75.rb
 - lib/websocket/handshake/handler/server76.rb
 - lib/websocket/handshake/server.rb
+- lib/websocket/nice_inspect.rb
 - lib/websocket/version.rb
 - spec/frame/incoming_03_spec.rb
 - spec/frame/incoming_04_spec.rb
@@ -157,7 +103,7 @@
   requirements:
   - - ">="
     - !ruby/object:Gem::Version
-      version: '0'
+      version: '2.0'
 required_rubygems_version: !ruby/object:Gem::Requirement
   requirements:
   - - ">="
@@ -165,7 +111,7 @@
       version: '0'
 requirements: []
 rubyforge_project: 
-rubygems_version: 2.5.2
+rubygems_version: 2.6.14
 signing_key: 
 specification_version: 4
 summary: Universal Ruby library to handle WebSocket protocol
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/frame/incoming_03_spec.rb 
new/spec/frame/incoming_03_spec.rb
--- old/spec/frame/incoming_03_spec.rb  2017-01-31 19:34:39.000000000 +0100
+++ new/spec/frame/incoming_03_spec.rb  2017-11-14 21:47:49.000000000 +0100
@@ -1,14 +1,15 @@
 # encoding: binary
+
 require 'spec_helper'
 
 RSpec.describe 'Incoming frame draft 03' do
+  subject { frame }
   let(:version) { 3 }
   let(:frame) { WebSocket::Frame::Incoming.new(version: version, data: 
encoded_text) }
   let(:encoded_text) { nil }
   let(:decoded_text) { nil }
   let(:frame_type) { nil }
   let(:error) { nil }
-  subject { frame }
 
   it_should_behave_like 'valid_incoming_frame'
 
@@ -54,7 +55,7 @@
 
   context 'should properly decode text frame in between of continuation' do
     let(:encoded_text) { "\x84\x03Hel\x03\x03abc\x00\x02lo" }
-    let(:frame_type)   { [:pong, :text] }
+    let(:frame_type)   { %i(pong text) }
     let(:decoded_text) { %w(abc Hello) }
 
     it_should_behave_like 'valid_incoming_frame'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/frame/incoming_04_spec.rb 
new/spec/frame/incoming_04_spec.rb
--- old/spec/frame/incoming_04_spec.rb  2017-01-31 19:34:39.000000000 +0100
+++ new/spec/frame/incoming_04_spec.rb  2017-11-14 21:47:49.000000000 +0100
@@ -1,14 +1,15 @@
 # encoding: binary
+
 require 'spec_helper'
 
 RSpec.describe 'Incoming frame draft 04' do
+  subject { frame }
   let(:version) { 4 }
   let(:frame) { WebSocket::Frame::Incoming.new(version: version, data: 
encoded_text) }
   let(:encoded_text) { nil }
   let(:decoded_text) { nil }
   let(:frame_type) { nil }
   let(:error) { nil }
-  subject { frame }
 
   it_should_behave_like 'valid_incoming_frame'
 
@@ -54,7 +55,7 @@
 
   context 'should properly decode text frame in between of continuation' do
     let(:encoded_text) { "\x04\x03Hel\x83\x03abc\x80\x02lo" }
-    let(:frame_type)   { [:pong, :text] }
+    let(:frame_type)   { %i(pong text) }
     let(:decoded_text) { %w(abc Hello) }
 
     it_should_behave_like 'valid_incoming_frame'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/frame/incoming_05_spec.rb 
new/spec/frame/incoming_05_spec.rb
--- old/spec/frame/incoming_05_spec.rb  2017-01-31 19:34:39.000000000 +0100
+++ new/spec/frame/incoming_05_spec.rb  2017-11-14 21:47:49.000000000 +0100
@@ -1,14 +1,15 @@
 # encoding: binary
+
 require 'spec_helper'
 
 RSpec.describe 'Incoming frame draft 05' do
+  subject { frame }
   let(:version) { 5 }
   let(:frame) { WebSocket::Frame::Incoming.new(version: version, data: 
encoded_text) }
   let(:encoded_text) { nil }
   let(:decoded_text) { nil }
   let(:frame_type) { nil }
   let(:error) { nil }
-  subject { frame }
 
   it_should_behave_like 'valid_incoming_frame'
 
@@ -70,7 +71,7 @@
 
   context 'should properly decode text frame in between of continuation' do
     let(:encoded_text) { "\x04\x03Hel\x83\x03abc\x80\x02lo" }
-    let(:frame_type)   { [:pong, :text] }
+    let(:frame_type)   { %i(pong text) }
     let(:decoded_text) { %w(abc Hello) }
 
     it_should_behave_like 'valid_incoming_frame'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/frame/incoming_07_spec.rb 
new/spec/frame/incoming_07_spec.rb
--- old/spec/frame/incoming_07_spec.rb  2017-01-31 19:34:39.000000000 +0100
+++ new/spec/frame/incoming_07_spec.rb  2017-11-14 21:47:49.000000000 +0100
@@ -1,14 +1,15 @@
 # encoding: binary
+
 require 'spec_helper'
 
 RSpec.describe 'Incoming frame draft 07' do
+  subject { frame }
   let(:version) { 7 }
   let(:frame) { WebSocket::Frame::Incoming.new(version: version, data: 
encoded_text) }
   let(:encoded_text) { nil }
   let(:decoded_text) { nil }
   let(:frame_type) { nil }
   let(:error) { nil }
-  subject { frame }
 
   it_should_behave_like 'valid_incoming_frame'
 
@@ -87,7 +88,7 @@
 
   context 'should properly decode text frame in between of continuation' do
     let(:encoded_text) { "\x01\x03Hel\x8a\x03abc\x80\x02lo" }
-    let(:frame_type)   { [:pong, :text] }
+    let(:frame_type)   { %i(pong text) }
     let(:decoded_text) { %w(abc Hello) }
 
     it_should_behave_like 'valid_incoming_frame'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/frame/incoming_75_spec.rb 
new/spec/frame/incoming_75_spec.rb
--- old/spec/frame/incoming_75_spec.rb  2017-01-31 19:34:39.000000000 +0100
+++ new/spec/frame/incoming_75_spec.rb  2017-11-14 21:47:49.000000000 +0100
@@ -1,14 +1,15 @@
 # encoding: binary
+
 require 'spec_helper'
 
 RSpec.describe 'Incoming frame draft 75' do
+  subject { frame }
   let(:version) { 75 }
   let(:frame) { WebSocket::Frame::Incoming.new(version: version, data: 
encoded_text) }
   let(:encoded_text) { nil }
   let(:decoded_text) { nil }
   let(:frame_type) { nil }
   let(:error) { nil }
-  subject { frame }
 
   it_should_behave_like 'valid_incoming_frame'
 
@@ -23,7 +24,7 @@
   context 'with two frames' do
     let(:encoded_text) { "\x00abc\xFF\x00def\xFF" }
     let(:decoded_text) { %w(abc def) }
-    let(:frame_type)   { [:text, :text] }
+    let(:frame_type)   { %i(text text) }
 
     it_should_behave_like 'valid_incoming_frame'
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/frame/incoming_common_spec.rb 
new/spec/frame/incoming_common_spec.rb
--- old/spec/frame/incoming_common_spec.rb      2017-01-31 19:34:39.000000000 
+0100
+++ new/spec/frame/incoming_common_spec.rb      2017-11-14 21:47:49.000000000 
+0100
@@ -1,22 +1,31 @@
 # encoding: binary
+
 require 'spec_helper'
 
 RSpec.describe 'Incoming common frame' do
   subject { WebSocket::Frame::Incoming.new }
 
-  its(:version) { is_expected.to eql(13) }
-  its(:decoded?) { is_expected.to be false }
-  its(:error?) { is_expected.to be false }
+  it 'is version 13' do
+    expect(subject.version).to be 13
+  end
+
+  it 'is not decoded' do
+    expect(subject.decoded?).to be false
+  end
+
+  it 'has no errors' do
+    expect(subject.error?).to be false
+  end
 
-  it 'should allow adding data via <<' do
-    expect(subject.data).to eql('')
+  it 'allows adding data via <<' do
+    expect(subject.data).to eql ''
     subject << 'test'
-    expect(subject.data).to eql('test')
+    expect(subject.data).to eql 'test'
   end
 
-  it 'should raise error on invalid version' do
+  it 'raises error on invalid version' do
     subject = WebSocket::Frame::Incoming.new(version: 70)
     expect(subject.error?).to be true
-    expect(subject.error).to eql(:unknown_protocol_version)
+    expect(subject.error).to be :unknown_protocol_version
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/frame/masking_spec.rb 
new/spec/frame/masking_spec.rb
--- old/spec/frame/masking_spec.rb      2017-01-31 19:34:39.000000000 +0100
+++ new/spec/frame/masking_spec.rb      2017-11-14 21:47:49.000000000 +0100
@@ -1,8 +1,9 @@
 # encoding: binary
+
 require 'spec_helper'
 
 RSpec.describe 'Masking frame draft 07' do
-  it 'should encode and decode masked frame correctly' do
+  it 'encodes and decode masked frame correctly' do
     outgoing_frame = WebSocket::Frame::Outgoing::Client.new(data: 'Hello 
World', type: 'text')
     outgoing_frame.to_s
     expect(outgoing_frame.error).to be_nil
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/frame/outgoing_03_spec.rb 
new/spec/frame/outgoing_03_spec.rb
--- old/spec/frame/outgoing_03_spec.rb  2017-01-31 19:34:39.000000000 +0100
+++ new/spec/frame/outgoing_03_spec.rb  2017-11-14 21:47:49.000000000 +0100
@@ -1,7 +1,9 @@
 # encoding: binary
+
 require 'spec_helper'
 
 RSpec.describe 'Outgoing frame draft 03' do
+  subject { frame }
   let(:version) { 3 }
   let(:frame) { WebSocket::Frame::Outgoing.new(version: version, data: 
decoded_text, type: frame_type) }
   let(:decoded_text) { '' }
@@ -9,7 +11,6 @@
   let(:frame_type) { :text }
   let(:require_sending) { true }
   let(:error) { nil }
-  subject { frame }
 
   it_should_behave_like 'valid_outgoing_frame'
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/frame/outgoing_04_spec.rb 
new/spec/frame/outgoing_04_spec.rb
--- old/spec/frame/outgoing_04_spec.rb  2017-01-31 19:34:39.000000000 +0100
+++ new/spec/frame/outgoing_04_spec.rb  2017-11-14 21:47:49.000000000 +0100
@@ -1,7 +1,9 @@
 # encoding: binary
+
 require 'spec_helper'
 
 RSpec.describe 'Outgoing frame draft 04' do
+  subject { frame }
   let(:version) { 4 }
   let(:frame) { WebSocket::Frame::Outgoing.new(version: version, data: 
decoded_text, type: frame_type) }
   let(:decoded_text) { '' }
@@ -9,7 +11,6 @@
   let(:frame_type) { :text }
   let(:require_sending) { true }
   let(:error) { nil }
-  subject { frame }
 
   it_should_behave_like 'valid_outgoing_frame'
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/frame/outgoing_05_spec.rb 
new/spec/frame/outgoing_05_spec.rb
--- old/spec/frame/outgoing_05_spec.rb  2017-01-31 19:34:39.000000000 +0100
+++ new/spec/frame/outgoing_05_spec.rb  2017-11-14 21:47:49.000000000 +0100
@@ -1,7 +1,9 @@
 # encoding: binary
+
 require 'spec_helper'
 
 RSpec.describe 'Outgoing frame draft 05' do
+  subject { frame }
   let(:version) { 5 }
   let(:frame) { WebSocket::Frame::Outgoing.new(version: version, data: 
decoded_text, type: frame_type) }
   let(:decoded_text) { '' }
@@ -9,7 +11,6 @@
   let(:frame_type) { :text }
   let(:require_sending) { true }
   let(:error) { nil }
-  subject { frame }
 
   it_should_behave_like 'valid_outgoing_frame'
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/frame/outgoing_07_spec.rb 
new/spec/frame/outgoing_07_spec.rb
--- old/spec/frame/outgoing_07_spec.rb  2017-01-31 19:34:39.000000000 +0100
+++ new/spec/frame/outgoing_07_spec.rb  2017-11-14 21:47:49.000000000 +0100
@@ -1,7 +1,9 @@
 # encoding: binary
+
 require 'spec_helper'
 
 RSpec.describe 'Outgoing frame draft 07' do
+  subject { frame }
   let(:version) { 7 }
   let(:frame) { WebSocket::Frame::Outgoing.new(version: version, data: 
decoded_text, type: frame_type, code: close_code) }
   let(:decoded_text) { '' }
@@ -10,7 +12,6 @@
   let(:frame_type) { :text }
   let(:require_sending) { true }
   let(:error) { nil }
-  subject { frame }
 
   it_should_behave_like 'valid_outgoing_frame'
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/frame/outgoing_75_spec.rb 
new/spec/frame/outgoing_75_spec.rb
--- old/spec/frame/outgoing_75_spec.rb  2017-01-31 19:34:39.000000000 +0100
+++ new/spec/frame/outgoing_75_spec.rb  2017-11-14 21:47:49.000000000 +0100
@@ -1,7 +1,9 @@
 # encoding: binary
+
 require 'spec_helper'
 
 RSpec.describe 'Outgoing frame draft 75' do
+  subject { frame }
   let(:version) { 75 }
   let(:frame) { WebSocket::Frame::Outgoing.new(version: version, data: 
decoded_text, type: frame_type) }
   let(:decoded_text) { '' }
@@ -9,7 +11,6 @@
   let(:frame_type) { :text }
   let(:require_sending) { true }
   let(:error) { nil }
-  subject { frame }
 
   it_should_behave_like 'valid_outgoing_frame'
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/frame/outgoing_common_spec.rb 
new/spec/frame/outgoing_common_spec.rb
--- old/spec/frame/outgoing_common_spec.rb      2017-01-31 19:34:39.000000000 
+0100
+++ new/spec/frame/outgoing_common_spec.rb      2017-11-14 21:47:49.000000000 
+0100
@@ -1,15 +1,21 @@
 # encoding: binary
+
 require 'spec_helper'
 
 RSpec.describe 'Outgoing common frame' do
   subject { WebSocket::Frame::Outgoing.new }
 
-  its(:version) { is_expected.to eql(13) }
-  its(:error?) { is_expected.to be false }
+  it 'is version 13' do
+    expect(subject.version).to be 13
+  end
+
+  it 'has no errors' do
+    expect(subject.error?).to be false
+  end
 
-  it 'should raise error on invalid version' do
+  it 'raises error on invalid version' do
     subject = WebSocket::Frame::Incoming.new(version: 70)
     expect(subject.error?).to be true
-    expect(subject.error).to eql(:unknown_protocol_version)
+    expect(subject.error).to be :unknown_protocol_version
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/handshake/client_04_spec.rb 
new/spec/handshake/client_04_spec.rb
--- old/spec/handshake/client_04_spec.rb        2017-01-31 19:34:39.000000000 
+0100
+++ new/spec/handshake/client_04_spec.rb        2017-11-14 21:47:49.000000000 
+0100
@@ -9,13 +9,13 @@
 
   it_should_behave_like 'all client drafts'
 
-  it 'should disallow client with invalid challenge' do
+  it 'disallows client with invalid challenge' do
     @request_params = { accept: 'invalid' }
     handshake << server_response
 
     expect(handshake).to be_finished
     expect(handshake).not_to be_valid
-    expect(handshake.error).to eql(:invalid_handshake_authentication)
+    expect(handshake.error).to be(:invalid_handshake_authentication)
   end
 
   context 'protocol header specified' do
@@ -54,7 +54,7 @@
 
         expect(handshake).to be_finished
         expect(handshake).not_to be_valid
-        expect(handshake.error).to eql(:unsupported_protocol)
+        expect(handshake.error).to be(:unsupported_protocol)
       end
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/handshake/client_11_spec.rb 
new/spec/handshake/client_11_spec.rb
--- old/spec/handshake/client_11_spec.rb        2017-01-31 19:34:39.000000000 
+0100
+++ new/spec/handshake/client_11_spec.rb        2017-11-14 21:47:49.000000000 
+0100
@@ -9,12 +9,12 @@
 
   it_should_behave_like 'all client drafts'
 
-  it 'should disallow client with invalid challenge' do
+  it 'disallows client with invalid challenge' do
     @request_params = { accept: 'invalid' }
     handshake << server_response
 
     expect(handshake).to be_finished
     expect(handshake).not_to be_valid
-    expect(handshake.error).to eql(:invalid_handshake_authentication)
+    expect(handshake.error).to be(:invalid_handshake_authentication)
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/handshake/client_75_spec.rb 
new/spec/handshake/client_75_spec.rb
--- old/spec/handshake/client_75_spec.rb        2017-01-31 19:34:39.000000000 
+0100
+++ new/spec/handshake/client_75_spec.rb        2017-11-14 21:47:49.000000000 
+0100
@@ -29,7 +29,7 @@
 
         expect(handshake).to be_finished
         expect(handshake).not_to be_valid
-        expect(handshake.error).to eql(:unsupported_protocol)
+        expect(handshake.error).to be(:unsupported_protocol)
       end
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/handshake/client_76_spec.rb 
new/spec/handshake/client_76_spec.rb
--- old/spec/handshake/client_76_spec.rb        2017-01-31 19:34:39.000000000 
+0100
+++ new/spec/handshake/client_76_spec.rb        2017-11-14 21:47:49.000000000 
+0100
@@ -9,13 +9,13 @@
 
   it_should_behave_like 'all client drafts'
 
-  it 'should disallow client with invalid challenge' do
+  it 'disallows client with invalid challenge' do
     @request_params = { challenge: 'invalid' }
     handshake << server_response
 
     expect(handshake).to be_finished
     expect(handshake).not_to be_valid
-    expect(handshake.error).to eql(:invalid_handshake_authentication)
+    expect(handshake.error).to be(:invalid_handshake_authentication)
   end
 
   context 'protocol header specified' do
@@ -38,7 +38,7 @@
 
         expect(handshake).to be_finished
         expect(handshake).not_to be_valid
-        expect(handshake.error).to eql(:unsupported_protocol)
+        expect(handshake.error).to be(:unsupported_protocol)
       end
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/handshake/server_04_spec.rb 
new/spec/handshake/server_04_spec.rb
--- old/spec/handshake/server_04_spec.rb        2017-01-31 19:34:39.000000000 
+0100
+++ new/spec/handshake/server_04_spec.rb        2017-11-14 21:47:49.000000000 
+0100
@@ -8,12 +8,12 @@
 
   it_should_behave_like 'all server drafts'
 
-  it 'should disallow request without Sec-WebSocket-Key' do
+  it 'disallows request without Sec-WebSocket-Key' do
     handshake << client_request.gsub(/^Sec-WebSocket-Key:.*\n/, '')
 
     expect(handshake).to be_finished
     expect(handshake).not_to be_valid
-    expect(handshake.error).to eql(:invalid_handshake_authentication)
+    expect(handshake.error).to be(:invalid_handshake_authentication)
   end
 
   context 'protocol header specified' do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/handshake/server_76_spec.rb 
new/spec/handshake/server_76_spec.rb
--- old/spec/handshake/server_76_spec.rb        2017-01-31 19:34:39.000000000 
+0100
+++ new/spec/handshake/server_76_spec.rb        2017-11-14 21:47:49.000000000 
+0100
@@ -8,40 +8,40 @@
 
   it_should_behave_like 'all server drafts'
 
-  it 'should disallow request without spaces in key 1' do
+  it 'disallows request without spaces in key 1' do
     @request_params = { key1: '4@146546xW%0l15' }
     handshake << client_request
 
     expect(handshake).to be_finished
     expect(handshake).not_to be_valid
-    expect(handshake.error).to eql(:invalid_handshake_authentication)
+    expect(handshake.error).to be(:invalid_handshake_authentication)
   end
 
-  it 'should disallow request without spaces in key 2' do
+  it 'disallows request without spaces in key 2' do
     @request_params = { key2: '129985Y31.P00' }
     handshake << client_request
 
     expect(handshake).to be_finished
     expect(handshake).not_to be_valid
-    expect(handshake.error).to eql(:invalid_handshake_authentication)
+    expect(handshake.error).to be(:invalid_handshake_authentication)
   end
 
-  it 'should disallow request with invalid number of spaces or numbers in key 
1' do
+  it 'disallows request with invalid number of spaces or numbers in key 1' do
     @request_params = { key1: '4 @1   46546xW%0l 1 5' }
     handshake << client_request
 
     expect(handshake).to be_finished
     expect(handshake).not_to be_valid
-    expect(handshake.error).to eql(:invalid_handshake_authentication)
+    expect(handshake.error).to be(:invalid_handshake_authentication)
   end
 
-  it 'should disallow request with invalid number of spaces or numbers in key 
2' do
+  it 'disallows request with invalid number of spaces or numbers in key 2' do
     @request_params = { key2: '12998  5 Y3 1  .P00' }
     handshake << client_request
 
     expect(handshake).to be_finished
     expect(handshake).not_to be_valid
-    expect(handshake.error).to eql(:invalid_handshake_authentication)
+    expect(handshake.error).to be(:invalid_handshake_authentication)
   end
 
   context 'protocol header specified' do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/spec_helper.rb new/spec/spec_helper.rb
--- old/spec/spec_helper.rb     2017-01-31 19:34:39.000000000 +0100
+++ new/spec/spec_helper.rb     2017-11-14 21:47:49.000000000 +0100
@@ -1,6 +1,4 @@
 require 'rspec'
-require 'rspec/its'
-require 'webrick'
 
 require 'websocket'
 Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/support/all_client_drafts.rb 
new/spec/support/all_client_drafts.rb
--- old/spec/support/all_client_drafts.rb       2017-01-31 19:34:39.000000000 
+0100
+++ new/spec/support/all_client_drafts.rb       2017-11-14 21:47:49.000000000 
+0100
@@ -9,7 +9,7 @@
     expect(handshake).to be_valid
   end
 
-  it 'should be valid' do
+  it 'is valid' do
     handshake << server_response
 
     expect(handshake.error).to be_nil
@@ -17,92 +17,92 @@
     expect(handshake).to be_valid
   end
 
-  it 'should return valid version' do
+  it 'returns valid version' do
     expect(handshake.version).to eql(version)
   end
 
-  it 'should return valid host' do
+  it 'returns valid host' do
     @request_params = { host: 'www.test.cc' }
     expect(handshake.host).to eql('www.test.cc')
   end
 
-  it 'should return valid path' do
+  it 'returns valid path' do
     @request_params = { path: '/custom' }
     expect(handshake.path).to eql('/custom')
   end
 
-  it 'should return valid query' do
+  it 'returns valid query' do
     @request_params = { query: 'aaa=bbb' }
     expect(handshake.query).to eql('aaa=bbb')
   end
 
-  it 'should return valid port' do
+  it 'returns valid port' do
     @request_params = { port: 123 }
-    expect(handshake.port).to eql(123)
+    expect(handshake.port).to be(123)
   end
 
-  it 'should return valid headers' do
+  it 'returns valid headers' do
     @request_params = { headers: { 'aaa' => 'bbb' } }
     expect(handshake.headers).to eql('aaa' => 'bbb')
   end
 
-  it 'should parse uri' do
+  it 'parses uri' do
     @request_params = { uri: 'ws://test.example.org:301/test_path?query=true' }
     expect(handshake.host).to eql('test.example.org')
-    expect(handshake.port).to eql(301)
+    expect(handshake.port).to be(301)
     expect(handshake.path).to eql('/test_path')
     expect(handshake.query).to eql('query=true')
   end
 
-  it 'should parse url' do
+  it 'parses url' do
     @request_params = { url: 'ws://test.example.org:301/test_path?query=true' }
     expect(handshake.host).to eql('test.example.org')
-    expect(handshake.port).to eql(301)
+    expect(handshake.port).to be(301)
     expect(handshake.path).to eql('/test_path')
     expect(handshake.query).to eql('query=true')
   end
 
-  it 'should resolve correct path with root server provided' do
+  it 'resolves correct path with root server provided' do
     @request_params = { url: 'ws://test.example.org' }
     expect(handshake.path).to eql('/')
   end
 
-  it 'should return valid response' do
+  it 'returns valid response' do
     validate_request
   end
 
-  it 'should allow custom path' do
+  it 'allows custom path' do
     @request_params = { path: '/custom' }
     validate_request
   end
 
-  it 'should allow query in path' do
+  it 'allows query in path' do
     @request_params = { query: 'test=true' }
     validate_request
   end
 
-  it 'should allow custom port' do
+  it 'allows custom port' do
     @request_params = { port: 123 }
     validate_request
   end
 
-  it 'should allow custom headers' do
+  it 'allows custom headers' do
     @request_params = { headers: { 'aaa' => 'bbb' } }
     validate_request
   end
 
-  it 'should recognize unfinished requests' do
+  it 'recognizes unfinished requests' do
     handshake << server_response[0..-20]
 
     expect(handshake).not_to be_finished
     expect(handshake).not_to be_valid
   end
 
-  it 'should disallow requests with invalid request method' do
+  it 'disallows requests with invalid request method' do
     handshake << server_response.gsub('101', '404')
 
     expect(handshake).to be_finished
     expect(handshake).not_to be_valid
-    expect(handshake.error).to eql(:invalid_status_code)
+    expect(handshake.error).to be(:invalid_status_code)
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/support/all_server_drafts.rb 
new/spec/support/all_server_drafts.rb
--- old/spec/support/all_server_drafts.rb       2017-01-31 19:34:39.000000000 
+0100
+++ new/spec/support/all_server_drafts.rb       2017-11-14 21:47:49.000000000 
+0100
@@ -1,3 +1,5 @@
+require 'webrick'
+
 RSpec.shared_examples_for 'all server drafts' do
   def validate_request
     handshake << client_request
@@ -8,7 +10,7 @@
     expect(handshake.to_s).to eql(server_response)
   end
 
-  it 'should be valid' do
+  it 'is valid' do
     handshake << client_request
 
     expect(handshake.error).to be_nil
@@ -16,86 +18,87 @@
     expect(handshake).to be_valid
   end
 
-  it 'should return valid version' do
+  it 'returns valid version' do
     handshake << client_request
 
     expect(handshake.version).to eql(version)
   end
 
-  it 'should return valid host' do
+  it 'returns valid host' do
     @request_params = { host: 'www.test.cc' }
     handshake << client_request
 
     expect(handshake.host).to eql('www.test.cc')
   end
 
-  it 'should return valid path' do
+  it 'returns valid path' do
     @request_params = { path: '/custom' }
     handshake << client_request
 
     expect(handshake.path).to eql('/custom')
   end
 
-  it 'should return valid query' do
+  it 'returns valid query' do
     @request_params = { path: '/custom?aaa=bbb' }
     handshake << client_request
 
     expect(handshake.query).to eql('aaa=bbb')
   end
 
-  it 'should return valid port' do
+  it 'returns valid port' do
     @request_params = { port: 123 }
     handshake << client_request
 
     expect(handshake.port).to eql('123')
   end
 
-  it 'should return valid response' do
+  it 'returns valid response' do
     validate_request
   end
 
-  it 'should allow custom path' do
+  it 'allows custom path' do
     @request_params = { path: '/custom' }
     validate_request
   end
 
-  it 'should allow query in path' do
+  it 'allows query in path' do
     @request_params = { path: '/custom?test=true' }
     validate_request
   end
 
-  it 'should allow custom port' do
+  it 'allows custom port' do
     @request_params = { port: 123 }
     validate_request
   end
 
-  it 'should recognize unfinished requests' do
+  it 'recognizes unfinished requests' do
     handshake << client_request[0..-10]
 
     expect(handshake).not_to be_finished
     expect(handshake).not_to be_valid
   end
 
-  it 'should disallow requests with invalid request method' do
+  it 'disallows requests with invalid request method' do
     handshake << client_request.gsub('GET', 'POST')
 
     expect(handshake).to be_finished
     expect(handshake).not_to be_valid
-    expect(handshake.error).to eql(:get_request_required)
+    expect(handshake.error).to be(:get_request_required)
   end
 
-  it 'should parse a rack request' do
+  it 'parses a rack request' do
     request = WEBrick::HTTPRequest.new(ServerSoftware: 'rspec')
     expect(request.parse(StringIO.new(client_request))).to be true
     rest = client_request.slice((request.to_s.length..-1))
 
     handshake.from_rack(request.meta_vars.merge(
-                          'rack.input' => StringIO.new(rest)
+                          'rack.input' => StringIO.new(rest),
+                          :random_key => :random_value
     ))
     validate_request
   end
 
-  it 'should parse a hash request' do
+  it 'parses a hash request' do
     request = WEBrick::HTTPRequest.new(ServerSoftware: 'rspec')
     expect(request.parse(StringIO.new(client_request))).to be true
     body = client_request.slice((request.to_s.length..-1))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/support/incoming_frames.rb 
new/spec/support/incoming_frames.rb
--- old/spec/support/incoming_frames.rb 2017-01-31 19:34:39.000000000 +0100
+++ new/spec/support/incoming_frames.rb 2017-11-14 21:47:49.000000000 +0100
@@ -2,14 +2,31 @@
   let(:decoded_text_array) { Array(decoded_text) }
   let(:frame_type_array) { Array(frame_type) }
 
-  its(:class) { is_expected.to eql(WebSocket::Frame::Incoming) }
-  its(:data) { is_expected.to eql(encoded_text || '') }
-  its(:version) { is_expected.to eql(version) }
-  its(:type) { is_expected.to be_nil }
-  its(:decoded?) { is_expected.to be false }
-  its(:to_s) { is_expected.to eql(encoded_text || '') }
+  it 'is incoming frame' do
+    expect(subject.class).to be WebSocket::Frame::Incoming
+  end
+
+  it 'is in proper verions' do
+    expect(subject.version).to eql version
+  end
+
+  it 'does not have type set' do
+    expect(subject.type).to be nil
+  end
+
+  it 'is not decoded' do
+    expect(subject.decoded?).to be false
+  end
+
+  it 'contains encoded data' do
+    expect(subject.data).to eql(encoded_text || '')
+  end
+
+  it 'returns data as to_s' do
+    expect(subject.to_s).to eql(encoded_text || '')
+  end
 
-  it 'should have specified number of returned frames' do
+  it 'has specified number of returned frames' do
     decoded_text_array.each_with_index do |da, index|
       n = subject.next
       expect(n).not_to be_nil, "Should return frame for #{da}, 
#{frame_type_array[index]}"
@@ -23,7 +40,7 @@
     end
   end
 
-  it 'should return valid decoded frame for each specified decoded texts' do
+  it 'returns valid decoded frame for each specified decoded texts' do
     decoded_text_array.each_with_index do |da, index|
       f = subject.next
       expect(f.decoded?).to be true
@@ -34,10 +51,10 @@
   end
 
   context 'with raising' do
-    before(:each) { WebSocket.should_raise = true }
-    after(:each) { WebSocket.should_raise = false }
+    before { WebSocket.should_raise = true }
+    after { WebSocket.should_raise = false }
 
-    it 'should have specified number of returned frames' do
+    it 'has specified number of returned frames' do
       if error
         expect do
           decoded_text_array.each_with_index do |da, index|
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/support/outgoing_frames.rb 
new/spec/support/outgoing_frames.rb
--- old/spec/support/outgoing_frames.rb 2017-01-31 19:34:39.000000000 +0100
+++ new/spec/support/outgoing_frames.rb 2017-11-14 21:47:49.000000000 +0100
@@ -1,13 +1,33 @@
 RSpec.shared_examples_for 'valid_outgoing_frame' do
-  its(:class) { is_expected.to eql(WebSocket::Frame::Outgoing) }
-  its(:version) { is_expected.to eql(version) }
-  its(:type) { is_expected.to eql(frame_type) }
-  its(:data) { is_expected.to eql(decoded_text) }
-  its(:to_s) { is_expected.to eql(encoded_text) }
+  it 'is outgoing frame' do
+    expect(subject.class).to be WebSocket::Frame::Outgoing
+  end
+
+  it 'is in proper verions' do
+    expect(subject.version).to eql version
+  end
+
+  it 'has proper type set' do
+    expect(subject.type).to eql frame_type
+  end
+
+  it 'contains decoded data' do
+    expect(subject.data).to eql(decoded_text)
+  end
+
+  it 'returns encoded data as to_s' do
+    expect(subject.to_s).to eql(encoded_text)
+  end
 
   context 'after parsing' do
-    before(:each) { subject.to_s }
-    its(:error) { is_expected.to eql(error) }
-    its(:require_sending?) { is_expected.to eql(require_sending) }
+    before { subject.to_s }
+
+    it 'has valid errors set' do
+      expect(subject.error).to eql error
+    end
+
+    it 'requires sending' do
+      expect(subject.require_sending?).to eql require_sending
+    end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/websocket.gemspec new/websocket.gemspec
--- old/websocket.gemspec       2017-01-31 19:34:39.000000000 +0100
+++ new/websocket.gemspec       2017-11-14 21:47:49.000000000 +0100
@@ -1,4 +1,5 @@
 # -*- encoding: utf-8 -*-
+
 $LOAD_PATH.push File.expand_path('../lib', __FILE__)
 require 'websocket/version'
 
@@ -18,8 +19,5 @@
   s.executables   = `git ls-files -- bin/*`.split("\n").map { |f| 
File.basename(f) }
   s.require_paths = ['lib']
 
-  s.add_development_dependency 'rake'
-  s.add_development_dependency 'rspec', '~> 3.0'
-  s.add_development_dependency 'rspec-its'
-  s.add_development_dependency 'rubocop'
+  s.required_ruby_version = '>= 2.0'
 end


Reply via email to