doorkeeper 0.7.3 → 0.7.4
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/doorkeeper/oauth/scopes.rb +2 -2
- data/lib/doorkeeper/version.rb +1 -1
- data/spec/lib/config_spec.rb +3 -3
- data/spec/lib/models/scopes_spec.rb +1 -1
- data/spec/lib/oauth/password_access_token_request_spec.rb +1 -1
- data/spec/lib/oauth/scopes_spec.rb +5 -5
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2eb5da9c49a3a0600451b34d688aec2da2dbf1df
|
4
|
+
data.tar.gz: 9f9db27f7d5278e3c213818861ffcbbefdd10272
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80d9b5f9faca1ee0b45a824d0938bbbf6f644062093e098297b263a9849b6c7447f5ab639839048345b19e046a76a23e2eeb8cc5c54d5700a4735104af47efb9
|
7
|
+
data.tar.gz: 852f0663b33a4fb1ace5ab88dbac330e1b7fcdc5ac28f59b5d6397dbe7562adf38ffc975680603f9f99057c7bb86ad76d3884dba0e71ed66a51fa56762e3c8d9
|
data/CHANGELOG.md
CHANGED
@@ -24,11 +24,11 @@ module Doorkeeper
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def exists?(scope)
|
27
|
-
@scopes.include? scope.
|
27
|
+
@scopes.include? scope.to_s
|
28
28
|
end
|
29
29
|
|
30
30
|
def add(*scopes)
|
31
|
-
@scopes.push(*scopes.map(&:
|
31
|
+
@scopes.push(*scopes.map(&:to_s))
|
32
32
|
@scopes.uniq!
|
33
33
|
end
|
34
34
|
|
data/lib/doorkeeper/version.rb
CHANGED
data/spec/lib/config_spec.rb
CHANGED
@@ -53,7 +53,7 @@ describe Doorkeeper, "configuration" do
|
|
53
53
|
orm DOORKEEPER_ORM
|
54
54
|
default_scopes :public
|
55
55
|
}
|
56
|
-
subject.default_scopes.should include(
|
56
|
+
subject.default_scopes.should include('public')
|
57
57
|
end
|
58
58
|
|
59
59
|
it 'has optional scopes' do
|
@@ -61,7 +61,7 @@ describe Doorkeeper, "configuration" do
|
|
61
61
|
orm DOORKEEPER_ORM
|
62
62
|
optional_scopes :write, :update
|
63
63
|
}
|
64
|
-
subject.optional_scopes.should include(
|
64
|
+
subject.optional_scopes.should include('write', 'update')
|
65
65
|
end
|
66
66
|
|
67
67
|
it 'has all scopes' do
|
@@ -70,7 +70,7 @@ describe Doorkeeper, "configuration" do
|
|
70
70
|
default_scopes :normal
|
71
71
|
optional_scopes :admin
|
72
72
|
end
|
73
|
-
subject.scopes.should include(
|
73
|
+
subject.scopes.should include('normal', 'admin')
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
@@ -44,7 +44,7 @@ module Doorkeeper::OAuth
|
|
44
44
|
expect {
|
45
45
|
subject.authorize
|
46
46
|
}.to change { Doorkeeper::AccessToken.count }.by(1)
|
47
|
-
Doorkeeper::AccessToken.last.scopes.should include(
|
47
|
+
Doorkeeper::AccessToken.last.scopes.should include('public')
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
@@ -8,18 +8,18 @@ module Doorkeeper::OAuth
|
|
8
8
|
describe :add do
|
9
9
|
it 'allows you to add scopes with symbols' do
|
10
10
|
subject.add :public
|
11
|
-
subject.all.should == [
|
11
|
+
subject.all.should == ['public']
|
12
12
|
end
|
13
13
|
|
14
14
|
it 'allows you to add scopes with strings' do
|
15
15
|
subject.add "public"
|
16
|
-
subject.all.should == [
|
16
|
+
subject.all.should == ['public']
|
17
17
|
end
|
18
18
|
|
19
19
|
it 'do not add already included scopes' do
|
20
20
|
subject.add :public
|
21
21
|
subject.add :public
|
22
|
-
subject.all.should == [
|
22
|
+
subject.all.should == ['public']
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -48,13 +48,13 @@ module Doorkeeper::OAuth
|
|
48
48
|
subject { Scopes.from_string(string) }
|
49
49
|
|
50
50
|
it { should be_a(Scopes) }
|
51
|
-
its(:all) { should == [
|
51
|
+
its(:all) { should == ['public', 'write'] }
|
52
52
|
end
|
53
53
|
|
54
54
|
describe :+ do
|
55
55
|
it "can add to another scope object" do
|
56
56
|
scopes = Scopes.from_string("public") + Scopes.from_string("admin")
|
57
|
-
scopes.all.should == [
|
57
|
+
scopes.all.should == ['public', 'admin']
|
58
58
|
end
|
59
59
|
|
60
60
|
it "does not change the existing object" do
|
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: 0.7.
|
4
|
+
version: 0.7.4
|
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: 2013-
|
12
|
+
date: 2013-12-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
@@ -409,9 +409,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
409
409
|
version: '0'
|
410
410
|
requirements: []
|
411
411
|
rubyforge_project:
|
412
|
-
rubygems_version: 2.0.
|
412
|
+
rubygems_version: 2.0.14
|
413
413
|
signing_key:
|
414
414
|
specification_version: 4
|
415
415
|
summary: Doorkeeper is an OAuth 2 provider for Rails.
|
416
416
|
test_files: []
|
417
|
-
has_rdoc:
|