From 18473c63009749aa2fac0ff1e248449746a36f79 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Thu, 8 Feb 2024 00:20:13 +1300 Subject: [PATCH] Modernize gem. --- .editorconfig | 4 ++ .github/workflows/coverage.yaml | 10 ++--- .github/workflows/documentation.yaml | 11 ++--- .github/workflows/test-external.yaml | 4 +- .github/workflows/test.yaml | 4 +- async-http-faraday.gemspec | 9 ++-- examples/topics.rb | 2 +- gems.rb | 7 ++- lib/async/http/faraday.rb | 2 +- lib/async/http/faraday/adapter.rb | 2 +- lib/async/http/faraday/default.rb | 2 +- lib/async/http/faraday/version.rb | 2 +- license.md | 2 +- readme.md | 44 +++++++------------ spec/async/http/faraday/adapter/proxy_spec.rb | 2 +- spec/async/http/faraday/adapter_spec.rb | 2 +- spec/spec_helper.rb | 2 +- 17 files changed, 50 insertions(+), 61 deletions(-) diff --git a/.editorconfig b/.editorconfig index 538ba2b..a6e7d26 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,3 +3,7 @@ root = true [*] indent_style = tab indent_size = 2 + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index 81f3c65..68adbf2 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -21,10 +21,10 @@ jobs: - macos ruby: - - "3.2" + - "3.3" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{matrix.ruby}} @@ -34,7 +34,7 @@ jobs: timeout-minutes: 5 run: bundle exec bake test - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: coverage-${{matrix.os}}-${{matrix.ruby}} path: .covered.db @@ -44,10 +44,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.2" + ruby-version: "3.3" bundler-cache: true - uses: actions/download-artifact@v3 diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index 3d483fc..8dc5227 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -5,9 +5,6 @@ on: branches: - main - # Allows you to run this workflow manually from the Actions tab: - workflow_dispatch: - # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages: permissions: contents: read @@ -28,11 +25,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.2" + ruby-version: "3.3" bundler-cache: true - name: Installing packages @@ -43,7 +40,7 @@ jobs: run: bundle exec bake utopia:project:static --force no - name: Upload documentation artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v2 with: path: docs @@ -58,4 +55,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v1 + uses: actions/deploy-pages@v3 diff --git a/.github/workflows/test-external.yaml b/.github/workflows/test-external.yaml index 214149c..18efa2c 100644 --- a/.github/workflows/test-external.yaml +++ b/.github/workflows/test-external.yaml @@ -20,13 +20,13 @@ jobs: - macos ruby: - - "2.7" - "3.0" - "3.1" - "3.2" + - "3.3" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{matrix.ruby}} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5c765b6..1dca864 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -21,10 +21,10 @@ jobs: - macos ruby: - - "2.7" - "3.0" - "3.1" - "3.2" + - "3.3" experimental: [false] @@ -40,7 +40,7 @@ jobs: experimental: true steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{matrix.ruby}} diff --git a/async-http-faraday.gemspec b/async-http-faraday.gemspec index 24ec2e5..e459c56 100644 --- a/async-http-faraday.gemspec +++ b/async-http-faraday.gemspec @@ -7,7 +7,7 @@ Gem::Specification.new do |spec| spec.version = Async::HTTP::Faraday::VERSION spec.summary = "Provides an adaptor between async-http and faraday." - spec.authors = ["Samuel Williams", "Igor Sidorov", "Andreas Garnaes", "Olle Jonsson", "Benoit Daloze", "Denis Talakevich", "Flavio Fernandes", "Genki Takiuchi"] + spec.authors = ["Samuel Williams", "Igor Sidorov", "Andreas Garnaes", "Genki Takiuchi", "Olle Jonsson", "Benoit Daloze", "Denis Talakevich", "Flavio Fernandes"] spec.license = "MIT" spec.cert_chain = ['release.cert'] @@ -17,11 +17,8 @@ Gem::Specification.new do |spec| spec.files = Dir.glob(['{examples,lib}/**/*', '*.md'], File::FNM_DOTMATCH, base: __dir__) + spec.required_ruby_version = ">= 3.0" + spec.add_dependency "async-http", "~> 0.42" spec.add_dependency "faraday" - - spec.add_development_dependency "async-rspec", "~> 1.2" - spec.add_development_dependency "bundler" - spec.add_development_dependency "covered" - spec.add_development_dependency "rspec", "~> 3.6" end diff --git a/examples/topics.rb b/examples/topics.rb index e8ab3ae..6d1c57a 100644 --- a/examples/topics.rb +++ b/examples/topics.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2020, by Samuel Williams. +# Copyright, 2020-2024, by Samuel Williams. $LOAD_PATH.unshift File.expand_path("../lib", __dir__) diff --git a/gems.rb b/gems.rb index ff3b643..3cc8ab7 100644 --- a/gems.rb +++ b/gems.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2021, by Samuel Williams. +# Copyright, 2018-2024, by Samuel Williams. source 'https://rubygems.org' @@ -18,3 +18,8 @@ gem "faraday-multipart" end + +# Moved Development Dependencies +gem "async-rspec", "~> 1.2" +gem "covered" +gem "rspec", "~> 3.6" diff --git a/lib/async/http/faraday.rb b/lib/async/http/faraday.rb index dee256d..bbce6ea 100644 --- a/lib/async/http/faraday.rb +++ b/lib/async/http/faraday.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2018-2020, by Samuel Williams. +# Copyright, 2018-2024, by Samuel Williams. require_relative "faraday/version" require_relative "faraday/adapter" diff --git a/lib/async/http/faraday/adapter.rb b/lib/async/http/faraday/adapter.rb index 528d00f..bd83a46 100644 --- a/lib/async/http/faraday/adapter.rb +++ b/lib/async/http/faraday/adapter.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2018-2021, by Samuel Williams. +# Copyright, 2018-2024, by Samuel Williams. # Copyright, 2018, by Andreas Garnaes. # Copyright, 2019, by Denis Talakevich. # Copyright, 2019-2020, by Igor Sidorov. diff --git a/lib/async/http/faraday/default.rb b/lib/async/http/faraday/default.rb index e17f628..cba99d9 100644 --- a/lib/async/http/faraday/default.rb +++ b/lib/async/http/faraday/default.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2020, by Samuel Williams. +# Copyright, 2020-2024, by Samuel Williams. require_relative 'adapter' diff --git a/lib/async/http/faraday/version.rb b/lib/async/http/faraday/version.rb index cb04da9..f697c7d 100644 --- a/lib/async/http/faraday/version.rb +++ b/lib/async/http/faraday/version.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2018-2021, by Samuel Williams. +# Copyright, 2018-2024, by Samuel Williams. module Async module HTTP diff --git a/license.md b/license.md index 8a3832f..7dc70da 100644 --- a/license.md +++ b/license.md @@ -1,6 +1,6 @@ # MIT License -Copyright, 2018-2021, by Samuel Williams. +Copyright, 2018-2024, by Samuel Williams. Copyright, 2018, by Andreas Garnaes. Copyright, 2019, by Denis Talakevich. Copyright, 2019-2020, by Igor Sidorov. diff --git a/readme.md b/readme.md index d058822..2dba17e 100644 --- a/readme.md +++ b/readme.md @@ -54,32 +54,18 @@ require 'async/http/faraday/default' ## Contributing -1. Fork it -2. Create your feature branch (`git checkout -b my-new-feature`) -3. Commit your changes (`git commit -am 'Add some feature'`) -4. Push to the branch (`git push origin my-new-feature`) -5. Create new Pull Request - -## License - -Released under the MIT license. - -Copyright, 2015, by [Samuel G. D. Williams](http://www.codeotaku.com/samuel-williams). - -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. +We welcome contributions to this project. + +1. Fork it. +2. Create your feature branch (`git checkout -b my-new-feature`). +3. Commit your changes (`git commit -am 'Add some feature'`). +4. Push to the branch (`git push origin my-new-feature`). +5. Create new Pull Request. + +### Developer Certificate of Origin + +This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted. + +### Contributor Covenant + +This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms. diff --git a/spec/async/http/faraday/adapter/proxy_spec.rb b/spec/async/http/faraday/adapter/proxy_spec.rb index 066b59a..75d5b70 100644 --- a/spec/async/http/faraday/adapter/proxy_spec.rb +++ b/spec/async/http/faraday/adapter/proxy_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2021, by Samuel Williams. +# Copyright, 2021-2024, by Samuel Williams. require 'async/http/faraday' require 'async/http/server' diff --git a/spec/async/http/faraday/adapter_spec.rb b/spec/async/http/faraday/adapter_spec.rb index 8f5b2dc..8db70c6 100644 --- a/spec/async/http/faraday/adapter_spec.rb +++ b/spec/async/http/faraday/adapter_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2018-2021, by Samuel Williams. +# Copyright, 2018-2024, by Samuel Williams. # Copyright, 2018, by Andreas Garnaes. # Copyright, 2019, by Denis Talakevich. # Copyright, 2019-2020, by Igor Sidorov. diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 1fabf32..525ee86 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2018-2020, by Samuel Williams. +# Copyright, 2018-2024, by Samuel Williams. # Copyright, 2019, by Igor Sidorov. require 'async/rspec'