faraday-follow_redirects 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 215a9db4304aa8f544082d1f4aebfb7321b8a114da0b6b90cdff756d663a6758
4
- data.tar.gz: 68cd3a3ad6159d64504826fa527f13922b4c431708f86bf96306d8fbc962b25f
3
+ metadata.gz: fc7b491899791d3b09fe1cff8de62de307c403946953c7d1ccef2114b32cb0a3
4
+ data.tar.gz: 1fd28e5219fe741dd38625195360f78b6f9618d33573610fdd10ec6808e15416
5
5
  SHA512:
6
- metadata.gz: 03a2c36aa3186ee886cde66d654871e1fe56d87642c1a3e642dd7ace6a7b9ffd7ac5392cea6f41a885d998137bd78eaf79b4f5ae232fe01a40fd8a73d8d86391
7
- data.tar.gz: a253c98502493c8391782eed7968f83089b6a6286fc30d0c3c522e775dc0f6d03898f5d774e7bbfd64a951324015e866bfb1f784c40ba86baf8ab0b30a3b07d1
6
+ metadata.gz: 3985fcb17892ff681163a9c0e3c3783a3f9ad9a77ac0b1b4095f1e9ebfdcc18a452f716a7ff08cc070d9f55d230cf247c9b9daffabb6bb1249df37064b5c40e6
7
+ data.tar.gz: 5e968dd8180c0972cf2a772d16769e6054aeefb9ddb6f82c9f32e6c286db7a2d87796587993e8a77a13a6d8784541a9f526d82fa9c9be8033c3bc274873bf559
data/CHANGELOG.md CHANGED
@@ -4,9 +4,17 @@
4
4
 
5
5
  * …
6
6
 
7
+ ## 0.4.0 (2025-10-01)
8
+
9
+ This release contains no user facing changes.
10
+
11
+ * internal: adopt "Trusted Publishing" for new releases
12
+ * internal: harden GitHub Action workflows
13
+ * internal: move dev dependencies to Gemfile for easier updates
14
+
7
15
  ## 0.3.0 (2022-04-02)
8
16
 
9
- * losen version constraint on faraday to support 1.x and 2.x (#4)
17
+ * lose version constraint on faraday to support 1.x and 2.x (#4)
10
18
 
11
19
  ## 0.2.0 (2022-03-07)
12
20
 
data/README.md CHANGED
@@ -1,12 +1,15 @@
1
1
  # Faraday Follow Redirects
2
2
 
3
- [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/tisba/faraday-follow-redirects/CI)](https://github.com/tisba/faraday-follow-redirects/actions?query=branch%3Amain)
3
+ [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/tisba/faraday-follow-redirects/ci.yaml)](https://github.com/tisba/faraday-follow-redirects/actions?query=branch%3Amain)
4
4
  [![Gem](https://img.shields.io/gem/v/faraday-follow_redirects.svg?style=flat-square)](https://rubygems.org/gems/faraday-follow_redirects)
5
5
  [![License](https://img.shields.io/github/license/tisba/faraday-follow-redirects.svg?style=flat-square)](LICENSE.md)
6
6
 
7
- Faraday 2.x compatible extraction of `FaradayMiddleware::FollowRedirects`. This gem will also work with Faraday 1.x, to support gem codebases which can work with Faraday 1.x or 2.x. For the former standard version of this middleware for Faraday 1.x, check out https://github.com/lostisland/faraday_middleware. Faraday 1.x support is considered deprecated, please update to Faraday 2.x.
7
+ [Faraday](https://github.com/lostisland/faraday) middleware to follow HTTP redirects transparently.
8
8
 
9
- This gem is based on the deprecated [`FaradayMiddleware::FollowRedirects` (v1.2.0)](https://github.com/lostisland/faraday_middleware/blob/v1.2.0/lib/faraday_middleware/response/follow_redirects.rb).
9
+ > [!IMPORTANT]
10
+ > This is a Faraday 2.x compatible extraction of the deprecated [`FaradayMiddleware::FollowRedirects` (v1.2.0)](https://github.com/lostisland/faraday_middleware/blob/v1.2.0/lib/faraday_middleware/response/follow_redirects.rb). This gem will also work with Faraday 1.x on a best-effort basis. **Faraday 1.x support is considered deprecated, please update to Faraday 2.x as soon as possible!**
11
+ >
12
+ > We only support non-EOL versions of Ruby. See [Ruby Maintenance Branches](https://www.ruby-lang.org/en/downloads/branches/) for the list of non-EOL Rubies.
10
13
 
11
14
  ## Installation
12
15
 
@@ -34,12 +37,20 @@ gem install faraday-follow_redirects
34
37
  require 'faraday/follow_redirects'
35
38
 
36
39
  Faraday.new(url: url) do |faraday|
37
- faraday.use Faraday::FollowRedirects::Middleware
38
-
40
+ faraday.response :follow_redirects # use Faraday::FollowRedirects::Middleware
39
41
  faraday.adapter Faraday.default_adapter
40
42
  end
41
43
  ```
42
44
 
45
+ ## Upgrading from Faraday 1.x
46
+
47
+ If you still use Faraday 1.x, and have uninstalled the `faraday_middleware` gem, all you have to change is:
48
+
49
+ ```diff
50
+ - conn.use FaradayMiddleware::FollowRedirects
51
+ + conn.use Faraday::FollowRedirects::Middleware
52
+ ```
53
+
43
54
  ## Development
44
55
 
45
56
  After checking out the repo, run `bin/setup` to install dependencies.
@@ -51,18 +62,20 @@ To install this gem onto your local machine, run `rake build`.
51
62
  To release a new version, make a commit with a message such as "Bumped to 0.0.2" and then run `rake release`.
52
63
  See how it works [here](https://bundler.io/guides/creating_gem.html#releasing-the-gem).
53
64
 
54
- We only supports non-EOL versions of Ruby. See [Ruby Maintenance Branches](https://www.ruby-lang.org/en/downloads/branches/) for the list of non-EOL Rubies.
65
+ The `.ruby-version` file defines the default version to be used for development.
55
66
 
56
67
  ### Appraisal for testing multiple versions of dependencies
57
68
 
58
69
  We use [appraisal](https://github.com/thoughtbot/appraisal) to test against both faraday 1.x and 2.x, and `./bin/test` will run tests against both. To run tests against just one you could:
59
70
 
60
- bundle exec appraisal faraday_1 rspec
61
- bundle exec appraisal faraday_2 rspec
71
+ ```shell
72
+ bundle exec appraisal faraday_1 rspec
73
+ bundle exec appraisal faraday_2 rspec
74
+ ```
62
75
 
63
76
  ## Contributing
64
77
 
65
- Bug reports and pull requests are welcome on [GitHub](https://github.com/tisba/faraday-follow_redirects).
78
+ Bug reports and pull requests are welcome on [GitHub](https://github.com/tisba/faraday-follow-redirects).
66
79
 
67
80
  ## License
68
81
 
@@ -10,7 +10,7 @@ module Faraday
10
10
  attr_reader :response
11
11
 
12
12
  def initialize(response)
13
- super "too many redirects; last one to: #{response['location']}"
13
+ super("too many redirects; last one to: #{response['location']}")
14
14
  @response = response
15
15
  end
16
16
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Faraday
4
4
  module FollowRedirects
5
- VERSION = '0.3.0'
5
+ VERSION = '0.4.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faraday-follow_redirects
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Cohnen
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2022-04-02 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: faraday
@@ -30,147 +29,7 @@ dependencies:
30
29
  - - "<"
31
30
  - !ruby/object:Gem::Version
32
31
  version: '3'
33
- - !ruby/object:Gem::Dependency
34
- name: appraisal
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '2.4'
40
- type: :development
41
- prerelease: false
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: '2.4'
47
- - !ruby/object:Gem::Dependency
48
- name: bundler
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '2.0'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: '2.0'
61
- - !ruby/object:Gem::Dependency
62
- name: rake
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '13.0'
68
- type: :development
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '13.0'
75
- - !ruby/object:Gem::Dependency
76
- name: rspec
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: '3.0'
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - "~>"
87
- - !ruby/object:Gem::Version
88
- version: '3.0'
89
- - !ruby/object:Gem::Dependency
90
- name: simplecov
91
- requirement: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - "~>"
94
- - !ruby/object:Gem::Version
95
- version: 0.21.0
96
- type: :development
97
- prerelease: false
98
- version_requirements: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - "~>"
101
- - !ruby/object:Gem::Version
102
- version: 0.21.0
103
- - !ruby/object:Gem::Dependency
104
- name: webmock
105
- requirement: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - "~>"
108
- - !ruby/object:Gem::Version
109
- version: 3.14.0
110
- type: :development
111
- prerelease: false
112
- version_requirements: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - "~>"
115
- - !ruby/object:Gem::Version
116
- version: 3.14.0
117
- - !ruby/object:Gem::Dependency
118
- name: rubocop
119
- requirement: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - "~>"
122
- - !ruby/object:Gem::Version
123
- version: 1.25.0
124
- type: :development
125
- prerelease: false
126
- version_requirements: !ruby/object:Gem::Requirement
127
- requirements:
128
- - - "~>"
129
- - !ruby/object:Gem::Version
130
- version: 1.25.0
131
- - !ruby/object:Gem::Dependency
132
- name: rubocop-packaging
133
- requirement: !ruby/object:Gem::Requirement
134
- requirements:
135
- - - "~>"
136
- - !ruby/object:Gem::Version
137
- version: 0.5.0
138
- type: :development
139
- prerelease: false
140
- version_requirements: !ruby/object:Gem::Requirement
141
- requirements:
142
- - - "~>"
143
- - !ruby/object:Gem::Version
144
- version: 0.5.0
145
- - !ruby/object:Gem::Dependency
146
- name: rubocop-performance
147
- requirement: !ruby/object:Gem::Requirement
148
- requirements:
149
- - - "~>"
150
- - !ruby/object:Gem::Version
151
- version: '1.13'
152
- type: :development
153
- prerelease: false
154
- version_requirements: !ruby/object:Gem::Requirement
155
- requirements:
156
- - - "~>"
157
- - !ruby/object:Gem::Version
158
- version: '1.13'
159
- - !ruby/object:Gem::Dependency
160
- name: rubocop-rspec
161
- requirement: !ruby/object:Gem::Requirement
162
- requirements:
163
- - - "~>"
164
- - !ruby/object:Gem::Version
165
- version: '2.8'
166
- type: :development
167
- prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
- requirements:
170
- - - "~>"
171
- - !ruby/object:Gem::Version
172
- version: '2.8'
173
- description: 'Faraday 2.x compatible extraction of FaradayMiddleware::FollowRedirects.
32
+ description: 'Faraday 1.x and 2.x compatible extraction of FaradayMiddleware::FollowRedirects.
174
33
 
175
34
  '
176
35
  email:
@@ -191,13 +50,11 @@ licenses:
191
50
  - MIT
192
51
  metadata:
193
52
  bug_tracker_uri: https://github.com/tisba/faraday-follow-redirects/issues
194
- changelog_uri: https://github.com/tisba/faraday-follow-redirects/blob/v0.3.0/CHANGELOG.md
195
- documentation_uri: http://www.rubydoc.info/gems/faraday-follow_redirects/0.3.0
53
+ changelog_uri: https://github.com/tisba/faraday-follow-redirects/blob/v0.4.0/CHANGELOG.md
54
+ documentation_uri: http://www.rubydoc.info/gems/faraday-follow_redirects/0.4.0
196
55
  homepage_uri: https://github.com/tisba/faraday-follow-redirects
197
56
  rubygems_mfa_required: 'true'
198
57
  source_code_uri: https://github.com/tisba/faraday-follow-redirects
199
- wiki_uri: https://github.com/tisba/faraday-follow-redirects/wiki
200
- post_install_message:
201
58
  rdoc_options: []
202
59
  require_paths:
203
60
  - lib
@@ -215,8 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
72
  - !ruby/object:Gem::Version
216
73
  version: '0'
217
74
  requirements: []
218
- rubygems_version: 3.3.10
219
- signing_key:
75
+ rubygems_version: 3.6.9
220
76
  specification_version: 4
221
- summary: Faraday 2.x compatible extraction of FaradayMiddleware::FollowRedirects
77
+ summary: Faraday 1.x and 2.x compatible extraction of FaradayMiddleware::FollowRedirects
222
78
  test_files: []