Skip to content

Use external multipart and retry middleware #1367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ name: CI

on:
pull_request:

push:
branches: [main, 0.1x]
branches: [main, 0.1x, 1.x]

env:
GIT_COMMIT_SHA: ${{ github.sha }}
Expand Down Expand Up @@ -43,7 +42,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ['2.4', '2.5', '2.6', '2.7', '3.0']
ruby: ['2.6', '2.7', '3.0', '3.1']

steps:
- uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require:
AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
TargetRubyVersion: 2.4
TargetRubyVersion: 2.6

Inclusivity/Race:
Enabled: true
Expand Down
13 changes: 7 additions & 6 deletions faraday.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
spec.homepage = 'https://lostisland.github.io/faraday'
spec.licenses = ['MIT']

spec.required_ruby_version = '>= 2.4'
spec.required_ruby_version = '>= 2.6'

spec.add_dependency 'faraday-em_http', '~> 1.0'
spec.add_dependency 'faraday-em_synchrony', '~> 1.0'
spec.add_dependency 'faraday-excon', '~> 1.1'
spec.add_dependency 'faraday-httpclient', '~> 1.0.1'
spec.add_dependency 'faraday-net_http'
spec.add_dependency 'faraday-net_http_persistent', '~> 1.1'
spec.add_dependency 'faraday-patron', '~> 1.0'
spec.add_dependency 'faraday-httpclient', '< 3'
spec.add_dependency 'faraday-multipart', '~> 1.0'
spec.add_dependency 'faraday-net_http', '< 3'
spec.add_dependency 'faraday-net_http_persistent', '< 3'
spec.add_dependency 'faraday-patron', '< 3'
spec.add_dependency 'faraday-rack', '~> 1.0'
spec.add_dependency 'multipart-post', '>= 1.2', '< 3'
spec.add_dependency 'faraday-retry', '~> 1.0'
spec.add_dependency 'ruby2_keywords', '>= 0.0.4'

# Includes `examples` and `spec` to allow external adapter gems to run Faraday unit and integration tests
Expand Down
8 changes: 6 additions & 2 deletions lib/faraday.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@
require 'faraday/request'
require 'faraday/response'
require 'faraday/error'
require 'faraday/file_part'
require 'faraday/param_part'
require 'faraday/request/url_encoded' # needed by multipart

# External Middleware gems
require 'faraday/multipart'
require 'faraday/retry'

# External Adapters gems
unless defined?(JRUBY_VERSION)
require 'faraday/em_http'
require 'faraday/em_synchrony'
Expand Down
6 changes: 0 additions & 6 deletions lib/faraday/error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,4 @@ class SSLError < Error
# Raised by FaradayMiddleware::ResponseMiddleware
class ParsingError < Error
end

# Exception used to control the Retry middleware.
#
# @see Faraday::Request::Retry
class RetriableResponse < Error
end
end
128 changes: 0 additions & 128 deletions lib/faraday/file_part.rb

This file was deleted.

53 changes: 0 additions & 53 deletions lib/faraday/param_part.rb

This file was deleted.

106 changes: 0 additions & 106 deletions lib/faraday/request/multipart.rb

This file was deleted.

Loading