doorkeeper 5.6.8 → 5.6.9

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: b8a202451362fe346d53be4d16dcb92fea331ee1aad93461283585f93749960b
4
- data.tar.gz: 2f042a729cdd68ce19d6181a54a98635715f83e93946de95b62a7521400d4951
3
+ metadata.gz: 6bf87231b7fa13bb47db61868954af3c01b07b0909ac95abb2de15d1064dd423
4
+ data.tar.gz: f6dda19eae61f69331fc338fbb1803a7a94c563b4dc46ea694bee37c430db1b7
5
5
  SHA512:
6
- metadata.gz: ab8dab957c6cfa382f406c465a187b3d1301a38eac8666789ad87755f2f383cb7f6a0f10f5b18f15dd4cbe5bb80f41697d01486d58739c5fca342c13a1bfe196
7
- data.tar.gz: c0490f4072de798755643890309ff8d2ff645a5fa00797e2f5c933c6f1ffa685190cb935b2569a26fff5d282d3efd34f544b8784f598b8228c01259e784fe63b
6
+ metadata.gz: f0d54d75716f74f23f35ab9400683a805e3a4c7483c11ea5be10669abe38385c7625f9304379712f661bea026d49cb5fe8ddc1b6653cf66115279edc1f785096
7
+ data.tar.gz: 68c841037b9544b1bdfdc36405169ad8cf942b6c32b6d1023261bb7c37116bab602a8c12b209d3b006219eaf0701d7a705ac6cdec49004c19ae918d044377d53
data/CHANGELOG.md CHANGED
@@ -9,6 +9,10 @@ User-visible changes worth mentioning.
9
9
 
10
10
  - [#PR ID] Add your changelog here.
11
11
 
12
+ ## 5.6.9
13
+
14
+ - [#1691] Make new Doorkeeper errors backward compatible with older extensions.
15
+
12
16
  ## 5.6.8
13
17
 
14
18
  - [#1680] Fix handle_auth_errors :raise NotImplementedError
data/README.md CHANGED
@@ -39,7 +39,6 @@ Supported features:
39
39
  - [ORMs](#orms)
40
40
  - [Extensions](#extensions)
41
41
  - [Example Applications](#example-applications)
42
- - [Tutorials](#tutorials)
43
42
  - [Sponsors](#sponsors)
44
43
  - [Development](#development)
45
44
  - [Contributing](#contributing)
@@ -56,7 +55,7 @@ https://github.com/doorkeeper-gem/doorkeeper/releases.
56
55
  Additionally, other resources can be found on:
57
56
 
58
57
  - [Guides](https://doorkeeper.gitbook.io/guides/) with how-to get started and configuration documentation
59
- - See the [Wiki](https://github.com/doorkeeper-gem/doorkeeper/wiki) with articles and other documentation
58
+ - See the [Wiki](https://github.com/doorkeeper-gem/doorkeeper/wiki) for articles on how to integrate with other solutions
60
59
  - Screencast from [railscasts.com](http://railscasts.com/): [#353
61
60
  OAuth with
62
61
  Doorkeeper](http://railscasts.com/episodes/353-oauth-with-doorkeeper)
@@ -124,10 +123,6 @@ examples](https://github.com/doorkeeper-gem/doorkeeper/wiki/Example-Applications
124
123
  in our wiki or follow this [tutorial
125
124
  here](https://github.com/doorkeeper-gem/doorkeeper/wiki/Testing-your-provider-with-OAuth2-gem).
126
125
 
127
- ## Tutorials
128
-
129
- See [list of tutorials](https://github.com/doorkeeper-gem/doorkeeper/wiki#how-tos--tutorials) in order to learn how to use the gem or integrate it with other solutions / gems.
130
-
131
126
  ## Sponsors
132
127
 
133
128
  [![OpenCollective](https://opencollective.com/doorkeeper-gem/backers/badge.svg)](#backers)
@@ -10,14 +10,26 @@ module Doorkeeper
10
10
  def self.from_request(request, attributes = {})
11
11
  new(
12
12
  attributes.merge(
13
- name: request.error&.name_for_response,
14
- exception_class: request.error,
13
+ name: error_name_for(request.error),
14
+ exception_class: exception_class_for(request.error),
15
15
  state: request.try(:state),
16
16
  redirect_uri: request.try(:redirect_uri),
17
17
  ),
18
18
  )
19
19
  end
20
20
 
21
+ def self.error_name_for(error)
22
+ error.respond_to?(:name_for_response) ? error.name_for_response : error
23
+ end
24
+
25
+ def self.exception_class_for(error)
26
+ return error if error.respond_to?(:name_for_response)
27
+
28
+ "Doorkeeper::Errors::#{error.to_s.classify}".safe_constantize
29
+ end
30
+
31
+ private_class_method :error_name_for, :exception_class_for
32
+
21
33
  delegate :name, :description, :state, to: :@error
22
34
 
23
35
  def initialize(attributes = {})
@@ -5,7 +5,7 @@ module Doorkeeper
5
5
  # Semantic versioning
6
6
  MAJOR = 5
7
7
  MINOR = 6
8
- TINY = 8
8
+ TINY = 9
9
9
  PRE = nil
10
10
 
11
11
  # Full version number
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doorkeeper
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.6.8
4
+ version: 5.6.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felipe Elias Philipp
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2023-12-01 00:00:00.000000000 Z
14
+ date: 2024-02-14 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: railties
@@ -103,14 +103,14 @@ dependencies:
103
103
  requirements:
104
104
  - - "~>"
105
105
  - !ruby/object:Gem::Version
106
- version: 0.9.3
106
+ version: 0.10.0
107
107
  type: :development
108
108
  prerelease: false
109
109
  version_requirements: !ruby/object:Gem::Requirement
110
110
  requirements:
111
111
  - - "~>"
112
112
  - !ruby/object:Gem::Version
113
- version: 0.9.3
113
+ version: 0.10.0
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: grape
116
116
  requirement: !ruby/object:Gem::Requirement