api-blocks 0.9.0 → 0.10.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: 59832c91147b528479b1e2cf190d52a07c4a92d0bb066dcb95168e25b2ed5d98
4
- data.tar.gz: 75c3345a6024fe795c4cf923764f0b3ade9df0aebe42141fbe701be82dd7fc6b
3
+ metadata.gz: 461a298ed182b8cf8ecc2f5d4bcdd8f3b481a15e61d52b36b2e44ab756036b8d
4
+ data.tar.gz: e29100b54ee368936e3dbbb03d4bcf47b39cdf27e85c0011fb427af4b5c82ab3
5
5
  SHA512:
6
- metadata.gz: 776faa783cdb574d61d7d1b24ed9439f978f294aaca9b70ffd7daca0a3930aff66bedddbe02a5ca93a5051884fdb408c1031e28038688f610ac98b8d24fa67e5
7
- data.tar.gz: 681d130b909383ea03ccea48e0b392bd57845ff3c0143387e1b631d0b6afd8457af69a3ca1964deab12cf5f541939375a3ad39c5f3b31274fd25d057f5e7a02f
6
+ metadata.gz: 4da508313a90671bbdc6f58b2c5663f73e221fc5bc7c9ea19a92e6eaed9cae099bf8a130dacbacc74e937015ee2b1ef0693f62df3c563f534ee36de9dbfb3be2
7
+ data.tar.gz: aa0915f46a5560f278b738c939f311eee70e8b5c8960ba64b309bf8ceb55d6acdddf715b07d7c72a6f67ee3093fd221ba6b2694caef546f295451d58d9280915
@@ -54,7 +54,7 @@ module ApiBlocks
54
54
 
55
55
  user.unlock_access! if unlockable?(user)
56
56
 
57
- respond_with(Doorkeeper::OAuth::TokenResponse.new(
57
+ respond_with(::Doorkeeper::OAuth::TokenResponse.new(
58
58
  access_token(oauth_application, user)
59
59
  ).body)
60
60
  end
@@ -81,17 +81,17 @@ module ApiBlocks
81
81
 
82
82
  # Returns a new access token for this user.
83
83
  def access_token(application, user)
84
- Doorkeeper::AccessToken.find_or_create_for(
84
+ ::Doorkeeper::AccessToken.find_or_create_for(
85
85
  application,
86
86
  user.id,
87
- Doorkeeper.configuration.default_scopes,
88
- Doorkeeper.configuration.access_token_expires_in,
87
+ ::Doorkeeper.configuration.default_scopes,
88
+ ::Doorkeeper.configuration.access_token_expires_in,
89
89
  true
90
90
  )
91
91
  end
92
92
 
93
93
  def oauth_application
94
- @oauth_application ||= Doorkeeper::Application.find_by!(
94
+ @oauth_application ||= ::Doorkeeper::Application.find_by!(
95
95
  uid: params[:client_id]
96
96
  )
97
97
  end
@@ -99,7 +99,7 @@ module ApiBlocks
99
99
 
100
100
  user.unlock_access! if unlockable?(user)
101
101
 
102
- respond_with(Doorkeeper::OAuth::TokenResponse.new(
102
+ respond_with(::Doorkeeper::OAuth::TokenResponse.new(
103
103
  access_token(oauth_application, user)
104
104
  ).body)
105
105
  end
@@ -139,17 +139,17 @@ module ApiBlocks
139
139
 
140
140
  # Returns a new access token for this user.
141
141
  def access_token(application, user)
142
- Doorkeeper::AccessToken.find_or_create_for(
142
+ ::Doorkeeper::AccessToken.find_or_create_for(
143
143
  application,
144
144
  user.id,
145
- Doorkeeper.configuration.default_scopes,
146
- Doorkeeper.configuration.access_token_expires_in,
145
+ ::Doorkeeper.configuration.default_scopes,
146
+ ::Doorkeeper.configuration.access_token_expires_in,
147
147
  true
148
148
  )
149
149
  end
150
150
 
151
151
  def oauth_application
152
- @oauth_application ||= Doorkeeper::Application.find_by!(
152
+ @oauth_application ||= ::Doorkeeper::Application.find_by!(
153
153
  uid: params[:client_id]
154
154
  )
155
155
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module ApiBlocks
4
4
  # Current version of ApiBlocks
5
- VERSION = '0.9.0'
5
+ VERSION = '0.10.0'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api-blocks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul d'Hubert
@@ -306,7 +306,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
306
306
  - !ruby/object:Gem::Version
307
307
  version: '0'
308
308
  requirements: []
309
- rubygems_version: 3.1.2
309
+ rubygems_version: 3.1.3
310
310
  signing_key:
311
311
  specification_version: 4
312
312
  summary: Simple and consistent rails api extensions