doorkeeper 1.0.0.rc2 → 1.0.0

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 (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +2 -1
  3. data/lib/doorkeeper/version.rb +1 -1
  4. data/spec/controllers/applications_controller_spec.rb +4 -4
  5. data/spec/controllers/authorizations_controller_spec.rb +9 -9
  6. data/spec/controllers/protected_resources_controller_spec.rb +10 -10
  7. data/spec/controllers/token_info_controller_spec.rb +4 -4
  8. data/spec/controllers/tokens_controller_spec.rb +4 -4
  9. data/spec/lib/config_spec.rb +21 -21
  10. data/spec/lib/models/expirable_spec.rb +13 -13
  11. data/spec/lib/models/revocable_spec.rb +5 -5
  12. data/spec/lib/models/scopes_spec.rb +3 -3
  13. data/spec/lib/oauth/authorization/uri_builder_spec.rb +5 -5
  14. data/spec/lib/oauth/authorization_code_request_spec.rb +7 -7
  15. data/spec/lib/oauth/client/credentials_spec.rb +8 -8
  16. data/spec/lib/oauth/client/methods_spec.rb +8 -8
  17. data/spec/lib/oauth/client_credentials/creator_spec.rb +2 -2
  18. data/spec/lib/oauth/client_credentials/issuer_spec.rb +10 -9
  19. data/spec/lib/oauth/client_credentials/validation_spec.rb +6 -6
  20. data/spec/lib/oauth/client_credentials_request_spec.rb +7 -7
  21. data/spec/lib/oauth/client_spec.rb +8 -8
  22. data/spec/lib/oauth/code_request_spec.rb +4 -4
  23. data/spec/lib/oauth/error_response_spec.rb +22 -15
  24. data/spec/lib/oauth/error_spec.rb +1 -1
  25. data/spec/lib/oauth/helpers/scope_checker_spec.rb +13 -13
  26. data/spec/lib/oauth/helpers/unique_token_spec.rb +2 -2
  27. data/spec/lib/oauth/helpers/uri_checker_spec.rb +13 -13
  28. data/spec/lib/oauth/invalid_token_response_spec.rb +9 -4
  29. data/spec/lib/oauth/password_access_token_request_spec.rb +7 -7
  30. data/spec/lib/oauth/pre_authorization_spec.rb +14 -14
  31. data/spec/lib/oauth/refresh_token_request_spec.rb +8 -8
  32. data/spec/lib/oauth/scopes_spec.rb +27 -19
  33. data/spec/lib/oauth/token_request_spec.rb +4 -4
  34. data/spec/lib/oauth/token_response_spec.rb +11 -11
  35. data/spec/lib/oauth/token_spec.rb +9 -9
  36. data/spec/lib/server_spec.rb +1 -1
  37. data/spec/models/doorkeeper/access_token_spec.rb +15 -15
  38. data/spec/models/doorkeeper/application_spec.rb +21 -21
  39. data/spec/requests/flows/authorization_code_spec.rb +1 -1
  40. data/spec/requests/flows/client_credentials_spec.rb +1 -1
  41. data/spec/requests/flows/refresh_token_spec.rb +6 -6
  42. data/spec/requests/protected_resources/private_api_spec.rb +3 -3
  43. data/spec/routing/custom_controller_routes_spec.rb +16 -16
  44. data/spec/routing/default_routes_spec.rb +7 -7
  45. data/spec/routing/scoped_routes_spec.rb +7 -7
  46. data/spec/support/helpers/authorization_request_helper.rb +3 -3
  47. data/spec/support/helpers/model_helper.rb +6 -6
  48. data/spec/support/helpers/request_spec_helper.rb +9 -9
  49. data/spec/support/shared/controllers_shared_context.rb +6 -6
  50. data/spec/support/shared/models_shared_examples.rb +6 -6
  51. data/spec/validators/redirect_uri_validator_spec.rb +12 -12
  52. metadata +4 -4
@@ -7,41 +7,41 @@ describe RedirectUriValidator do
7
7
 
8
8
  it 'is valid when the uri is a uri' do
9
9
  subject.redirect_uri = "http://example.com/callback"
10
- subject.should be_valid
10
+ expect(subject).to be_valid
11
11
  end
12
12
 
13
13
  it 'accepts test redirect uri' do
14
14
  subject.redirect_uri = 'urn:ietf:wg:oauth:2.0:oob'
15
- subject.should be_valid
15
+ expect(subject).to be_valid
16
16
  end
17
17
 
18
18
  it 'rejects if test uri is disabled' do
19
- RedirectUriValidator.stub :test_redirect_uri => nil
19
+ allow(RedirectUriValidator).to receive(:test_redirect_uri).and_return(nil)
20
20
  subject.redirect_uri = "urn:some:test"
21
- subject.should_not be_valid
21
+ expect(subject).not_to be_valid
22
22
  end
23
23
 
24
24
  it 'is invalid when the uri is not a uri' do
25
25
  subject.redirect_uri = ']'
26
- subject.should_not be_valid
27
- subject.errors[:redirect_uri].first.should == "must be a valid URI."
26
+ expect(subject).not_to be_valid
27
+ expect(subject.errors[:redirect_uri].first).to eq("must be a valid URI.")
28
28
  end
29
29
 
30
30
  it 'is invalid when the uri is relative' do
31
31
  subject.redirect_uri = "/abcd"
32
- subject.should_not be_valid
33
- subject.errors[:redirect_uri].first.should == "must be an absolute URI."
32
+ expect(subject).not_to be_valid
33
+ expect(subject.errors[:redirect_uri].first).to eq("must be an absolute URI.")
34
34
  end
35
35
 
36
36
  it 'is invalid when the uri has a fragment' do
37
37
  subject.redirect_uri = "http://example.com/abcd#xyz"
38
- subject.should_not be_valid
39
- subject.errors[:redirect_uri].first.should == "cannot contain a fragment."
38
+ expect(subject).not_to be_valid
39
+ expect(subject.errors[:redirect_uri].first).to eq("cannot contain a fragment.")
40
40
  end
41
41
 
42
42
  it 'is invalid when the uri has a query parameter' do
43
43
  subject.redirect_uri = "http://example.com/abcd?xyz=123"
44
- subject.should_not be_valid
45
- subject.errors[:redirect_uri].first.should == "cannot contain a query parameter."
44
+ expect(subject).not_to be_valid
45
+ expect(subject.errors[:redirect_uri].first).to eq("cannot contain a query parameter.")
46
46
  end
47
47
  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.0.0.rc2
4
+ version: 1.0.0
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-01-09 00:00:00.000000000 Z
12
+ date: 2014-01-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -389,9 +389,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
389
389
  version: '0'
390
390
  required_rubygems_version: !ruby/object:Gem::Requirement
391
391
  requirements:
392
- - - ">"
392
+ - - ">="
393
393
  - !ruby/object:Gem::Version
394
- version: 1.3.1
394
+ version: '0'
395
395
  requirements: []
396
396
  rubyforge_project:
397
397
  rubygems_version: 2.2.0