faraday-sunset 0.1.1 → 0.1.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +36 -12
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca7a69dd039247efb627b578875fcc563caa08b5
4
- data.tar.gz: e9bf16a1868e2ad2cf37716a30e708559f9abbb8
3
+ metadata.gz: 0a4675801498e8f952508acc69b12825f110e1a7
4
+ data.tar.gz: bbb3c14239abbb25c0c24f67f2776d8e1d1b69e8
5
5
  SHA512:
6
- metadata.gz: 4619ad82d7c72aeee7acb90c8c8ab1cad4919d234247f0dce99bf4a52075ce24f29aec26f2ac85e971cb9656760ea010296880c47c13d0d7e52c50118e6cea5a
7
- data.tar.gz: 2644f3e42f0ba14b4193ae9e82d01b2d35f0a69348b3b654e77874e6f685b49430cea63e394551873c13488cc4a3657a22f89db10b6f21cb4fe5a29a33cf47f4
6
+ metadata.gz: ae1f5afed75ae1d006fdec6e9dfb2deb2d5a49cce5993c778e9f12dc29246ab215b8d6f28c36075c82cde1dea3414836748eae5bed5dc48543f75e2679413c09
7
+ data.tar.gz: ebdbb6af58e65b1154acec7e0afc39c10ad33b3faee4b637fccc19d9846000f8e5098bab3f9ad64160cf2d04212e4e2072e24833c8bda6fc4a8a1c7be16491cb
data/README.md CHANGED
@@ -4,7 +4,24 @@
4
4
  [![Coverage Status][coveralls-image]][coveralls-url]
5
5
  [![MIT License][license-image]][license-url]
6
6
 
7
- Watch out for Sunset headers on HTTP responses, as they signify the deprecation (and eventual removal) of an endpoint.
7
+ Watch out for HTTP responses declaring their end of life, using the Sunset header to signal deprecation (and eventual removal) of an endpoint.
8
+
9
+ [Sunset][sunset-draft] is an in-development HTTP response header. Check out [GitHub][sunset-github] for issues and discussion around it's development.
10
+
11
+ > This specification defines the Sunset HTTP response header field, which indicates that a URI is likely to become unresponsive at a specified point in the future.
12
+
13
+ [sunset-draft]: https://tools.ietf.org/html/draft-wilde-sunset-header-03
14
+ [sunset-github]: https://github.com/dret/I-D/tree/master/sunset-header
15
+
16
+ The header we're sniffing for looks a little like this:
17
+
18
+ ```
19
+ Sunset: Sat, 31 Dec 2018 23:59:59 GMT
20
+ ```
21
+
22
+ So long as the server being called is inserting a `Sunset` header to the response with a [HTTP date], this client-side code will do stuff.
23
+
24
+ [HTTP date]: https://tools.ietf.org/html/rfc7231#section-7.1.1.1
8
25
 
9
26
  ## Usage
10
27
 
@@ -17,41 +34,48 @@ gem 'faraday-sunset'
17
34
  Enabling Sunset detection is as simple as referencing the middleware in your Faraday connection block:
18
35
 
19
36
  ``` ruby
20
- connection = Faraday::Connection.new(url: '...') do |conn|
37
+ connection = Faraday.new(url: '...') do |conn|
21
38
  conn.response :sunset, active_support: true
22
39
  # or
23
40
  conn.response :sunset, logger: Rails.logger
24
41
  end
25
42
  ```
26
43
 
27
- You can [configure `ActiveSupport::Deprecation`](TODO LINK TO DOCS) to warn in a few different ways, or pass in any object that acts a bit like a Rack logger, Rails logger, or anything with a `warn` method that takes a string.
44
+ You can [configure `ActiveSupport::Deprecation`][active-support-deprecation] to warn in a few different ways, or pass in any object that acts a bit like a Rack logger, Rails logger, or anything with a `warn` method that takes a string.
45
+
46
+ [active-support-deprecation]: http://api.rubyonrails.org/classes/ActiveSupport/Deprecation/Behavior.html
28
47
 
29
48
  ## Requirements
30
49
 
31
- - **Ruby:** v2.2 - v2.4
32
- - **Faraday:** v0.8 - v0.13
50
+ - **Ruby:** v2.2 - v2.5
51
+ - **Faraday:** v0.9 - v0.14
52
+
53
+ ## Related Projects
54
+
55
+ - [rails-sunset](https://github.com/wework/rails-sunset) - Mark your endpoints as deprecated the Railsy way
56
+ - [guzzle-sunset](https://github.com/hskrasek/guzzle-sunset) - Sniff for deprecations with popular PHP client Guzzle
33
57
 
34
58
  ## TODO
35
59
 
36
- - [ ] Surface `Link` with rel=sunset as per Sunset RFC draft 03
60
+ - [ ] Surface `Link` with rel=sunset as per Sunset RFC draft 04?
37
61
 
38
62
  ## Testing
39
63
 
40
64
  To run tests and modify locally, you'll want to `bundle install` in this directory.
41
65
 
42
66
  ```
43
- bundle exec rspec
67
+ bundle exec appraisal rspec
44
68
  ```
45
69
 
46
70
  ## Contributing
47
71
 
48
- Bug reports and pull requests are welcome on GitHub at [philsturgeon/faraday-sunset](https://github.com/philsturgeon/faraday-sunset). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
72
+ Bug reports and pull requests are welcome on GitHub at [wework/faraday-sunset](https://github.com/wework/faraday-sunset). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
49
73
 
50
- [coveralls-image]:https://coveralls.io/repos/github/philsturgeon/faraday-sunset/badge.svg?branch=master
51
- [coveralls-url]:https://coveralls.io/github/philsturgeon/faraday-sunset?branch=master
74
+ [coveralls-image]:https://coveralls.io/repos/github/wework/faraday-sunset/badge.svg?branch=master
75
+ [coveralls-url]:https://coveralls.io/github/wework/faraday-sunset?branch=master
52
76
 
53
- [travis-url]:https://travis-ci.org/philsturgeon/faraday-sunset
54
- [travis-image]: https://travis-ci.org/philsturgeon/faraday-sunset.svg?branch=master
77
+ [travis-url]:https://travis-ci.org/wework/faraday-sunset
78
+ [travis-image]: https://travis-ci.org/wework/faraday-sunset.svg?branch=master
55
79
 
56
80
  [license-url]: LICENSE
57
81
  [license-image]: http://img.shields.io/badge/license-MIT-000000.svg?style=flat-square
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faraday-sunset
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phil Sturgeon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-05 00:00:00.000000000 Z
11
+ date: 2018-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 0.9.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '0.14'
22
+ version: '1'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: 0.9.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '0.14'
32
+ version: '1'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: appraisal
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  version: '0'
146
146
  requirements: []
147
147
  rubyforge_project:
148
- rubygems_version: 2.6.8
148
+ rubygems_version: 2.6.11
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: Automatically detect deprecated HTTP endpoints