From e1c1103d0e1b0a788bcfed070a8fb3ac16b4683c Mon Sep 17 00:00:00 2001 From: Mattia Giuffrida Date: Thu, 6 Jan 2022 18:21:41 +0000 Subject: [PATCH 1/4] Re-add support for Ruby 2.4+ --- .github/workflows/ci.yaml | 6 +----- .rubocop.yml | 2 +- Gemfile | 2 +- faraday-multipart.gemspec | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f4ff746..3cf9cb6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,11 +25,7 @@ jobs: matrix: ## Due to https://github.com/actions/runner/issues/849, ## we have to use quotes for '3.0' - ruby: - - '2.6' - - '2.7' - - '3.0' - - '3.1' + ruby: ['2.4', '2.5', '2.6', '2.7', '3.0', '3.1'] steps: - uses: actions/checkout@v2 - name: Set up Ruby diff --git a/.rubocop.yml b/.rubocop.yml index b5c9da6..7b92ee9 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -13,7 +13,7 @@ inherit_mode: AllCops: DisplayCopNames: true DisplayStyleGuide: true - TargetRubyVersion: 2.6 + TargetRubyVersion: 2.4 SuggestExtensions: false NewCops: enable diff --git a/Gemfile b/Gemfile index 823b945..04695e7 100644 --- a/Gemfile +++ b/Gemfile @@ -10,7 +10,7 @@ group :development, :test do gem 'multipart-parser' gem 'rake', '~> 13.0' gem 'rspec', '~> 3.0' - gem 'rubocop', '~> 1.21.0' + gem 'rubocop', '~> 1.12.0' gem 'rubocop-packaging', '~> 0.5.0' gem 'rubocop-performance', '~> 1.0' gem 'rubocop-rspec', '~> 2.0' diff --git a/faraday-multipart.gemspec b/faraday-multipart.gemspec index 10c6e7f..ca0bba4 100644 --- a/faraday-multipart.gemspec +++ b/faraday-multipart.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.files = Dir['lib/**/*', 'README.md', 'LICENSE.md', 'CHANGELOG.md'] - spec.required_ruby_version = '>= 2.6', '< 4' + spec.required_ruby_version = '>= 2.4', '< 4' spec.add_dependency 'multipart-post', '>= 1.2', '< 3' end From 009f13463695d32a04a084a968f13f46be132c8a Mon Sep 17 00:00:00 2001 From: Mattia Giuffrida Date: Thu, 6 Jan 2022 18:22:13 +0000 Subject: [PATCH 2/4] Add missing UploadIO alias --- lib/faraday/multipart.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/faraday/multipart.rb b/lib/faraday/multipart.rb index 3bd5022..20f444c 100644 --- a/lib/faraday/multipart.rb +++ b/lib/faraday/multipart.rb @@ -11,8 +11,9 @@ module Multipart Faraday::Request.register_middleware(multipart: Faraday::Multipart::Middleware) end - # Aliases for Faraday v1 + # Aliases for Faraday v1, these are all deprecated and will be removed in v2 of this middleware FilePart = Multipart::FilePart Parts = Multipart::Parts CompositeReadIO = Multipart::CompositeReadIO + UploadIO = ::UploadIO end From dbc7c6114c6dbf5209cf8838e8e1fd7baa165467 Mon Sep 17 00:00:00 2001 From: Mattia Giuffrida Date: Thu, 6 Jan 2022 18:22:34 +0000 Subject: [PATCH 3/4] Version bump to 1.0.2 --- lib/faraday/multipart/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/faraday/multipart/version.rb b/lib/faraday/multipart/version.rb index 2af082f..a631e3d 100644 --- a/lib/faraday/multipart/version.rb +++ b/lib/faraday/multipart/version.rb @@ -2,6 +2,6 @@ module Faraday module Multipart - VERSION = '1.0.1' + VERSION = '1.0.2' end end From 3d309e0e0d198fcb3367aa5558ff67c44247b623 Mon Sep 17 00:00:00 2001 From: Mattia Giuffrida Date: Thu, 6 Jan 2022 18:43:51 +0000 Subject: [PATCH 4/4] Lower simplecov version to support Ruby 2.4 --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 04695e7..2b3b5d7 100644 --- a/Gemfile +++ b/Gemfile @@ -14,5 +14,5 @@ group :development, :test do gem 'rubocop-packaging', '~> 0.5.0' gem 'rubocop-performance', '~> 1.0' gem 'rubocop-rspec', '~> 2.0' - gem 'simplecov', '~> 0.21.0' + gem 'simplecov', '~> 0.18.0' end