doorkeeper 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of doorkeeper might be problematic. Click here for more details.

Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.hound.yml +3 -0
  3. data/.travis.yml +4 -7
  4. data/CHANGELOG.md +16 -0
  5. data/README.md +23 -2
  6. data/app/validators/redirect_uri_validator.rb +5 -5
  7. data/app/views/doorkeeper/applications/_form.html.erb +2 -2
  8. data/doorkeeper.gemspec +6 -5
  9. data/lib/doorkeeper.rb +4 -0
  10. data/lib/doorkeeper/config.rb +9 -1
  11. data/lib/doorkeeper/models/access_token.rb +2 -2
  12. data/lib/doorkeeper/oauth/authorization_code_request.rb +1 -1
  13. data/lib/doorkeeper/oauth/code_response.rb +2 -2
  14. data/lib/doorkeeper/oauth/error_response.rb +1 -1
  15. data/lib/doorkeeper/oauth/helpers/uri_checker.rb +2 -2
  16. data/lib/doorkeeper/oauth/password_access_token_request.rb +1 -1
  17. data/lib/doorkeeper/oauth/pre_authorization.rb +1 -1
  18. data/lib/doorkeeper/oauth/refresh_token_request.rb +1 -1
  19. data/lib/doorkeeper/oauth/request_concern.rb +7 -2
  20. data/lib/doorkeeper/version.rb +1 -1
  21. data/lib/generators/doorkeeper/templates/initializer.rb +2 -2
  22. data/script/rails +0 -1
  23. data/spec/controllers/tokens_controller_spec.rb +2 -2
  24. data/spec/dummy/config/initializers/doorkeeper.rb +3 -3
  25. data/spec/dummy/config/mongoid4.yml +2 -1
  26. data/spec/lib/config_spec.rb +16 -6
  27. data/spec/lib/doorkeeper_spec.rb +28 -0
  28. data/spec/lib/oauth/client_credentials/creator_spec.rb +1 -1
  29. data/spec/lib/oauth/client_credentials/issuer_spec.rb +1 -1
  30. data/spec/lib/oauth/helpers/scope_checker_spec.rb +13 -13
  31. data/spec/lib/oauth/helpers/uri_checker_spec.rb +13 -13
  32. data/spec/lib/oauth/scopes_spec.rb +15 -15
  33. data/spec/models/doorkeeper/access_token_spec.rb +4 -4
  34. data/spec/models/doorkeeper/application_spec.rb +2 -2
  35. data/spec/requests/applications/applications_request_spec.rb +2 -2
  36. data/spec/requests/flows/authorization_code_spec.rb +1 -1
  37. data/spec/requests/flows/password_spec.rb +1 -1
  38. data/spec/requests/flows/revoke_token_spec.rb +15 -15
  39. data/spec/spec_helper_integration.rb +3 -0
  40. data/spec/support/helpers/authorization_request_helper.rb +1 -1
  41. data/spec/validators/redirect_uri_validator_spec.rb +2 -2
  42. metadata +31 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 598bf74d593976f9ffe96a0e511f9b75b0e6f1e4
4
- data.tar.gz: cddda3ef65df20171860bba9cbecb8097873f039
3
+ metadata.gz: 1cf5353e6f59ed9314bed48b00fee6eef151e62e
4
+ data.tar.gz: e9fbdfa650708ab9e9fdea68e96ab2c712910308
5
5
  SHA512:
6
- metadata.gz: 8b66fe347a4767a45fe3ede635b53de57ca8a20e201a03872d5e80295d5a3701f33fdc78ba5437e3e8e13b2c7ba3eb7f04f87ff52708a9d04ea29ca2ae819984
7
- data.tar.gz: 74a12fac73bb6e735bb16a3eea2d050299e6204a4f095fab95c605d178ebaec0f47871e4d815b30a873b5a7bc4e1dadeaaf7c9c23cc1ea3d15fc598569114530
6
+ metadata.gz: 5492059f736ca023683d8b9227dbe61648501742ae4d3d1aa6b8ec302906d57764760814647e06105f1b20e2eb902c3c934ef7d216c5600dc470fa356e1572ca
7
+ data.tar.gz: 871bc1c1cd6a7adc602e1d929f4f546cf95a89ef454a767719ad2a559d156c9e34121268aa11fde46c02d080be5d08992f2c57a130cd0a87691cb9aee9d1e5aa
@@ -0,0 +1,3 @@
1
+ LineLength:
2
+ Exclude:
3
+ - app/spec/**/*
@@ -1,16 +1,13 @@
1
1
  language: ruby
2
- before_install:
3
- - gem install bundler -v '= 1.5.1'
4
2
  rvm:
5
3
  - 1.9.3
6
4
  - 2.0
7
5
  - 2.1
8
6
  env:
9
- - rails=3.1.8
10
- - rails=3.2.8
11
- - rails=3.2.16
12
- - rails=4.0.2
13
- - rails=4.1.0.beta1
7
+ - rails=3.1.12
8
+ - rails=3.2.18
9
+ - rails=4.0.5
10
+ - rails=4.1.1
14
11
  - orm=mongoid2
15
12
  - orm=mongoid3
16
13
  - orm=mongoid4
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.3.1
4
+
5
+ - enhancements
6
+ - [#405] Adds facade to more easily get the token from a request in a route
7
+ constraint.
8
+ - [#415] Extend Doorkeeper TokenResponse with an `after_successful_response`
9
+ callback that allows handling of `response` object.
10
+ - internals
11
+ - [#409] Deprecates `test_redirect_uri` in favor of `native_redirect_uri`.
12
+ See discussion in: [#351].
13
+ - [#411] Clean rspec deprecations. General test improvements.
14
+ - [#412] rspec line width can go longer than 80 (hound CI config).
15
+ - bug
16
+ - [#413] fixes #340, routing scope is now taken into account in redirect.
17
+ - [#401] and [#425] application is not required any longer for access_token.
18
+
3
19
  ## 1.3.0
4
20
 
5
21
  - enhancements
data/README.md CHANGED
@@ -112,8 +112,10 @@ end
112
112
 
113
113
  This will mount following routes:
114
114
 
115
+ GET /oauth/authorize/:code
115
116
  GET /oauth/authorize
116
117
  POST /oauth/authorize
118
+ PUT /oauth/authorize
117
119
  DELETE /oauth/authorize
118
120
  POST /oauth/token
119
121
  POST /oauth/revoke
@@ -189,7 +191,7 @@ class Api::V1::ProductsController < Api::V1::ApiController
189
191
  end
190
192
  ```
191
193
 
192
- ### ActionController::Metal integration and other integrations
194
+ ### ActionController::Metal integration
193
195
 
194
196
  The `doorkeeper_for` filter is intended to work with ActionController::Metal
195
197
  too. You only need to include the required `ActionController` modules:
@@ -204,6 +206,25 @@ class MetalController < ActionController::Metal
204
206
  end
205
207
  ```
206
208
 
209
+ ### Route Constraints and other integrations
210
+
211
+ You can leverage the `Doorkeeper.authenticate` facade to easily extract a
212
+ `Doorkeeper::OAuth::Token` based on the current request. You can then ensure
213
+ that token is still good, find its associated `#resource_owner_id`, etc.
214
+
215
+ ```ruby
216
+ module Constraint
217
+ class Authenticated
218
+
219
+ def matches?(request)
220
+ token = Doorkeeper.authenticate(request)
221
+ token && token.accessible?
222
+ end
223
+
224
+ end
225
+ end
226
+ ```
227
+
207
228
  For more information about integration and other integrations, check out [the
208
229
  related wiki
209
230
  page](https://github.com/doorkeeper-gem/doorkeeper/wiki/ActionController::Metal-with-doorkeeper).
@@ -222,7 +243,7 @@ Doorkeeper.configure do
222
243
  end
223
244
  ```
224
245
 
225
- The in your controllers:
246
+ And in your controllers:
226
247
 
227
248
  ```ruby
228
249
  class Api::V1::ProductsController < Api::V1::ApiController
@@ -1,8 +1,8 @@
1
1
  require 'uri'
2
2
 
3
3
  class RedirectUriValidator < ActiveModel::EachValidator
4
- def self.test_redirect_uri
5
- Doorkeeper.configuration.test_redirect_uri
4
+ def self.native_redirect_uri
5
+ Doorkeeper.configuration.native_redirect_uri
6
6
  end
7
7
 
8
8
  def validate_each(record, attribute, value)
@@ -11,7 +11,7 @@ class RedirectUriValidator < ActiveModel::EachValidator
11
11
  else
12
12
  value.split.each do |val|
13
13
  uri = ::URI.parse(val)
14
- return if test_redirect_uri?(uri)
14
+ return if native_redirect_uri?(uri)
15
15
  record.errors.add(attribute, :fragment_present) unless uri.fragment.nil?
16
16
  record.errors.add(attribute, :relative_uri) if uri.scheme.nil? || uri.host.nil?
17
17
  record.errors.add(attribute, :has_query_parameter) unless uri.query.nil?
@@ -23,7 +23,7 @@ class RedirectUriValidator < ActiveModel::EachValidator
23
23
 
24
24
  private
25
25
 
26
- def test_redirect_uri?(uri)
27
- self.class.test_redirect_uri.present? && uri.to_s == self.class.test_redirect_uri.to_s
26
+ def native_redirect_uri?(uri)
27
+ self.class.native_redirect_uri.present? && uri.to_s == self.class.native_redirect_uri.to_s
28
28
  end
29
29
  end
@@ -19,9 +19,9 @@
19
19
  <span class="help-block">
20
20
  Use one line per URI
21
21
  </span>
22
- <% if Doorkeeper.configuration.test_redirect_uri %>
22
+ <% if Doorkeeper.configuration.native_redirect_uri %>
23
23
  <span class="help-block">
24
- Use <code><%= Doorkeeper.configuration.test_redirect_uri %></code> for local tests
24
+ Use <code><%= Doorkeeper.configuration.native_redirect_uri %></code> for local tests
25
25
  </span>
26
26
  <% end %>
27
27
  </div>
@@ -19,11 +19,12 @@ Gem::Specification.new do |s|
19
19
  s.add_dependency "railties", ">= 3.1"
20
20
 
21
21
  s.add_development_dependency "sqlite3", "~> 1.3.5"
22
- s.add_development_dependency "rspec-rails", ">= 2.11.4"
23
- s.add_development_dependency "capybara", "~> 1.1.2"
22
+ s.add_development_dependency "rspec-rails", "~> 2.99.0"
23
+ s.add_development_dependency "capybara", "~> 2.3.0"
24
24
  s.add_development_dependency "generator_spec", "~> 0.9.0"
25
- s.add_development_dependency "factory_girl", "~> 2.6.4"
26
- s.add_development_dependency "timecop", "~> 0.5.2"
27
- s.add_development_dependency "database_cleaner", "~> 0.9.1"
25
+ s.add_development_dependency "factory_girl", "~> 4.4.0"
26
+ s.add_development_dependency "timecop", "~> 0.7.0"
27
+ s.add_development_dependency "database_cleaner", "~> 1.3.0"
28
+ s.add_development_dependency "rspec-activemodel-mocks", "~> 1.0.0"
28
29
  s.add_development_dependency "bcrypt-ruby", "~> 3.0.1"
29
30
  end
@@ -54,4 +54,8 @@ module Doorkeeper
54
54
  def self.installed?
55
55
  configured? && database_installed?
56
56
  end
57
+
58
+ def self.authenticate(request, methods = Doorkeeper.configuration.access_token_methods)
59
+ OAuth::Token.authenticate(request, *methods)
60
+ end
57
61
  end
@@ -85,6 +85,14 @@ module Doorkeeper
85
85
  def reuse_access_token
86
86
  @config.instance_variable_set("@reuse_access_token", true)
87
87
  end
88
+
89
+ def test_redirect_uri(uri)
90
+ warn <<-TEXT
91
+ DEPRECATION: test_redirect_uri has renamed to native_redirect_uri. use "native_redirect_uri '#{uri}'".
92
+ TEXT
93
+
94
+ @config.instance_variable_set('@native_redirect_uri', uri)
95
+ end
88
96
  end
89
97
 
90
98
  module Option
@@ -168,7 +176,7 @@ module Doorkeeper
168
176
  option :access_token_expires_in, default: 7200
169
177
  option :authorization_code_expires_in, default: 600
170
178
  option :orm, default: :active_record
171
- option :test_redirect_uri, default: 'urn:ietf:wg:oauth:2.0:oob'
179
+ option :native_redirect_uri, default: 'urn:ietf:wg:oauth:2.0:oob'
172
180
  option :active_record_options, default: {}
173
181
  option :realm, default: 'Doorkeeper'
174
182
  option :wildcard_redirect_uri, default: false
@@ -46,7 +46,7 @@ module Doorkeeper
46
46
  else
47
47
  resource_owner_or_id
48
48
  end
49
- token = last_authorized_token_for(application.id, resource_owner_id)
49
+ token = last_authorized_token_for(application.try(:id), resource_owner_id)
50
50
  token if token && ScopeChecker.matches?(token.scopes, scopes)
51
51
  end
52
52
 
@@ -79,7 +79,7 @@ module Doorkeeper
79
79
  resource_owner_id: resource_owner_id,
80
80
  scopes: scopes,
81
81
  expires_in_seconds: expires_in_seconds,
82
- application: { uid: application.uid }
82
+ application: { uid: application.try(:uid) }
83
83
  }
84
84
  end
85
85
 
@@ -20,7 +20,7 @@ module Doorkeeper
20
20
 
21
21
  private
22
22
 
23
- def on_successful_authorization
23
+ def before_successful_response
24
24
  grant.revoke
25
25
  find_or_create_access_token(grant.application,
26
26
  grant.resource_owner_id,
@@ -17,8 +17,8 @@ module Doorkeeper
17
17
 
18
18
  # TODO: configure the test oauth path?
19
19
  def redirect_uri
20
- if URIChecker.test_uri? pre_auth.redirect_uri
21
- "/oauth/authorize/#{auth.token.token}"
20
+ if URIChecker.native_uri? pre_auth.redirect_uri
21
+ { action: :show, code: auth.token.token }
22
22
  else
23
23
  if response_on_fragment
24
24
  uri_with_fragment(
@@ -31,7 +31,7 @@ module Doorkeeper
31
31
 
32
32
  def redirectable?
33
33
  name != :invalid_redirect_uri && name != :invalid_client &&
34
- !URIChecker.test_uri?(@redirect_uri)
34
+ !URIChecker.native_uri?(@redirect_uri)
35
35
  end
36
36
 
37
37
  def redirect_uri
@@ -28,8 +28,8 @@ module Doorkeeper
28
28
  URI.parse(url)
29
29
  end
30
30
 
31
- def self.test_uri?(url)
32
- url == Doorkeeper.configuration.test_redirect_uri
31
+ def self.native_uri?(url)
32
+ url == Doorkeeper.configuration.native_redirect_uri
33
33
  end
34
34
  end
35
35
  end
@@ -26,7 +26,7 @@ module Doorkeeper
26
26
 
27
27
  private
28
28
 
29
- def on_successful_authorization
29
+ def before_successful_response
30
30
  find_or_create_access_token(client, resource_owner.id, scopes, server)
31
31
  end
32
32
 
@@ -54,7 +54,7 @@ module Doorkeeper
54
54
  # TODO: test uri should be matched against the client's one
55
55
  def validate_redirect_uri
56
56
  return false unless redirect_uri.present?
57
- Helpers::URIChecker.test_uri?(redirect_uri) ||
57
+ Helpers::URIChecker.native_uri?(redirect_uri) ||
58
58
  Helpers::URIChecker.valid_for_authorization?(redirect_uri, client.redirect_uri)
59
59
  end
60
60
  end
@@ -27,7 +27,7 @@ module Doorkeeper
27
27
 
28
28
  private
29
29
 
30
- def on_successful_authorization
30
+ def before_successful_response
31
31
  refresh_token.revoke
32
32
  create_access_token
33
33
  end
@@ -4,8 +4,10 @@ module Doorkeeper
4
4
  def authorize
5
5
  validate
6
6
  if valid?
7
- on_successful_authorization
7
+ before_successful_response
8
8
  @response = TokenResponse.new(access_token)
9
+ after_successful_response
10
+ @response
9
11
  else
10
12
  @response = ErrorResponse.from_request(self)
11
13
  end
@@ -36,7 +38,10 @@ module Doorkeeper
36
38
  server.refresh_token_enabled?)
37
39
  end
38
40
 
39
- def on_successful_authorization
41
+ def before_successful_response
42
+ end
43
+
44
+ def after_successful_response
40
45
  end
41
46
  end
42
47
  end
@@ -1,3 +1,3 @@
1
1
  module Doorkeeper
2
- VERSION = '1.3.0'
2
+ VERSION = '1.3.1'
3
3
  end
@@ -56,12 +56,12 @@ Doorkeeper.configure do
56
56
  # Check out the wiki for more information on customization
57
57
  # access_token_methods :from_bearer_authorization, :from_access_token_param, :from_bearer_param
58
58
 
59
- # Change the test redirect uri for client apps
59
+ # Change the native redirect uri for client apps
60
60
  # When clients register with the following redirect uri, they won't be redirected to any server and the authorization code will be displayed within the provider
61
61
  # The value can be any string. Use nil to disable this feature. When disabled, clients must provide a valid URL
62
62
  # (Similar behaviour: https://developers.google.com/accounts/docs/OAuth2InstalledApp#choosingredirecturi)
63
63
  #
64
- # test_redirect_uri 'urn:ietf:wg:oauth:2.0:oob'
64
+ # native_redirect_uri 'urn:ietf:wg:oauth:2.0:oob'
65
65
 
66
66
  # Specify what grant flows are enabled in array of Strings. The valid
67
67
  # strings and the flows they enable are:
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- #!/usr/bin/env ruby
3
2
  # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
4
3
 
5
4
  ENGINE_PATH = File.expand_path('../..', __FILE__)
@@ -11,7 +11,7 @@ describe Doorkeeper::TokensController do
11
11
  end
12
12
 
13
13
  it 'returns the authorization' do
14
- pending 'verify need of these specs'
14
+ skip 'verify need of these specs'
15
15
  expect(token).to receive(:authorization)
16
16
  post :create
17
17
  end
@@ -27,7 +27,7 @@ describe Doorkeeper::TokensController do
27
27
  end
28
28
 
29
29
  it 'returns the error response' do
30
- pending 'verify need of these specs'
30
+ skip 'verify need of these specs'
31
31
  allow(token).to receive(:error_response).and_return(double(to_json: [], status: :unauthorized))
32
32
  post :create
33
33
  expect(response.status).to eq 401
@@ -8,7 +8,7 @@ Doorkeeper.configure do
8
8
  resource_owner_authenticator do
9
9
  # Put your resource owner authentication logic here.
10
10
  # e.g. User.find_by_id(session[:user_id]) || redirect_to(new_user_session_url)
11
- User.find_by_id(session[:user_id]) || redirect_to(root_url, alert: 'Needs sign in.')
11
+ User.where(id: session[:user_id]).first || redirect_to(root_url, alert: 'Needs sign in.')
12
12
  end
13
13
 
14
14
  # If you want to restrict the access to the web interface for
@@ -47,12 +47,12 @@ Doorkeeper.configure do
47
47
  # Check out the wiki for mor information on customization
48
48
  # access_token_methods :from_bearer_authorization, :from_access_token_param, :from_bearer_param
49
49
 
50
- # Change the test redirect uri for client apps
50
+ # Change the native redirect uri for client apps
51
51
  # When clients register with the following redirect uri, they won't be redirected to any server and the authorization code will be displayed within the provider
52
52
  # The value can be any string. Use nil to disable this feature. When disabled, clients must provide a valid URL
53
53
  # (Similar behaviour: https://developers.google.com/accounts/docs/OAuth2InstalledApp#choosingredirecturi)
54
54
  #
55
- # test_redirect_uri 'urn:ietf:wg:oauth:2.0:oob'
55
+ # native_redirect_uri 'urn:ietf:wg:oauth:2.0:oob'
56
56
 
57
57
  # WWW-Authenticate Realm (default 'Doorkeeper').
58
58
  realm 'Doorkeeper'
@@ -5,7 +5,8 @@ development:
5
5
  hosts:
6
6
  - localhost:27017
7
7
  options:
8
- w: 1
8
+ write:
9
+ w: 1
9
10
 
10
11
  test:
11
12
  sessions:
@@ -76,7 +76,7 @@ describe Doorkeeper, 'configuration' do
76
76
 
77
77
  describe 'use_refresh_token' do
78
78
  it 'is false by default' do
79
- expect(subject.refresh_token_enabled?).to be_false
79
+ expect(subject.refresh_token_enabled?).to be_falsey
80
80
  end
81
81
 
82
82
  it 'can change the value' do
@@ -84,7 +84,7 @@ describe Doorkeeper, 'configuration' do
84
84
  orm DOORKEEPER_ORM
85
85
  use_refresh_token
86
86
  end
87
- expect(subject.refresh_token_enabled?).to be_true
87
+ expect(subject.refresh_token_enabled?).to be_truthy
88
88
  end
89
89
 
90
90
  it "does not includes 'refresh_token' in authorization_response_types" do
@@ -135,7 +135,7 @@ describe Doorkeeper, 'configuration' do
135
135
 
136
136
  describe 'enable_application_owner' do
137
137
  it 'is disabled by default' do
138
- expect(Doorkeeper.configuration.enable_application_owner?).not_to be_true
138
+ expect(Doorkeeper.configuration.enable_application_owner?).not_to be_truthy
139
139
  end
140
140
 
141
141
  context 'when enabled without confirmation' do
@@ -149,7 +149,7 @@ describe Doorkeeper, 'configuration' do
149
149
  expect(Doorkeeper::Application.new).to respond_to :owner
150
150
  end
151
151
  it 'Doorkeeper.configuration.confirm_application_owner? returns false' do
152
- expect(Doorkeeper.configuration.confirm_application_owner?).not_to be_true
152
+ expect(Doorkeeper.configuration.confirm_application_owner?).not_to be_truthy
153
153
  end
154
154
  end
155
155
 
@@ -164,14 +164,14 @@ describe Doorkeeper, 'configuration' do
164
164
  expect(Doorkeeper::Application.new).to respond_to :owner
165
165
  end
166
166
  it 'Doorkeeper.configuration.confirm_application_owner? returns true' do
167
- expect(Doorkeeper.configuration.confirm_application_owner?).to be_true
167
+ expect(Doorkeeper.configuration.confirm_application_owner?).to be_truthy
168
168
  end
169
169
  end
170
170
  end
171
171
 
172
172
  describe 'wildcard_redirect_uri' do
173
173
  it 'is disabled by default' do
174
- Doorkeeper.configuration.wildcard_redirect_uri.should be_false
174
+ Doorkeeper.configuration.wildcard_redirect_uri.should be_falsey
175
175
  end
176
176
  end
177
177
 
@@ -264,6 +264,16 @@ describe Doorkeeper, 'configuration' do
264
264
  end
265
265
  end
266
266
 
267
+ describe 'test_redirect_uri' do
268
+ it 'can change the native_redirect_uri value' do
269
+ Doorkeeper.configure do
270
+ orm DOORKEEPER_ORM
271
+ test_redirect_uri 'foo'
272
+ end
273
+ expect(subject.native_redirect_uri).to eq('foo')
274
+ end
275
+ end
276
+
267
277
  it 'raises an exception when configuration is not set' do
268
278
  old_config = Doorkeeper.configuration
269
279
  Doorkeeper.module_eval do
@@ -0,0 +1,28 @@
1
+ require 'spec_helper_integration'
2
+
3
+ describe Doorkeeper do
4
+ describe 'authenticate' do
5
+ let(:token) { double('Token') }
6
+ let(:request) { double('ActionDispatch::Request') }
7
+ before do
8
+ allow(Doorkeeper::OAuth::Token).to receive(:authenticate).
9
+ with(request, *token_strategies) { token }
10
+ end
11
+
12
+ context 'with specific access token strategies' do
13
+ let(:token_strategies) { [:first_way, :second_way] }
14
+
15
+ it 'authenticates the token from the request' do
16
+ expect(Doorkeeper.authenticate(request, token_strategies)).to eq(token)
17
+ end
18
+ end
19
+
20
+ context 'with default access token strategies' do
21
+ let(:token_strategies) { Doorkeeper.configuration.access_token_methods }
22
+
23
+ it 'authenticates the token from the request' do
24
+ expect(Doorkeeper.authenticate(request)).to eq(token)
25
+ end
26
+ end
27
+ end
28
+ end
@@ -14,7 +14,7 @@ class Doorkeeper::OAuth::ClientCredentialsRequest
14
14
  it 'returns false if creation fails' do
15
15
  expect(Doorkeeper::AccessToken).to receive(:create).and_return(false)
16
16
  created = subject.call(client, scopes)
17
- expect(created).to be_false
17
+ expect(created).to be_falsey
18
18
  end
19
19
  end
20
20
  end
@@ -52,7 +52,7 @@ class Doorkeeper::OAuth::ClientCredentialsRequest
52
52
  end
53
53
 
54
54
  it 'returns false' do
55
- expect(subject.create(client, scopes, creator)).to be_false
55
+ expect(subject.create(client, scopes, creator)).to be_falsey
56
56
  end
57
57
  end
58
58
  end
@@ -12,30 +12,30 @@ module Doorkeeper::OAuth::Helpers
12
12
  it 'true if scopes matches' do
13
13
  scopes = new_scope :public
14
14
  scopes_to_match = new_scope :public
15
- expect(ScopeChecker.matches?(scopes, scopes_to_match)).to be_true
15
+ expect(ScopeChecker.matches?(scopes, scopes_to_match)).to be_truthy
16
16
  end
17
17
 
18
18
  it 'is false when scopes differs' do
19
19
  scopes = new_scope :public
20
20
  scopes_to_match = new_scope :write
21
- expect(ScopeChecker.matches?(scopes, scopes_to_match)).to be_false
21
+ expect(ScopeChecker.matches?(scopes, scopes_to_match)).to be_falsey
22
22
  end
23
23
 
24
24
  it 'is false when scope in array is missing' do
25
25
  scopes = new_scope :public
26
26
  scopes_to_match = new_scope :public, :write
27
- expect(ScopeChecker.matches?(scopes, scopes_to_match)).to be_false
27
+ expect(ScopeChecker.matches?(scopes, scopes_to_match)).to be_falsey
28
28
  end
29
29
 
30
30
  it 'is false when scope in string is missing' do
31
31
  scopes = new_scope :public, :write
32
32
  scopes_to_match = new_scope :public
33
- expect(ScopeChecker.matches?(scopes, scopes_to_match)).to be_false
33
+ expect(ScopeChecker.matches?(scopes, scopes_to_match)).to be_falsey
34
34
  end
35
35
 
36
36
  it 'is false when any of attributes is nil' do
37
- expect(ScopeChecker.matches?(nil, double)).to be_false
38
- expect(ScopeChecker.matches?(double, nil)).to be_false
37
+ expect(ScopeChecker.matches?(nil, double)).to be_falsey
38
+ expect(ScopeChecker.matches?(double, nil)).to be_falsey
39
39
  end
40
40
  end
41
41
 
@@ -44,31 +44,31 @@ module Doorkeeper::OAuth::Helpers
44
44
 
45
45
  it 'is valid if scope is present' do
46
46
  server_scopes.add :scope
47
- expect(ScopeChecker.valid?('scope', server_scopes)).to be_true
47
+ expect(ScopeChecker.valid?('scope', server_scopes)).to be_truthy
48
48
  end
49
49
 
50
50
  it 'is invalid if includes tabs space' do
51
- expect(ScopeChecker.valid?("\tsomething", server_scopes)).to be_false
51
+ expect(ScopeChecker.valid?("\tsomething", server_scopes)).to be_falsey
52
52
  end
53
53
 
54
54
  it 'is invalid if scope is not present' do
55
- expect(ScopeChecker.valid?(nil, server_scopes)).to be_false
55
+ expect(ScopeChecker.valid?(nil, server_scopes)).to be_falsey
56
56
  end
57
57
 
58
58
  it 'is invalid if scope is blank' do
59
- expect(ScopeChecker.valid?(' ', server_scopes)).to be_false
59
+ expect(ScopeChecker.valid?(' ', server_scopes)).to be_falsey
60
60
  end
61
61
 
62
62
  it 'is invalid if includes return space' do
63
- expect(ScopeChecker.valid?("scope\r", server_scopes)).to be_false
63
+ expect(ScopeChecker.valid?("scope\r", server_scopes)).to be_falsey
64
64
  end
65
65
 
66
66
  it 'is invalid if includes new lines' do
67
- expect(ScopeChecker.valid?("scope\nanother", server_scopes)).to be_false
67
+ expect(ScopeChecker.valid?("scope\nanother", server_scopes)).to be_falsey
68
68
  end
69
69
 
70
70
  it 'is invalid if any scope is not included in server scopes' do
71
- expect(ScopeChecker.valid?('scope another', server_scopes)).to be_false
71
+ expect(ScopeChecker.valid?('scope another', server_scopes)).to be_falsey
72
72
  end
73
73
  end
74
74
  end
@@ -7,50 +7,50 @@ module Doorkeeper::OAuth::Helpers
7
7
  describe '.valid?' do
8
8
  it 'is valid for valid uris' do
9
9
  uri = 'http://app.co'
10
- expect(URIChecker.valid?(uri)).to be_true
10
+ expect(URIChecker.valid?(uri)).to be_truthy
11
11
  end
12
12
 
13
13
  it 'is valid if include path param' do
14
14
  uri = 'http://app.co/path'
15
- expect(URIChecker.valid?(uri)).to be_true
15
+ expect(URIChecker.valid?(uri)).to be_truthy
16
16
  end
17
17
 
18
18
  it 'is valid if include query param' do
19
19
  uri = 'http://app.co/?query=1'
20
- expect(URIChecker.valid?(uri)).to be_true
20
+ expect(URIChecker.valid?(uri)).to be_truthy
21
21
  end
22
22
 
23
23
  it 'is invalid if uri includes fragment' do
24
24
  uri = 'http://app.co/test#fragment'
25
- expect(URIChecker.valid?(uri)).to be_false
25
+ expect(URIChecker.valid?(uri)).to be_falsey
26
26
  end
27
27
 
28
28
  it 'is invalid if scheme is missing' do
29
29
  uri = 'app.co'
30
- expect(URIChecker.valid?(uri)).to be_false
30
+ expect(URIChecker.valid?(uri)).to be_falsey
31
31
  end
32
32
 
33
33
  it 'is invalid if is a relative uri' do
34
34
  uri = '/abc/123'
35
- expect(URIChecker.valid?(uri)).to be_false
35
+ expect(URIChecker.valid?(uri)).to be_falsey
36
36
  end
37
37
 
38
38
  it 'is invalid if is not a url' do
39
39
  uri = 'http://'
40
- expect(URIChecker.valid?(uri)).to be_false
40
+ expect(URIChecker.valid?(uri)).to be_falsey
41
41
  end
42
42
  end
43
43
 
44
44
  describe '.matches?' do
45
45
  it 'is true if both url matches' do
46
46
  uri = client_uri = 'http://app.co/aaa'
47
- expect(URIChecker.matches?(uri, client_uri)).to be_true
47
+ expect(URIChecker.matches?(uri, client_uri)).to be_truthy
48
48
  end
49
49
 
50
50
  it 'ignores query parameter on comparsion' do
51
51
  uri = 'http://app.co/?query=hello'
52
52
  client_uri = 'http://app.co'
53
- expect(URIChecker.matches?(uri, client_uri)).to be_true
53
+ expect(URIChecker.matches?(uri, client_uri)).to be_truthy
54
54
  end
55
55
 
56
56
  context 'allows wildcard redirect_uri' do
@@ -81,25 +81,25 @@ module Doorkeeper::OAuth::Helpers
81
81
  describe '.valid_for_authorization?' do
82
82
  it 'is true if valid and matches' do
83
83
  uri = client_uri = 'http://app.co/aaa'
84
- expect(URIChecker.valid_for_authorization?(uri, client_uri)).to be_true
84
+ expect(URIChecker.valid_for_authorization?(uri, client_uri)).to be_truthy
85
85
  end
86
86
 
87
87
  it 'is false if valid and mismatches' do
88
88
  uri = 'http://app.co/aaa'
89
89
  client_uri = 'http://app.co/bbb'
90
- expect(URIChecker.valid_for_authorization?(uri, client_uri)).to be_false
90
+ expect(URIChecker.valid_for_authorization?(uri, client_uri)).to be_falsey
91
91
  end
92
92
 
93
93
  it 'is true if valid and included in array' do
94
94
  uri = 'http://app.co/aaa'
95
95
  client_uri = "http://example.com/bbb\nhttp://app.co/aaa"
96
- expect(URIChecker.valid_for_authorization?(uri, client_uri)).to be_true
96
+ expect(URIChecker.valid_for_authorization?(uri, client_uri)).to be_truthy
97
97
  end
98
98
 
99
99
  it 'is false if valid and not included in array' do
100
100
  uri = 'http://app.co/aaa'
101
101
  client_uri = "http://example.com/bbb\nhttp://app.co/cc"
102
- expect(URIChecker.valid_for_authorization?(uri, client_uri)).to be_false
102
+ expect(URIChecker.valid_for_authorization?(uri, client_uri)).to be_falsey
103
103
  end
104
104
 
105
105
  it 'is true if valid and matches' do
@@ -5,7 +5,7 @@ require 'doorkeeper/oauth/scopes'
5
5
 
6
6
  module Doorkeeper::OAuth
7
7
  describe Scopes do
8
- describe :add do
8
+ describe '#add' do
9
9
  it 'allows you to add scopes with symbols' do
10
10
  subject.add :public
11
11
  expect(subject.all).to eq(['public'])
@@ -23,22 +23,22 @@ module Doorkeeper::OAuth
23
23
  end
24
24
  end
25
25
 
26
- describe :exists do
26
+ describe '#exists' do
27
27
  before do
28
28
  subject.add :public
29
29
  end
30
30
 
31
31
  it 'returns true if scope with given name is present' do
32
- expect(subject.exists?('public')).to be_true
32
+ expect(subject.exists?('public')).to be_truthy
33
33
  end
34
34
 
35
35
  it 'returns false if scope with given name does not exist' do
36
- expect(subject.exists?('other')).to be_false
36
+ expect(subject.exists?('other')).to be_falsey
37
37
  end
38
38
 
39
39
  it 'handles symbols' do
40
- expect(subject.exists?(:public)).to be_true
41
- expect(subject.exists?(:other)).to be_false
40
+ expect(subject.exists?(:public)).to be_truthy
41
+ expect(subject.exists?(:other)).to be_falsey
42
42
  end
43
43
  end
44
44
 
@@ -59,7 +59,7 @@ module Doorkeeper::OAuth
59
59
  end
60
60
  end
61
61
 
62
- describe :+ do
62
+ describe '#+' do
63
63
  it 'can add to another scope object' do
64
64
  scopes = Scopes.from_string('public') + Scopes.from_string('admin')
65
65
  expect(scopes.all).to eq(%w(public admin))
@@ -78,7 +78,7 @@ module Doorkeeper::OAuth
78
78
  end
79
79
  end
80
80
 
81
- describe :== do
81
+ describe '#==' do
82
82
  it 'is equal to another set of scopes' do
83
83
  expect(Scopes.from_string('public')).to eq(Scopes.from_string('public'))
84
84
  end
@@ -92,31 +92,31 @@ module Doorkeeper::OAuth
92
92
  end
93
93
  end
94
94
 
95
- describe :has_scopes? do
95
+ describe '#has_scopes?' do
96
96
  subject { Scopes.from_string('public admin') }
97
97
 
98
98
  it 'returns true when at least one scope is included' do
99
- expect(subject.has_scopes?(Scopes.from_string('public'))).to be_true
99
+ expect(subject.has_scopes?(Scopes.from_string('public'))).to be_truthy
100
100
  end
101
101
 
102
102
  it 'returns true when all scopes are included' do
103
- expect(subject.has_scopes?(Scopes.from_string('public admin'))).to be_true
103
+ expect(subject.has_scopes?(Scopes.from_string('public admin'))).to be_truthy
104
104
  end
105
105
 
106
106
  it 'is true if all scopes are included in any order' do
107
- expect(subject.has_scopes?(Scopes.from_string('admin public'))).to be_true
107
+ expect(subject.has_scopes?(Scopes.from_string('admin public'))).to be_truthy
108
108
  end
109
109
 
110
110
  it 'is false if no scopes are included' do
111
- expect(subject.has_scopes?(Scopes.from_string('notexistent'))).to be_false
111
+ expect(subject.has_scopes?(Scopes.from_string('notexistent'))).to be_falsey
112
112
  end
113
113
 
114
114
  it 'returns false when any scope is not included' do
115
- expect(subject.has_scopes?(Scopes.from_string('public nope'))).to be_false
115
+ expect(subject.has_scopes?(Scopes.from_string('public nope'))).to be_falsey
116
116
  end
117
117
 
118
118
  it 'is false if no scopes are included even for existing ones' do
119
- expect(subject.has_scopes?(Scopes.from_string('public admin notexistent'))).to be_false
119
+ expect(subject.has_scopes?(Scopes.from_string('public admin notexistent'))).to be_falsey
120
120
  end
121
121
  end
122
122
  end
@@ -62,7 +62,7 @@ module Doorkeeper
62
62
  context 'the second token has the same owner and same app' do
63
63
  let(:access_token2) { FactoryGirl.create :access_token, default_attributes }
64
64
  it 'success' do
65
- expect(access_token1.same_credential?(access_token2)).to be_true
65
+ expect(access_token1.same_credential?(access_token2)).to be_truthy
66
66
  end
67
67
  end
68
68
 
@@ -71,7 +71,7 @@ module Doorkeeper
71
71
  let(:access_token2) { FactoryGirl.create :access_token, application: other_application, resource_owner_id: resource_owner_id }
72
72
 
73
73
  it 'fail' do
74
- expect(access_token1.same_credential?(access_token2)).to be_false
74
+ expect(access_token1.same_credential?(access_token2)).to be_falsey
75
75
  end
76
76
  end
77
77
 
@@ -81,7 +81,7 @@ module Doorkeeper
81
81
  let(:access_token2) { FactoryGirl.create :access_token, application: other_application, resource_owner_id: 42 }
82
82
 
83
83
  it 'fail' do
84
- expect(access_token1.same_credential?(access_token2)).to be_false
84
+ expect(access_token1.same_credential?(access_token2)).to be_falsey
85
85
  end
86
86
  end
87
87
 
@@ -89,7 +89,7 @@ module Doorkeeper
89
89
  let(:access_token2) { FactoryGirl.create :access_token, application: application, resource_owner_id: 42 }
90
90
 
91
91
  it 'fail' do
92
- expect(access_token1.same_credential?(access_token2)).to be_false
92
+ expect(access_token1.same_credential?(access_token2)).to be_falsey
93
93
  end
94
94
  end
95
95
  end
@@ -76,8 +76,8 @@ module Doorkeeper
76
76
  end
77
77
 
78
78
  it 'checks uniqueness of uid' do
79
- app1 = Factory(:application)
80
- app2 = Factory(:application)
79
+ app1 = FactoryGirl.create(:application)
80
+ app2 = FactoryGirl.create(:application)
81
81
  app2.uid = app1.uid
82
82
  expect(app2).not_to be_valid
83
83
  end
@@ -55,7 +55,7 @@ feature 'Edit application' do
55
55
  end
56
56
 
57
57
  scenario 'updating a valid app' do
58
- fill_in :name, with: 'Serious app'
58
+ fill_in 'application[name]', with: 'Serious app'
59
59
  click_button 'Submit'
60
60
  i_should_see 'Application updated'
61
61
  i_should_see 'Serious app'
@@ -63,7 +63,7 @@ feature 'Edit application' do
63
63
  end
64
64
 
65
65
  scenario 'updating an invalid app' do
66
- fill_in :name, with: ''
66
+ fill_in 'application[name]', with: ''
67
67
  click_button 'Submit'
68
68
  i_should_see 'Whoops! Check your form for possible errors'
69
69
  end
@@ -22,7 +22,7 @@ feature 'Authorization Code Flow' do
22
22
  end
23
23
 
24
24
  scenario 'resource owner authorizes using test url' do
25
- @client.redirect_uri = Doorkeeper.configuration.test_redirect_uri
25
+ @client.redirect_uri = Doorkeeper.configuration.native_redirect_uri
26
26
  @client.save!
27
27
  visit authorization_endpoint_url(client: @client)
28
28
  click_on 'Authorize'
@@ -13,7 +13,7 @@ feature 'Resource Owner Password Credentials Flow inproperly set up' do
13
13
 
14
14
  context 'with valid user credentials' do
15
15
  scenario 'should issue new token' do
16
- pending 'Check a way to supress warnings here (or handle config better)'
16
+ skip 'Check a way to supress warnings here (or handle config better)'
17
17
  expect do
18
18
  post password_token_endpoint_url(client: @client, resource_owner: @resource_owner)
19
19
  end.to_not change { Doorkeeper::AccessToken.count }
@@ -45,8 +45,8 @@ feature 'Revoke Token Flow' do
45
45
  authorization_access_token.reload
46
46
 
47
47
  expect(response).to be_success
48
- expect(token_to_revoke.revoked?).to be_true
49
- expect(Doorkeeper::AccessToken.by_refresh_token(token_to_revoke.refresh_token).revoked?).to be_true
48
+ expect(token_to_revoke.revoked?).to be_truthy
49
+ expect(Doorkeeper::AccessToken.by_refresh_token(token_to_revoke.refresh_token).revoked?).to be_truthy
50
50
 
51
51
  end
52
52
 
@@ -59,9 +59,9 @@ feature 'Revoke Token Flow' do
59
59
  authorization_access_token.reload
60
60
 
61
61
  expect(response).to be_success
62
- expect(token_to_revoke.revoked?).to be_false
63
- expect(Doorkeeper::AccessToken.by_refresh_token(token_to_revoke.refresh_token).revoked?).to be_false
64
- expect(authorization_access_token.revoked?).to be_false
62
+ expect(token_to_revoke.revoked?).to be_falsey
63
+ expect(Doorkeeper::AccessToken.by_refresh_token(token_to_revoke.refresh_token).revoked?).to be_falsey
64
+ expect(authorization_access_token.revoked?).to be_falsey
65
65
 
66
66
  end
67
67
 
@@ -84,9 +84,9 @@ feature 'Revoke Token Flow' do
84
84
  authorization_access_token.reload
85
85
 
86
86
  expect(response).to be_success
87
- expect(token_to_revoke.revoked?).to be_true
88
- expect(Doorkeeper::AccessToken.by_refresh_token(token_to_revoke.refresh_token).revoked?).to be_true
89
- expect(authorization_access_token.revoked?).to be_false
87
+ expect(token_to_revoke.revoked?).to be_truthy
88
+ expect(Doorkeeper::AccessToken.by_refresh_token(token_to_revoke.refresh_token).revoked?).to be_truthy
89
+ expect(authorization_access_token.revoked?).to be_falsey
90
90
 
91
91
  end
92
92
  end
@@ -109,9 +109,9 @@ feature 'Revoke Token Flow' do
109
109
  authorization_access_token.reload
110
110
 
111
111
  expect(response).to be_success
112
- expect(token_to_revoke.revoked?).to be_false
113
- expect(Doorkeeper::AccessToken.by_refresh_token(token_to_revoke.refresh_token).revoked?).to be_false
114
- expect(authorization_access_token.revoked?).to be_false
112
+ expect(token_to_revoke.revoked?).to be_falsey
113
+ expect(Doorkeeper::AccessToken.by_refresh_token(token_to_revoke.refresh_token).revoked?).to be_falsey
114
+ expect(authorization_access_token.revoked?).to be_falsey
115
115
 
116
116
  end
117
117
  end
@@ -133,9 +133,9 @@ feature 'Revoke Token Flow' do
133
133
  authorization_access_token.reload
134
134
 
135
135
  expect(response).to be_success
136
- expect(token_to_revoke.revoked?).to be_false
137
- expect(Doorkeeper::AccessToken.by_refresh_token(token_to_revoke.refresh_token).revoked?).to be_false
138
- expect(authorization_access_token.revoked?).to be_false
136
+ expect(token_to_revoke.revoked?).to be_falsey
137
+ expect(Doorkeeper::AccessToken.by_refresh_token(token_to_revoke.refresh_token).revoked?).to be_falsey
138
+ expect(authorization_access_token.revoked?).to be_falsey
139
139
 
140
140
  end
141
141
  end
@@ -156,7 +156,7 @@ feature 'Revoke Token Flow' do
156
156
  token_to_revoke.reload
157
157
 
158
158
  expect(response).to be_success
159
- expect(Doorkeeper::AccessToken.by_refresh_token(token_to_revoke.refresh_token).revoked?).to be_true
159
+ expect(Doorkeeper::AccessToken.by_refresh_token(token_to_revoke.refresh_token).revoked?).to be_truthy
160
160
  expect(authorization_access_token).to_not be_revoked
161
161
 
162
162
  end
@@ -5,6 +5,8 @@ TABLE_NAME_SUFFIX = ENV['table_name_suffix'] || nil
5
5
 
6
6
  $LOAD_PATH.unshift File.dirname(__FILE__)
7
7
 
8
+ require 'capybara/rspec'
9
+ require 'rspec/active_model/mocks'
8
10
  require 'dummy/config/environment'
9
11
  require 'rspec/rails'
10
12
  require 'rspec/autorun'
@@ -27,6 +29,7 @@ ENGINE_RAILS_ROOT = File.join(File.dirname(__FILE__), '../')
27
29
  Dir["#{File.dirname(__FILE__)}/support/{dependencies,helpers,shared}/*.rb"].each { |f| require f }
28
30
 
29
31
  RSpec.configure do |config|
32
+ config.infer_spec_type_from_file_location!
30
33
  config.mock_with :rspec
31
34
 
32
35
  config.infer_base_class_for_anonymous_controllers = false
@@ -17,7 +17,7 @@ module AuthorizationRequestHelper
17
17
  end
18
18
 
19
19
  def client_should_be_authorized(client)
20
- expect(client).to have(1).access_grants
20
+ expect(client.access_grants.size).to eq(1)
21
21
  end
22
22
 
23
23
  def client_should_not_be_authorized(client)
@@ -10,13 +10,13 @@ describe RedirectUriValidator do
10
10
  expect(subject).to be_valid
11
11
  end
12
12
 
13
- it 'accepts test redirect uri' do
13
+ it 'accepts native redirect uri' do
14
14
  subject.redirect_uri = 'urn:ietf:wg:oauth:2.0:oob'
15
15
  expect(subject).to be_valid
16
16
  end
17
17
 
18
18
  it 'rejects if test uri is disabled' do
19
- allow(RedirectUriValidator).to receive(:test_redirect_uri).and_return(nil)
19
+ allow(RedirectUriValidator).to receive(:native_redirect_uri).and_return(nil)
20
20
  subject.redirect_uri = 'urn:some:test'
21
21
  expect(subject).not_to be_valid
22
22
  end
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: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felipe Elias Philipp
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-23 00:00:00.000000000 Z
12
+ date: 2014-07-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -43,30 +43,30 @@ dependencies:
43
43
  name: rspec-rails
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ">="
46
+ - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: 2.11.4
48
+ version: 2.99.0
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ">="
53
+ - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: 2.11.4
55
+ version: 2.99.0
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: capybara
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: 1.1.2
62
+ version: 2.3.0
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: 1.1.2
69
+ version: 2.3.0
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: generator_spec
72
72
  requirement: !ruby/object:Gem::Requirement
@@ -87,42 +87,56 @@ dependencies:
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: 2.6.4
90
+ version: 4.4.0
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: 2.6.4
97
+ version: 4.4.0
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: timecop
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: 0.5.2
104
+ version: 0.7.0
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: 0.5.2
111
+ version: 0.7.0
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: database_cleaner
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - "~>"
117
117
  - !ruby/object:Gem::Version
118
- version: 0.9.1
118
+ version: 1.3.0
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - "~>"
124
+ - !ruby/object:Gem::Version
125
+ version: 1.3.0
126
+ - !ruby/object:Gem::Dependency
127
+ name: rspec-activemodel-mocks
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: 1.0.0
119
133
  type: :development
120
134
  prerelease: false
121
135
  version_requirements: !ruby/object:Gem::Requirement
122
136
  requirements:
123
137
  - - "~>"
124
138
  - !ruby/object:Gem::Version
125
- version: 0.9.1
139
+ version: 1.0.0
126
140
  - !ruby/object:Gem::Dependency
127
141
  name: bcrypt-ruby
128
142
  requirement: !ruby/object:Gem::Requirement
@@ -146,6 +160,7 @@ extensions: []
146
160
  extra_rdoc_files: []
147
161
  files:
148
162
  - ".gitignore"
163
+ - ".hound.yml"
149
164
  - ".rspec"
150
165
  - ".travis.yml"
151
166
  - CHANGELOG.md
@@ -315,6 +330,7 @@ files:
315
330
  - spec/generators/templates/routes.rb
316
331
  - spec/generators/views_generator_spec.rb
317
332
  - spec/lib/config_spec.rb
333
+ - spec/lib/doorkeeper_spec.rb
318
334
  - spec/lib/models/expirable_spec.rb
319
335
  - spec/lib/models/revocable_spec.rb
320
336
  - spec/lib/models/scopes_spec.rb
@@ -405,3 +421,4 @@ signing_key:
405
421
  specification_version: 4
406
422
  summary: Doorkeeper is an OAuth 2 provider for Rails.
407
423
  test_files: []
424
+ has_rdoc: