faraday_middleware 1.2.0 → 1.2.1

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: b9533a5d53e299a95e8b2aa19d277ac32ed800930c0abd4d92c67f025c98101d
4
- data.tar.gz: 7261d4f25c4e0edeaaba0718947af74439d2fef8a114278a74f8de63f0f6c575
3
+ metadata.gz: 7b8d5f2f821f7c0f8ed6326ad5e93dbc2865a84544cf2974b707b63afe9b13bd
4
+ data.tar.gz: a0ca51cea4bab75193f38f8bcaa1cd62058137b4bdb9002b97fb6a9271bd25a8
5
5
  SHA512:
6
- metadata.gz: 9ae2e4ea996bb4a2ad2762a7c0812c8734879205adb05eb88aed062f0be24b26fa18de82e6cc33c7c86dfc8f7c4fa8694522732c457643c8a4d3991e50ac095a
7
- data.tar.gz: 512f5e9888e8adf5ac0d93c501470028079b463e407697353d55ef603b3a2590f46b9a6530a0a688a54e391fe9033302551f133b6d216281bf01c451e1a73f85
6
+ metadata.gz: 774928e8114a49d941e8b8863ba874395a8c3d1d57b17f7b813e0f5cbccb7133197d11013338780712c9b49868a9fe8e476fee8ade2f0065d9d188e1ae0f1ab9
7
+ data.tar.gz: 33ff16c6a46beeb4fd2580729559f0558802c909191faf800a79a89cb0fdf9893a424489aeffc2dd8089cbf91328a8f57a4ecbf0ef300b067663d74a7e733815
data/README.md CHANGED
@@ -1,12 +1,25 @@
1
1
  Faraday Middleware
2
2
  ==================
3
- [![Gem Version](https://badge.fury.io/rb/faraday_middleware.svg)](https://rubygems.org/gems/faraday_middleware)
4
- ![GitHub Actions CI](https://github.com/lostisland/faraday_middleware/workflows/CI/badge.svg)
3
+ <a href="https://badge.fury.io/rb/faraday_middleware"><img src="https://badge.fury.io/rb/faraday_middleware@2x.png" alt="Gem Version" height="20"></a>
4
+ [![CI](https://github.com/lostisland/faraday_middleware/actions/workflows/ci.yml/badge.svg)](https://github.com/lostisland/faraday_middleware/actions/workflows/ci.yml)
5
5
 
6
6
  A collection of useful [Faraday][] middleware. [See the documentation][docs].
7
7
 
8
8
  gem install faraday_middleware
9
9
 
10
+ ## ⚠️ DEPRECATION WARNING ⚠️
11
+
12
+ As highlighted in Faraday's [UPGRADING](https://github.com/lostisland/faraday/blob/main/UPGRADING.md) guide, `faraday_middleware` is DEPRECATED, and will not be updated to support Faraday 2.0.
13
+ If you rely on `faraday_middleware` in your project and would like to support Faraday 2.0:
14
+ * The `json` middleware (request and response) are now both bundled with Faraday 🙌
15
+ * The `instrumentation` middleware is bundled with Faraday
16
+ * All other middlewares, they'll be re-released as independent gems compatible with both Faraday v1 and v2, look for [`awesome-faraday`](https://github.com/lostisland/awesome-faraday)
17
+
18
+ Most of the middlewares are up for adoption, contributors that would like to maintain them.
19
+ If you'd like to maintain any middleware, have any question or need any help, we're here!
20
+ Please reach out opening an issue or a discussion.
21
+
22
+
10
23
  Dependencies
11
24
  ------------
12
25
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Main FaradayMiddleware module.
4
4
  module FaradayMiddleware
5
- VERSION = '1.2.0' unless defined?(FaradayMiddleware::VERSION)
5
+ VERSION = '1.2.1' unless defined?(FaradayMiddleware::VERSION)
6
6
  end
@@ -27,13 +27,11 @@ module FaradayMiddleware
27
27
  Faraday::Request.register_middleware \
28
28
  oauth: -> { OAuth },
29
29
  oauth2: -> { OAuth2 },
30
- json: -> { EncodeJson },
31
30
  method_override: -> { MethodOverride }
32
31
 
33
32
  Faraday::Response.register_middleware \
34
33
  mashify: -> { Mashify },
35
34
  rashify: -> { Rashify },
36
- json: -> { ParseJson },
37
35
  json_fix: -> { ParseJson::MimeTypeFix },
38
36
  xml: -> { ParseXml },
39
37
  marshal: -> { ParseMarshal },
@@ -46,6 +44,13 @@ module FaradayMiddleware
46
44
  Faraday::Middleware.register_middleware \
47
45
  instrumentation: -> { Instrumentation },
48
46
  gzip: -> { Gzip }
47
+
48
+ # The request/reponse JSON middleware is included in Faraday since
49
+ # version 1.10.0, so we only register the middleware if it's not already.
50
+ if Gem::Version.new(Faraday::VERSION) < Gem::Version.new('1.10.0')
51
+ Faraday::Request.register_middleware(json: -> { EncodeJson })
52
+ Faraday::Response.register_middleware(json: -> { ParseJson })
53
+ end
49
54
  end
50
55
  end
51
56
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faraday_middleware
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Michaels-Ober
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-10-14 00:00:00.000000000 Z
12
+ date: 2024-09-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  requirements: []
79
- rubygems_version: 3.0.3.1
79
+ rubygems_version: 3.1.6
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: Various middleware for Faraday