Skip to content

Commit a6575e3

Browse files
authored
Modernize gem. (#18)
1 parent 5bb92d9 commit a6575e3

19 files changed

+102
-235
lines changed

.editorconfig

+4
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ root = true
33
[*]
44
indent_style = tab
55
indent_size = 2
6+
7+
[*.{yml,yaml}]
8+
indent_style = space
9+
indent_size = 2

.github/workflows/autobahn-server-tests.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ jobs:
1313
strategy:
1414
matrix:
1515
ruby:
16-
- "3.2"
16+
- "3.3"
1717

1818
experimental: [false]
1919

2020
env:
2121
BUNDLE_WITH: autobahn_tests
2222

2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v4
2525

2626
- uses: ruby/setup-ruby@v1
2727
with:

.github/workflows/coverage.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ jobs:
2222

2323
ruby:
2424
- "3.1"
25-
- "3.2"
25+
- "3.3"
2626

2727
steps:
28-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@v4
2929
- uses: ruby/setup-ruby@v1
3030
with:
3131
ruby-version: ${{matrix.ruby}}
@@ -35,7 +35,7 @@ jobs:
3535
timeout-minutes: 5
3636
run: bundle exec bake test
3737

38-
- uses: actions/upload-artifact@v2
38+
- uses: actions/upload-artifact@v3
3939
with:
4040
name: coverage-${{matrix.os}}-${{matrix.ruby}}
4141
path: .covered.db
@@ -45,10 +45,10 @@ jobs:
4545
runs-on: ubuntu-latest
4646

4747
steps:
48-
- uses: actions/checkout@v3
48+
- uses: actions/checkout@v4
4949
- uses: ruby/setup-ruby@v1
5050
with:
51-
ruby-version: "3.2"
51+
ruby-version: "3.3"
5252
bundler-cache: true
5353

5454
- uses: actions/download-artifact@v3

.github/workflows/documentation.yaml

+4-7
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ on:
55
branches:
66
- main
77

8-
# Allows you to run this workflow manually from the Actions tab:
9-
workflow_dispatch:
10-
118
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages:
129
permissions:
1310
contents: read
@@ -28,11 +25,11 @@ jobs:
2825
runs-on: ubuntu-latest
2926

3027
steps:
31-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@v4
3229

3330
- uses: ruby/setup-ruby@v1
3431
with:
35-
ruby-version: "3.2"
32+
ruby-version: "3.3"
3633
bundler-cache: true
3734

3835
- name: Installing packages
@@ -43,7 +40,7 @@ jobs:
4340
run: bundle exec bake utopia:project:static --force no
4441

4542
- name: Upload documentation artifact
46-
uses: actions/upload-pages-artifact@v1
43+
uses: actions/upload-pages-artifact@v3
4744
with:
4845
path: docs
4946

@@ -58,4 +55,4 @@ jobs:
5855
steps:
5956
- name: Deploy to GitHub Pages
6057
id: deployment
61-
uses: actions/deploy-pages@v1
58+
uses: actions/deploy-pages@v4

.github/workflows/test-external.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
- macos
2121

2222
ruby:
23-
- "3.0"
2423
- "3.1"
2524
- "3.2"
25+
- "3.3"
2626

2727
steps:
28-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@v4
2929
- uses: ruby/setup-ruby@v1
3030
with:
3131
ruby-version: ${{matrix.ruby}}

.github/workflows/test.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
- macos
2222

2323
ruby:
24-
- "3.0"
2524
- "3.1"
2625
- "3.2"
26+
- "3.3"
2727

2828
experimental: [false]
2929

@@ -39,7 +39,7 @@ jobs:
3939
experimental: true
4040

4141
steps:
42-
- uses: actions/checkout@v3
42+
- uses: actions/checkout@v4
4343
- uses: ruby/setup-ruby@v1
4444
with:
4545
ruby-version: ${{matrix.ruby}}

fixtures/a_websocket_frame.rb

-23
This file was deleted.

fixtures/disable_console_context.rb

-17
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# frozen_string_literal: true
2+
3+
# Released under the MIT License.
4+
# Copyright, 2019-2023, by Samuel Williams.
5+
6+
require 'socket'
7+
8+
module Protocol
9+
module WebSocket
10+
AWebSocketFrame = Sus::Shared("a websocket frame") do
11+
require 'protocol/websocket/framer'
12+
13+
let(:sockets) {Socket.pair(Socket::PF_UNIX, Socket::SOCK_STREAM)}
14+
15+
let(:client) {Protocol::WebSocket::Framer.new(sockets.first)}
16+
let(:server) {Protocol::WebSocket::Framer.new(sockets.last)}
17+
18+
it "can send frame over sockets" do
19+
server.write_frame(frame)
20+
21+
transmitted_frame = client.read_frame
22+
23+
expect(transmitted_frame).to be == frame
24+
end
25+
end
26+
end
27+
end

fixtures/reactor_context.rb

-73
This file was deleted.

fixtures/server_context.rb

-84
This file was deleted.

gems.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@
2020
gem "sus"
2121
gem "covered"
2222

23+
gem "sus-fixtures-async"
24+
gem "sus-fixtures-async-http"
25+
2326
gem "bake-test"
2427
gem "bake-test-external"
2528

29+
# Used for autobahn tests.
30+
gem "falcon"
2631
gem "async-websocket"
2732
gem "async-http"
28-
gem "falcon"
2933
end

license.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22

3-
Copyright, 2019-2023, by Samuel Williams.
3+
Copyright, 2019-2024, by Samuel Williams.
44
Copyright, 2019, by Soumya.
55
Copyright, 2019, by William T. Nelson.
66
Copyright, 2020, by Olle Jonsson.

0 commit comments

Comments
 (0)