route_authorizer 0.0.4 → 0.0.5
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 +4 -4
- data/lib/route_authorizer.rb +1 -1
- data/lib/route_authorizer/permission.rb +3 -1
- data/lib/route_authorizer/permission_dsl.rb +0 -2
- data/lib/route_authorizer/version.rb +1 -1
- data/spec/authorizer_spec.rb +0 -2
- data/spec/permission_dsl_spec.rb +1 -5
- data/spec/permission_spec.rb +5 -2
- data/spec/spec_helper.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e3a0f2ada77c7eb4c8e74711f6ea639ada66ca8
|
4
|
+
data.tar.gz: 843853d3e80d386fe0838116d1615d358c3940c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccb85cbe5d2ce0cf939cb08220eadc6189b8e1f9f920bc81b242f8dd5f543e5ac59a5282f375688982a24dc7a215d0643f7067cf7724331347fc4bed3795f8c2
|
7
|
+
data.tar.gz: 0e1f6d4bf1b393b932f609a1594d88e3fb56a4efd68f052ca371bbcea26bf122c40311868860498004edcbd0df28bfb7e5fa35639ec06373f77ede0b0dfc80f4
|
data/lib/route_authorizer.rb
CHANGED
data/spec/authorizer_spec.rb
CHANGED
data/spec/permission_dsl_spec.rb
CHANGED
@@ -3,16 +3,12 @@ require 'spec_helper'
|
|
3
3
|
describe RouteAuthorizer::PermissionDSL do
|
4
4
|
|
5
5
|
let(:permission_class) { Class.new }
|
6
|
-
let(:permission) { permission_class.new
|
6
|
+
let(:permission) { permission_class.new }
|
7
7
|
|
8
8
|
before do
|
9
9
|
permission_class.include(RouteAuthorizer::PermissionDSL)
|
10
10
|
end
|
11
11
|
|
12
|
-
it 'includes permission module' do
|
13
|
-
expect(permission_class).to include RouteAuthorizer::Permission
|
14
|
-
end
|
15
|
-
|
16
12
|
it '.all_roles' do
|
17
13
|
expect(permission_class).to receive(:role).with(:default).and_yield
|
18
14
|
|
data/spec/permission_spec.rb
CHANGED
@@ -2,12 +2,15 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe RouteAuthorizer::Permission do
|
4
4
|
|
5
|
-
let(:permission_class) { Class.new }
|
5
|
+
let(:permission_class) { Class.new(RouteAuthorizer::Permission) }
|
6
6
|
let(:permission) { permission_class.new(@role) }
|
7
7
|
|
8
8
|
before do
|
9
9
|
@role = :admin
|
10
|
-
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'includes DSL' do
|
13
|
+
expect(permission_class).to include RouteAuthorizer::PermissionDSL
|
11
14
|
end
|
12
15
|
|
13
16
|
it 'returns no permission for no role' do
|
data/spec/spec_helper.rb
CHANGED