13 Commits

Author SHA1 Message Date
James Coglan a75062f38d Run tests on some additional Ruby versions 2023-09-07 19:32:41 +01:00
James Coglan 7f98c533dc Test on Ruby 3.1 2022-02-06 23:45:25 +00:00
James Coglan e5406a7575 Switch from Travis CI to GitHub Actions 2021-05-18 00:41:40 +01:00
James Coglan dfa7cae1e8 Update Ruby versions for Travis 2021-03-12 16:38:32 +00:00
James Coglan 2e28257863 Test on JRuby 9.{0,1,2} rather than "head" 2020-05-14 23:30:05 +01:00
James Coglan a3caf0bf78 Update Ruby versions 2.4 to 2.7 on Travis 2020-05-14 17:19:54 +01:00
James Coglan 95051a28ce Formatting change: {...} should have spaces inside the braces 2019-06-11 16:04:52 +01:00
James Coglan 7be2003001 Change markdown formatting of docs. 2019-05-29 15:32:43 +01:00
James Coglan 7b92a67806 Fix RSpec warnings about raise_error with no arguments. 2019-05-24 14:41:59 +01:00
James Coglan c03d8f2ef8 Update Travis target versions. 2019-05-24 14:41:59 +01:00
James Coglan 167a7f9a8d Switch license to Apache 2.0. 2019-05-24 13:58:11 +01:00
James Coglan 76422c3b41 Test on Ruby 2.5.0. 2018-02-19 21:04:18 +00:00
James Coglan b2168fca78 Use an https: link to github in the gemspec. 2017-09-11 22:01:45 +01:00
8 changed files with 69 additions and 62 deletions
+34
View File
@@ -0,0 +1,34 @@
on:
- push
- pull_request
jobs:
test:
strategy:
fail-fast: false
matrix:
ruby:
- ruby-2.0
- ruby-2.1
# - ruby-2.2
- ruby-2.3
- ruby-2.4
- ruby-2.5
- ruby-2.6
- ruby-2.7
- ruby-3.0
- ruby-3.1
- ruby-3.2
- jruby-9.1
- jruby-9.2
- jruby-9.3
- jruby-9.4
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: ruby --version
- run: bundle exec rspec
-18
View File
@@ -1,18 +0,0 @@
sudo: false
language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1.10
- 2.2.7
- 2.3.4
- 2.4.1
- jruby-19mode
- jruby-9
before_install:
- '[[ "$(ruby --version)" == *"1.9.3"* ]] && gem update --system 2.4.8 || true'
script:
- bundle exec rspec -c spec
+5 -5
View File
@@ -1,21 +1,21 @@
### 0.1.4 / 2017-09-10
* Use `9` instead of `8` as the `windowBits` parameter to zlib, to deal with
- Use `9` instead of `8` as the `windowBits` parameter to zlib, to deal with
restrictions introduced in zlib v1.2.9
### 0.1.3 / 2016-05-20
* Amend all warnings issued when running with -W2
- Amend all warnings issued when running with -W2
### 0.1.2 / 2015-11-06
* The server does not send `server_max_window_bits` if the client does not ask
- The server does not send `server_max_window_bits` if the client does not ask
for it; this works around an issue in Firefox.
### 0.1.1 / 2014-12-18
* Don't allow configure() to be called with unrecognized options
- Don't allow configure() to be called with unrecognized options
### 0.1.0 / 2014-12-13
* Initial release
- Initial release
+9 -18
View File
@@ -1,21 +1,12 @@
# The MIT License
Copyright 2014-2017 James Coglan
Copyright (c) 2014-2017 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
License at
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the 'Software'), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
+8 -8
View File
@@ -1,4 +1,4 @@
# permessage_deflate [![Build status](https://secure.travis-ci.org/faye/permessage-deflate-ruby.svg)](http://travis-ci.org/faye/permessage-deflate-ruby)
# permessage_deflate
Implements the
[permessage-deflate](https://tools.ietf.org/html/draft-ietf-hybi-permessage-compression)
@@ -44,24 +44,24 @@ the peer, and those that are negotiated as part of the protocol. The settings
only affecting the compressor are described fully in the [Zlib
documentation](http://ruby-doc.org/stdlib-2.1.0/libdoc/zlib/rdoc/Zlib/Deflate.html#method-c-new):
* `:level`: sets the compression level, can be an integer from `0` to `9`, or
- `:level`: sets the compression level, can be an integer from `0` to `9`, or
one of the constants `Zlib::NO_COMPRESSION`, `Zlib::BEST_SPEED`,
`Zlib::BEST_COMPRESSION`, or `Zlib::DEFAULT_COMPRESSION`
* `:mem_level`: sets how much memory the compressor allocates, can be an integer
- `:mem_level`: sets how much memory the compressor allocates, can be an integer
from `1` to `9`, or one of the constants `Zlib::MAX_MEM_LEVEL`, or
`Zlib::DEF_MEM_LEVEL`
* `:strategy`: can be one of the constants `Zlib::FILTERED`,
- `:strategy`: can be one of the constants `Zlib::FILTERED`,
`Zlib::HUFFMAN_ONLY`, `Zlib::RLE`, `Zlib::FIXED`, or `Zlib::DEFAULT_STRATEGY`
The other options relate to settings that are negotiated via the protocol and
can be used to set the local session's behaviour and control that of the peer:
* `:no_context_takeover`: if `true`, stops the session reusing a deflate context
- `:no_context_takeover`: if `true`, stops the session reusing a deflate context
between messages
* `:request_no_context_takeover`: if `true`, makes the session tell the other
- `:request_no_context_takeover`: if `true`, makes the session tell the other
peer not to reuse a deflate context between messages
* `:max_window_bits`: an integer from `8` to `15` inclusive that sets the
- `:max_window_bits`: an integer from `8` to `15` inclusive that sets the
maximum size of the session's sliding window; a lower window size will be used
if requested by the peer
* `:request_max_window_bits`: an integer from `8` to `15` inclusive to ask the
- `:request_max_window_bits`: an integer from `8` to `15` inclusive to ask the
other peer to use to set its maximum sliding window size, if supported
+1 -1
View File
@@ -21,7 +21,7 @@ class PermessageDeflate
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
+10 -10
View File
@@ -1,15 +1,15 @@
Gem::Specification.new do |s|
s.name = 'permessage_deflate'
s.version = '0.1.4'
s.summary = 'Per-message DEFLATE compression extension for WebSocket connections'
s.author = 'James Coglan'
s.email = 'jcoglan@gmail.com'
s.homepage = 'http://github.com/faye/permessage-deflate-ruby'
s.license = 'MIT'
s.name = 'permessage_deflate'
s.version = '0.1.4'
s.summary = 'Per-message DEFLATE compression extension for WebSocket connections'
s.author = 'James Coglan'
s.email = 'jcoglan@gmail.com'
s.homepage = 'https://github.com/faye/permessage-deflate-ruby'
s.license = 'Apache-2.0'
s.extra_rdoc_files = %w[README.md]
s.rdoc_options = %w[--main README.md --markup markdown]
s.require_paths = %w[lib]
s.extra_rdoc_files = %w[README.md]
s.rdoc_options = %w[--main README.md --markup markdown]
s.require_paths = %w[lib]
s.files = %w[CHANGELOG.md LICENSE.md README.md] + Dir.glob('lib/**/*.rb')
@@ -204,7 +204,7 @@ describe PermessageDeflate::ClientSession do
before { options[:max_window_bits] = 20 }
it "raises when generating the offer" do
expect { offer }.to raise_error
expect { offer }.to raise_error(PermessageDeflate::ConfigurationError)
end
end
@@ -286,7 +286,7 @@ describe PermessageDeflate::ClientSession do
before { options[:request_max_window_bits] = 20 }
it "raises when generating an offer" do
expect { offer }.to raise_error
expect { offer }.to raise_error(PermessageDeflate::ConfigurationError)
end
end