Skip to content

Commit d18c709

Browse files
committed
Modernize gem.
1 parent b4bee6b commit d18c709

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+409
-1282
lines changed

.github/workflows/documentation.yaml

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,61 @@
11
name: Documentation
22

3-
permissions:
4-
contents: write
5-
63
on:
74
push:
85
branches:
96
- main
107

8+
# Allows you to run this workflow manually from the Actions tab:
9+
workflow_dispatch:
10+
11+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages:
1112
permissions:
12-
contents: write
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow one concurrent deployment:
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: true
1321

1422
env:
1523
CONSOLE_OUTPUT: XTerm
1624
BUNDLE_WITH: maintenance
1725

1826
jobs:
19-
deploy:
27+
generate:
2028
runs-on: ubuntu-latest
2129

2230
steps:
2331
- uses: actions/checkout@v3
2432

2533
- uses: ruby/setup-ruby@v1
2634
with:
27-
ruby-version: "3.1"
35+
ruby-version: "3.2"
2836
bundler-cache: true
2937

3038
- name: Installing packages
3139
run: sudo apt-get install wget
3240

33-
- name: Prepare GitHub Pages
34-
run: bundle exec bake github:pages:prepare --directory docs
35-
3641
- name: Generate documentation
3742
timeout-minutes: 5
3843
run: bundle exec bake utopia:project:static --force no
3944

40-
- name: Deploy GitHub Pages
41-
run: bundle exec bake github:pages:commit --directory docs
45+
- name: Upload documentation artifact
46+
uses: actions/upload-pages-artifact@v1
47+
with:
48+
path: docs
49+
50+
deploy:
51+
runs-on: ubuntu-latest
52+
53+
environment:
54+
name: github-pages
55+
url: ${{steps.deployment.outputs.page_url}}
56+
57+
needs: generate
58+
steps:
59+
- name: Deploy to GitHub Pages
60+
id: deployment
61+
uses: actions/deploy-pages@v1

.github/workflows/test-external.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
- "2.7"
2424
- "3.0"
2525
- "3.1"
26+
- "3.2"
2627

2728
steps:
2829
- uses: actions/checkout@v3

.github/workflows/test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
- "2.7"
2525
- "3.0"
2626
- "3.1"
27+
- "3.2"
2728

2829
experimental: [false]
2930

.mailmap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Viacheslav Koval <[email protected]>
2+
Sam Shadwell <[email protected]>

async-http.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ Gem::Specification.new do |spec|
77
spec.version = Async::HTTP::VERSION
88

99
spec.summary = "A HTTP client and server library."
10-
spec.authors = ["Samuel Williams", "Brian Morearty", "Bruno Sutic", "Janko Marohnić", "Adam Daniels", "Cyril Roelandt", "Denis Talakevich", "Ian Ker-Seymer", "Igor Sidorov", "Marco Concetto Rudilosso", "Olle Jonsson", "Orgad Shaneh", "Stefan Wrobel", "TheAthlete", "Trevor Turk", "samshadwell"]
10+
spec.authors = ["Samuel Williams", "Brian Morearty", "Bruno Sutic", "Janko Marohnić", "Adam Daniels", "Cyril Roelandt", "Denis Talakevich", "Ian Ker-Seymer", "Igor Sidorov", "Marco Concetto Rudilosso", "Olle Jonsson", "Orgad Shaneh", "Sam Shadwell", "Stefan Wrobel", "Tim Meusel", "Trevor Turk", "Viacheslav Koval"]
1111
spec.license = "MIT"
1212

1313
spec.cert_chain = ['release.cert']
1414
spec.signing_key = File.expand_path('~/.gem/release.pem')
1515

1616
spec.homepage = "https://github.com/socketry/async-http"
1717

18-
spec.files = Dir.glob('{bake,lib}/**/*', File::FNM_DOTMATCH, base: __dir__)
18+
spec.files = Dir.glob(['{bake,lib}/**/*', '*.md'], File::FNM_DOTMATCH, base: __dir__)
1919

2020
spec.add_dependency "async", ">= 1.25"
2121
spec.add_dependency "async-io", ">= 1.28"

bake/async/http.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
# Released under the MIT License.
4+
# Copyright, 2020-2023, by Samuel Williams.
15

26
# Fetch the specified URL and print the response.
37
# @param url [String] the URL to parse and fetch.

bake/async/http/h2spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
# Released under the MIT License.
4+
# Copyright, 2019-2023, by Samuel Williams.
15

26
def build
37
# Fetch the code:

examples/compare/benchmark.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
# Released under the MIT License.
5+
# Copyright, 2020-2023, by Samuel Williams.
26

37
require 'benchmark'
48

examples/compare/gems.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
# Released under the MIT License.
4+
# Copyright, 2020-2023, by Samuel Williams.
15

26
source "https://rubygems.org"
37

examples/download/chunked.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
# Released under the MIT License.
5+
# Copyright, 2020-2023, by Samuel Williams.
26

37
require 'async'
48
require 'async/clock'

examples/fetch/gems.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
# Released under the MIT License.
4+
# Copyright, 2018-2023, by Samuel Williams.
15

26
gem 'rack'
37
gem 'falcon'

examples/google/codeotaku.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
# Released under the MIT License.
5+
# Copyright, 2020-2023, by Samuel Williams.
26

37
require "async"
48
require "async/clock"

examples/google/search.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
# Released under the MIT License.
5+
# Copyright, 2019-2023, by Samuel Williams.
26

37
require "async"
48
require "async/clock"

examples/licenses/gemspect.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
# Released under the MIT License.
5+
# Copyright, 2020-2023, by Samuel Williams.
26

37
require 'csv'
48
require 'json'

examples/licenses/list.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
# Released under the MIT License.
5+
# Copyright, 2020-2023, by Samuel Williams.
26

37
require 'csv'
48
require 'json'

examples/race/client.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
# Released under the MIT License.
5+
# Copyright, 2021-2023, by Samuel Williams.
26

37
require 'async'
48
require_relative '../../lib/async/http/internet'
@@ -37,4 +41,4 @@
3741
task.sleep 0.1
3842
t.stop
3943
end
40-
end
44+
end

examples/race/server.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
# Released under the MIT License.
5+
# Copyright, 2021-2023, by Samuel Williams.
26

37
require 'async'
48
require 'async/http/server'

examples/request.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/usr/bin/env ruby
2-
#
3-
# $LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
4-
# $LOAD_PATH.unshift(File.expand_path("../../http-protocol/lib", __dir__))
2+
# frozen_string_literal: true
3+
4+
# Released under the MIT License.
5+
# Copyright, 2018-2023, by Samuel Williams.
56

67
require 'async'
78
require 'async/http/client'

examples/request/http10.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
# Released under the MIT License.
5+
# Copyright, 2020-2023, by Samuel Williams.
26

37
require 'async'
48
require_relative '../../lib/async/http/endpoint'

examples/stream/stop.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
# Released under the MIT License.
5+
# Copyright, 2020-2023, by Samuel Williams.
26

37
require 'async'
48
require 'async/http/internet'

examples/trenni/streaming.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
# Released under the MIT License.
4+
# Copyright, 2019-2023, by Samuel Williams.
15

26
require 'trenni/template'
37

examples/upload/client.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
# Released under the MIT License.
5+
# Copyright, 2018-2023, by Samuel Williams.
6+
# Copyright, 2020, by Bruno Sutic.
27

38
$LOAD_PATH.unshift File.expand_path("../../lib", __dir__)
49

examples/upload/server.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# frozen_string_literal: true
2+
3+
# Released under the MIT License.
4+
# Copyright, 2018-2023, by Samuel Williams.
5+
# Copyright, 2020, by Bruno Sutic.
16

27
$LOAD_PATH.unshift File.expand_path("../../lib", __dir__)
38

examples/upload/upload.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
# Released under the MIT License.
5+
# Copyright, 2018-2023, by Samuel Williams.
6+
# Copyright, 2020, by Bruno Sutic.
27

38
require 'async'
49
require 'protocol/http/body/file'

gems.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# frozen_string_literal: true
2+
3+
# Released under the MIT License.
4+
# Copyright, 2017-2023, by Samuel Williams.
5+
16
source 'https://rubygems.org'
27

38
gemspec

gems/async-head.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# frozen_string_literal: true
22

3+
# Released under the MIT License.
4+
# Copyright, 2021-2023, by Samuel Williams.
5+
36
source 'https://rubygems.org'
47

58
eval_gemfile("../gems.rb")

gems/async-v1.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# frozen_string_literal: true
22

3+
# Released under the MIT License.
4+
# Copyright, 2021-2023, by Samuel Williams.
5+
36
source 'https://rubygems.org'
47

58
eval_gemfile("../gems.rb")

lib/async/http.rb

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,7 @@
11
# frozen_string_literal: true
2-
#
3-
# Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
4-
#
5-
# Permission is hereby granted, free of charge, to any person obtaining a copy
6-
# of this software and associated documentation files (the "Software"), to deal
7-
# in the Software without restriction, including without limitation the rights
8-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
# copies of the Software, and to permit persons to whom the Software is
10-
# furnished to do so, subject to the following conditions:
11-
#
12-
# The above copyright notice and this permission notice shall be included in
13-
# all copies or substantial portions of the Software.
14-
#
15-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21-
# THE SOFTWARE.
2+
3+
# Released under the MIT License.
4+
# Copyright, 2017-2023, by Samuel Williams.
225

236
require_relative 'http/version'
247

lib/async/http/body.rb

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,7 @@
11
# frozen_string_literal: true
2-
#
3-
# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
4-
#
5-
# Permission is hereby granted, free of charge, to any person obtaining a copy
6-
# of this software and associated documentation files (the "Software"), to deal
7-
# in the Software without restriction, including without limitation the rights
8-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
# copies of the Software, and to permit persons to whom the Software is
10-
# furnished to do so, subject to the following conditions:
11-
#
12-
# The above copyright notice and this permission notice shall be included in
13-
# all copies or substantial portions of the Software.
14-
#
15-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21-
# THE SOFTWARE.
2+
3+
# Released under the MIT License.
4+
# Copyright, 2018-2023, by Samuel Williams.
225

236
require 'protocol/http/body/buffered'
247
require_relative 'body/writable'

lib/async/http/body/delayed.rb

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
11
# frozen_string_literal: true
2-
#
3-
# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
4-
#
5-
# Permission is hereby granted, free of charge, to any person obtaining a copy
6-
# of this software and associated documentation files (the "Software"), to deal
7-
# in the Software without restriction, including without limitation the rights
8-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
# copies of the Software, and to permit persons to whom the Software is
10-
# furnished to do so, subject to the following conditions:
11-
#
12-
# The above copyright notice and this permission notice shall be included in
13-
# all copies or substantial portions of the Software.
14-
#
15-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21-
# THE SOFTWARE.
2+
3+
# Released under the MIT License.
4+
# Copyright, 2018-2023, by Samuel Williams.
5+
# Copyright, 2020, by Bruno Sutic.
226

237
require 'protocol/http/body/wrapper'
248

0 commit comments

Comments
 (0)