faraday-follow_redirects 0.2.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: b396f715a7f02a5e9ab476eefedeb86e6a5b0b3f82eda286463d29edd9c024c6
4
- data.tar.gz: c8d78bbc37c431d332b7acaf9caf4a6f5b855da4b91f9ce4037f3d6032ad3163
3
+ metadata.gz: fc7b491899791d3b09fe1cff8de62de307c403946953c7d1ccef2114b32cb0a3
4
+ data.tar.gz: 1fd28e5219fe741dd38625195360f78b6f9618d33573610fdd10ec6808e15416
5
5
  SHA512:
6
- metadata.gz: 6449a2732a976a7f41af86817f80a16285f028b4c00484826b4c449f56b7e3eee202a24073c775486cbc2f17c15d0da30be8789ed3da98972b2fbe4b9a9961f9
7
- data.tar.gz: d32af1854712ee1aa0322633899813e5d181e1e932a5a1334f625e1f4e500542e42d1924817b98c38ae4dc3bd5dd89865c05c09a05c2854a895cdc48e5c9c48b
6
+ metadata.gz: 3985fcb17892ff681163a9c0e3c3783a3f9ad9a77ac0b1b4095f1e9ebfdcc18a452f716a7ff08cc070d9f55d230cf247c9b9daffabb6bb1249df37064b5c40e6
7
+ data.tar.gz: 5e968dd8180c0972cf2a772d16769e6054aeefb9ddb6f82c9f32e6c286db7a2d87796587993e8a77a13a6d8784541a9f526d82fa9c9be8033c3bc274873bf559
data/CHANGELOG.md CHANGED
@@ -4,10 +4,22 @@
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
+
15
+ ## 0.3.0 (2022-04-02)
16
+
17
+ * lose version constraint on faraday to support 1.x and 2.x (#4)
18
+
7
19
  ## 0.2.0 (2022-03-07)
8
20
 
9
- * explicitly require faraday when loading this gem
21
+ * require faraday explicitly when loading this gem
10
22
 
11
23
  ## 0.1.0 (2022-02-24)
12
24
 
13
- * Initial release
25
+ * initial release
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`. If you are still using Faraday 1.x, check out https://github.com/lostisland/faraday_middleware.
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,9 +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
 
65
+ The `.ruby-version` file defines the default version to be used for development.
66
+
67
+ ### Appraisal for testing multiple versions of dependencies
68
+
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:
70
+
71
+ ```shell
72
+ bundle exec appraisal faraday_1 rspec
73
+ bundle exec appraisal faraday_2 rspec
74
+ ```
75
+
54
76
  ## Contributing
55
77
 
56
- 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).
57
79
 
58
80
  ## License
59
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.2.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.2.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-03-07 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
@@ -16,7 +15,7 @@ dependencies:
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: '2'
18
+ version: '1'
20
19
  - - "<"
21
20
  - !ruby/object:Gem::Version
22
21
  version: '3'
@@ -26,137 +25,11 @@ dependencies:
26
25
  requirements:
27
26
  - - ">="
28
27
  - !ruby/object:Gem::Version
29
- version: '2'
28
+ version: '1'
30
29
  - - "<"
31
30
  - !ruby/object:Gem::Version
32
31
  version: '3'
33
- - !ruby/object:Gem::Dependency
34
- name: bundler
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '2.0'
40
- type: :development
41
- prerelease: false
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: '2.0'
47
- - !ruby/object:Gem::Dependency
48
- name: rake
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '13.0'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: '13.0'
61
- - !ruby/object:Gem::Dependency
62
- name: rspec
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '3.0'
68
- type: :development
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '3.0'
75
- - !ruby/object:Gem::Dependency
76
- name: simplecov
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: 0.21.0
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - "~>"
87
- - !ruby/object:Gem::Version
88
- version: 0.21.0
89
- - !ruby/object:Gem::Dependency
90
- name: webmock
91
- requirement: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - "~>"
94
- - !ruby/object:Gem::Version
95
- version: 3.14.0
96
- type: :development
97
- prerelease: false
98
- version_requirements: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - "~>"
101
- - !ruby/object:Gem::Version
102
- version: 3.14.0
103
- - !ruby/object:Gem::Dependency
104
- name: rubocop
105
- requirement: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - "~>"
108
- - !ruby/object:Gem::Version
109
- version: 1.25.0
110
- type: :development
111
- prerelease: false
112
- version_requirements: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - "~>"
115
- - !ruby/object:Gem::Version
116
- version: 1.25.0
117
- - !ruby/object:Gem::Dependency
118
- name: rubocop-packaging
119
- requirement: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - "~>"
122
- - !ruby/object:Gem::Version
123
- version: 0.5.0
124
- type: :development
125
- prerelease: false
126
- version_requirements: !ruby/object:Gem::Requirement
127
- requirements:
128
- - - "~>"
129
- - !ruby/object:Gem::Version
130
- version: 0.5.0
131
- - !ruby/object:Gem::Dependency
132
- name: rubocop-performance
133
- requirement: !ruby/object:Gem::Requirement
134
- requirements:
135
- - - "~>"
136
- - !ruby/object:Gem::Version
137
- version: '1.13'
138
- type: :development
139
- prerelease: false
140
- version_requirements: !ruby/object:Gem::Requirement
141
- requirements:
142
- - - "~>"
143
- - !ruby/object:Gem::Version
144
- version: '1.13'
145
- - !ruby/object:Gem::Dependency
146
- name: rubocop-rspec
147
- requirement: !ruby/object:Gem::Requirement
148
- requirements:
149
- - - "~>"
150
- - !ruby/object:Gem::Version
151
- version: '2.8'
152
- type: :development
153
- prerelease: false
154
- version_requirements: !ruby/object:Gem::Requirement
155
- requirements:
156
- - - "~>"
157
- - !ruby/object:Gem::Version
158
- version: '2.8'
159
- description: 'Faraday 2.x compatible extraction of FaradayMiddleware::FollowRedirects.
32
+ description: 'Faraday 1.x and 2.x compatible extraction of FaradayMiddleware::FollowRedirects.
160
33
 
161
34
  '
162
35
  email:
@@ -172,18 +45,16 @@ files:
172
45
  - lib/faraday/follow_redirects/middleware.rb
173
46
  - lib/faraday/follow_redirects/redirect_limit_reached.rb
174
47
  - lib/faraday/follow_redirects/version.rb
175
- homepage: https://github.com/tisba/faraday-follow_redirects
48
+ homepage: https://github.com/tisba/faraday-follow-redirects
176
49
  licenses:
177
50
  - MIT
178
51
  metadata:
179
- bug_tracker_uri: https://github.com/tisba/faraday-follow_redirects/issues
180
- changelog_uri: https://github.com/tisba/faraday-follow_redirects/blob/v0.2.0/CHANGELOG.md
181
- documentation_uri: http://www.rubydoc.info/gems/faraday-follow_redirects/0.2.0
182
- homepage_uri: https://github.com/tisba/faraday-follow_redirects
52
+ bug_tracker_uri: https://github.com/tisba/faraday-follow-redirects/issues
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
55
+ homepage_uri: https://github.com/tisba/faraday-follow-redirects
183
56
  rubygems_mfa_required: 'true'
184
- source_code_uri: https://github.com/tisba/faraday-follow_redirects
185
- wiki_uri: https://github.com/tisba/faraday-follow_redirects/wiki
186
- post_install_message:
57
+ source_code_uri: https://github.com/tisba/faraday-follow-redirects
187
58
  rdoc_options: []
188
59
  require_paths:
189
60
  - lib
@@ -201,8 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
72
  - !ruby/object:Gem::Version
202
73
  version: '0'
203
74
  requirements: []
204
- rubygems_version: 3.3.7
205
- signing_key:
75
+ rubygems_version: 3.6.9
206
76
  specification_version: 4
207
- summary: Faraday 2.x compatible extraction of FaradayMiddleware::FollowRedirects
77
+ summary: Faraday 1.x and 2.x compatible extraction of FaradayMiddleware::FollowRedirects
208
78
  test_files: []