8 Commits

Author SHA1 Message Date
James Coglan c7e1f86979 Run tests on some additional Ruby versions 2023-09-07 19:31:30 +01:00
James Coglan 3c0fda5b21 Test on Ruby 3.1 2022-02-06 23:44:56 +00:00
James Coglan 5891358639 As of rspec-mocks v3.10.3, mock expectations need to use explicit hashes to avoid confusion with keyword args 2022-02-06 23:36:18 +00:00
James Coglan 84b869effb Switch from Travis CI to GitHub Actions 2021-05-18 00:41:08 +01:00
James Coglan 6ea62a9965 Enable Bundler caching for Travis 2021-03-12 16:37:55 +00:00
James Coglan 1d80737dce Update Ruby versions on Travis 2021-02-23 02:37:51 +00:00
James Coglan a0f23c5d3c Merge pull request #7 from timcraft/patch-1
Test on ruby 3.0
2021-01-06 15:32:47 +00:00
timcraft 8b6c706737 Test on ruby 3.0 2021-01-06 14:56:23 +00:00
4 changed files with 39 additions and 28 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
-23
View File
@@ -1,23 +0,0 @@
sudo: false
language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1.10
- 2.2.10
- 2.3.8
- 2.4.10
- 2.5.8
- 2.6.6
- 2.7.1
- jruby-19mode
- jruby-9.0
- jruby-9.1
- jruby-9.2
before_install:
- '[[ "$(ruby --version)" != *"1.9.3"* ]] || gem update --system 2.4.8'
script:
- bundle exec rspec
+1 -1
View File
@@ -1,4 +1,4 @@
# websocket-extensions [![Build status](https://secure.travis-ci.org/faye/websocket-extensions-ruby.svg)](http://travis-ci.org/faye/websocket-extensions-ruby)
# websocket-extensions
A minimal framework that supports the implementation of WebSocket extensions in
a way that's decoupled from the main protocol. This library aims to allow a
+4 -4
View File
@@ -134,18 +134,18 @@ describe WebSocket::Extensions do
end
it "activates one session with a boolean param" do
expect(@session).to receive(:activate).with("gzip" => true).exactly(1).and_return(true)
expect(@session).to receive(:activate).with({ "gzip" => true }).exactly(1).and_return(true)
@extensions.activate("deflate; gzip")
end
it "activates one session with a string param" do
expect(@session).to receive(:activate).with("mode" => "compress").exactly(1).and_return(true)
expect(@session).to receive(:activate).with({ "mode" => "compress" }).exactly(1).and_return(true)
@extensions.activate("deflate; mode=compress")
end
it "activate multiple sessions" do
expect(@session).to receive(:activate).with("a" => true).exactly(1).and_return(true)
expect(@nonconflict_session).to receive(:activate).with("b" => true).exactly(1).and_return(true)
expect(@session).to receive(:activate).with({ "a" => true }).exactly(1).and_return(true)
expect(@nonconflict_session).to receive(:activate).with({ "b" => true }).exactly(1).and_return(true)
@extensions.activate("deflate; a, reverse; b")
end