oauth2 1.4.5 → 1.4.6

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: a85bca5fd51e149c80b5403207615e23040773582d3e2ae0fc2c44b83d49e866
4
- data.tar.gz: 8022e428b4e48a88bbc84ec5855bce39d3b7b37ffe8a987df161103402b08585
3
+ metadata.gz: 7912a62b5b26c6c8cdedaf620194ef0d2a0adbd92307da9fe29b77d88c984b34
4
+ data.tar.gz: 83bd964f93de41cd8ede2e8fdcf9aa037ff5d779ba7d922589d5cb666fe8c1c1
5
5
  SHA512:
6
- metadata.gz: 810d0073495d3e5f05149b41257e02fbfd2ce09294f082dd69ddba67cc7c523d268f8163232ec6da783f05adf3f0e2876980699be3e6de58732cb1d8d988be20
7
- data.tar.gz: d70c9a0303ae519eaa2b0db6af9e8dc56380263fbb30fce15a7ec9ff26ccc467de99a91265bc57d8bdce9bf2ade650312804e161b598e49c29ee81d2f2a3678f
6
+ metadata.gz: 4b18270faea191ac365fc6c63e350bd94a4180d1d64966c2eb6f59c2fd3131e7175df62e8179dba257661447fa7ec4d222ba166ee5ddab9fec4b29340629ed81
7
+ data.tar.gz: 8bf6ed52a51b03aba99af5ea24c63a13a6f548708ac05e88f4c19a6813211d01bacc1f60b0505ad7bba1e21425b6ff7817dee2cf1424605eed27b1aaf76e86eb
data/CHANGELOG.md CHANGED
@@ -3,7 +3,13 @@ All notable changes to this project will be documented in this file.
3
3
 
4
4
  ## unreleased
5
5
 
6
- ## [1.4.5] - 2020-03-18
6
+ ## [1.4.6] - 2021-03-18
7
+
8
+
9
+ - [#537](https://github.com/oauth-xx/oauth2/pull/537) - Fix crash in OAuth2::Client#get_token (@anderscarling)
10
+ - [#538](https://github.com/oauth-xx/oauth2/pull/538) - Remove reliance on globally included OAuth2 in tests for version 1.4 (@anderscarling)
11
+
12
+ ## [1.4.5] - 2021-03-18
7
13
 
8
14
  - [#535](https://github.com/oauth-xx/oauth2/pull/535) - Compatibility with range of supported Ruby OpenSSL versions, Rubocop updates, Github Actions (@pboling)
9
15
  - [#518](https://github.com/oauth-xx/oauth2/pull/518) - Add extract_access_token option to OAuth2::Client (@jonspalmer)
data/README.md CHANGED
@@ -4,6 +4,8 @@ If you need the readme for a released version of the gem please find it below:
4
4
 
5
5
  | Version | Release Date | Readme |
6
6
  |----------|--------------|----------------------------------------------------------|
7
+ | 1.4.6 | Mar 18, 2021 | https://github.com/oauth-xx/oauth2/blob/v1.4.6/README.md |
8
+ | 1.4.5 | Mar 18, 2021 | https://github.com/oauth-xx/oauth2/blob/v1.4.5/README.md |
7
9
  | 1.4.4 | Feb 12, 2020 | https://github.com/oauth-xx/oauth2/blob/v1.4.4/README.md |
8
10
  | 1.4.3 | Jan 29, 2020 | https://github.com/oauth-xx/oauth2/blob/v1.4.3/README.md |
9
11
  | 1.4.2 | Oct 1, 2019 | https://github.com/oauth-xx/oauth2/blob/v1.4.2/README.md |
@@ -20,6 +22,7 @@ If you need the readme for a released version of the gem please find it below:
20
22
  [![Total Downloads](https://img.shields.io/gem/dt/oauth2.svg)][gem]
21
23
  [![Downloads Today](https://img.shields.io/gem/rt/oauth2.svg)][gem]
22
24
  [![Build Status](https://travis-ci.org/oauth-xx/oauth2.svg?branch=1-4-stable)][travis]
25
+ [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Foauth-xx%2Foauth2%2Fbadge&style=flat)][github-actions]
23
26
  [![Test Coverage](https://api.codeclimate.com/v1/badges/688c612528ff90a46955/test_coverage)][codeclimate-coverage]
24
27
  [![Maintainability](https://api.codeclimate.com/v1/badges/688c612528ff90a46955/maintainability)][codeclimate-maintainability]
25
28
  [![Depfu](https://badges.depfu.com/badges/6d34dc1ba682bbdf9ae2a97848241743/count.svg)][depfu]
@@ -30,6 +33,7 @@ If you need the readme for a released version of the gem please find it below:
30
33
 
31
34
  [gem]: https://rubygems.org/gems/oauth2
32
35
  [travis]: http://travis-ci.org/oauth-xx/oauth2
36
+ [github-actions]: https://actions-badge.atrox.dev/oauth-xx/oauth2/goto
33
37
  [coveralls]: https://coveralls.io/r/oauth-xx/oauth2
34
38
  [codeclimate-maintainability]: https://codeclimate.com/github/oauth-xx/oauth2/maintainability
35
39
  [codeclimate-coverage]: https://codeclimate.com/github/oauth-xx/oauth2/test_coverage
data/lib/oauth2/client.rb CHANGED
@@ -231,27 +231,27 @@ module OAuth2
231
231
  {}
232
232
  end
233
233
  end
234
- end
235
234
 
236
- DEFAULT_EXTRACT_ACCESS_TOKEN = proc do |client, hash|
237
- token = hash.delete('access_token') || hash.delete(:access_token)
238
- token && AccessToken.new(client, token, hash)
239
- end
235
+ DEFAULT_EXTRACT_ACCESS_TOKEN = proc do |client, hash|
236
+ token = hash.delete('access_token') || hash.delete(:access_token)
237
+ token && AccessToken.new(client, token, hash)
238
+ end
240
239
 
241
- private
240
+ private
242
241
 
243
- def build_access_token(response, access_token_opts, extract_access_token)
244
- parsed_response = response.parsed.dup
245
- return unless parsed_response.is_a?(Hash)
242
+ def build_access_token(response, access_token_opts, extract_access_token)
243
+ parsed_response = response.parsed.dup
244
+ return unless parsed_response.is_a?(Hash)
246
245
 
247
- hash = parsed_response.merge(access_token_opts)
246
+ hash = parsed_response.merge(access_token_opts)
248
247
 
249
- # Provide backwards compatibility for old AcessToken.form_hash pattern
250
- # Should be deprecated in 2.x
251
- if extract_access_token.is_a?(Class) && extract_access_token.respond_to?(:from_hash)
252
- extract_access_token.from_hash(self, hash)
253
- else
254
- extract_access_token.call(self, hash)
248
+ # Provide backwards compatibility for old AcessToken.form_hash pattern
249
+ # Should be deprecated in 2.x
250
+ if extract_access_token.is_a?(Class) && extract_access_token.respond_to?(:from_hash)
251
+ extract_access_token.from_hash(self, hash)
252
+ else
253
+ extract_access_token.call(self, hash)
254
+ end
255
255
  end
256
256
  end
257
257
  end
@@ -1,6 +1,7 @@
1
1
  module OAuth2
2
2
  module Version
3
3
  VERSION = to_s
4
+
4
5
  module_function
5
6
 
6
7
  # The major version
@@ -21,7 +22,7 @@ module OAuth2
21
22
  #
22
23
  # @return [Integer]
23
24
  def patch
24
- 5
25
+ 6
25
26
  end
26
27
 
27
28
  # The pre-release version, if any
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oauth2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.5
4
+ version: 1.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Boling
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2021-03-18 00:00:00.000000000 Z
13
+ date: 2021-03-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday
@@ -331,9 +331,9 @@ licenses:
331
331
  - MIT
332
332
  metadata:
333
333
  bug_tracker_uri: https://github.com/oauth-xx/oauth2/issues
334
- changelog_uri: https://github.com/oauth-xx/oauth2/blob/v1.4.5/CHANGELOG.md
335
- documentation_uri: https://www.rubydoc.info/gems/oauth2/1.4.5
336
- source_code_uri: https://github.com/oauth-xx/oauth2/tree/v1.4.5
334
+ changelog_uri: https://github.com/oauth-xx/oauth2/blob/v1.4.6/CHANGELOG.md
335
+ documentation_uri: https://www.rubydoc.info/gems/oauth2/1.4.6
336
+ source_code_uri: https://github.com/oauth-xx/oauth2/tree/v1.4.6
337
337
  wiki_uri: https://github.com/oauth-xx/oauth2/wiki
338
338
  post_install_message:
339
339
  rdoc_options: []