authorize 0.0.1
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.
- data/.gitignore +5 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +42 -0
- data/LICENSE +20 -0
- data/README +155 -0
- data/Rakefile +25 -0
- data/TODO.txt +9 -0
- data/authorize.gemspec +25 -0
- data/generators/authorize/USAGE +8 -0
- data/generators/authorize/authorize_generator.rb +7 -0
- data/generators/authorize/templates/migrate/create_authorizations.rb +26 -0
- data/install.rb +1 -0
- data/lib/authorize.rb +2 -0
- data/lib/authorize/action_controller.rb +59 -0
- data/lib/authorize/action_view.rb +4 -0
- data/lib/authorize/active_record.rb +37 -0
- data/lib/authorize/bitmask.rb +84 -0
- data/lib/authorize/exceptions.rb +30 -0
- data/lib/authorize/graph.rb +4 -0
- data/lib/authorize/graph/directed_acyclic_graph.rb +10 -0
- data/lib/authorize/graph/directed_acyclic_graph_reverse_traverser.rb +27 -0
- data/lib/authorize/graph/directed_acyclic_graph_traverser.rb +30 -0
- data/lib/authorize/graph/directed_graph.rb +27 -0
- data/lib/authorize/graph/edge.rb +58 -0
- data/lib/authorize/graph/factory.rb +39 -0
- data/lib/authorize/graph/fixtures.rb +33 -0
- data/lib/authorize/graph/graph.rb +55 -0
- data/lib/authorize/graph/traverser.rb +89 -0
- data/lib/authorize/graph/undirected_graph.rb +14 -0
- data/lib/authorize/graph/vertex.rb +53 -0
- data/lib/authorize/permission.rb +97 -0
- data/lib/authorize/redis.rb +2 -0
- data/lib/authorize/redis/array.rb +36 -0
- data/lib/authorize/redis/base.rb +165 -0
- data/lib/authorize/redis/connection_manager.rb +88 -0
- data/lib/authorize/redis/connection_specification.rb +16 -0
- data/lib/authorize/redis/factory.rb +64 -0
- data/lib/authorize/redis/fixtures.rb +22 -0
- data/lib/authorize/redis/hash.rb +34 -0
- data/lib/authorize/redis/model_reference.rb +21 -0
- data/lib/authorize/redis/model_set.rb +19 -0
- data/lib/authorize/redis/set.rb +42 -0
- data/lib/authorize/redis/string.rb +17 -0
- data/lib/authorize/resource.rb +4 -0
- data/lib/authorize/resource_pool.rb +87 -0
- data/lib/authorize/role.rb +115 -0
- data/lib/authorize/test_helper.rb +42 -0
- data/lib/authorize/trustee.rb +4 -0
- data/lib/authorize/version.rb +3 -0
- data/rails/init.rb +5 -0
- data/tasks/authorize_tasks.rake +4 -0
- data/test/Rakefile +7 -0
- data/test/app/controllers/application_controller.rb +5 -0
- data/test/app/controllers/thingy_controller.rb +11 -0
- data/test/app/controllers/widgets_controller.rb +2 -0
- data/test/app/models/public.rb +14 -0
- data/test/app/models/user.rb +8 -0
- data/test/app/models/widget.rb +7 -0
- data/test/config/boot.rb +109 -0
- data/test/config/database.yml +25 -0
- data/test/config/environment.rb +28 -0
- data/test/config/environments/development.rb +4 -0
- data/test/config/environments/test.rb +0 -0
- data/test/config/initializers/mask.rb +1 -0
- data/test/config/initializers/redis.rb +8 -0
- data/test/config/routes.rb +5 -0
- data/test/db/.gitignore +1 -0
- data/test/db/schema.rb +26 -0
- data/test/log/.gitignore +2 -0
- data/test/public/javascripts/application.js +2 -0
- data/test/public/javascripts/controls.js +963 -0
- data/test/public/javascripts/dragdrop.js +972 -0
- data/test/public/javascripts/effects.js +1120 -0
- data/test/public/javascripts/prototype.js +4225 -0
- data/test/script/about +3 -0
- data/test/script/console +3 -0
- data/test/script/dbconsole +3 -0
- data/test/script/destroy +3 -0
- data/test/script/generate +3 -0
- data/test/script/performance/benchmarker +3 -0
- data/test/script/performance/profiler +3 -0
- data/test/script/performance/request +3 -0
- data/test/script/plugin +3 -0
- data/test/script/process/inspector +3 -0
- data/test/script/process/reaper +3 -0
- data/test/script/process/spawner +3 -0
- data/test/script/runner +3 -0
- data/test/script/server +3 -0
- data/test/test/fixtures/authorize/role_graph.yml +11 -0
- data/test/test/fixtures/permissions.yml +27 -0
- data/test/test/fixtures/redis/redis.yml +8 -0
- data/test/test/fixtures/redis/role_graph.yml +29 -0
- data/test/test/fixtures/roles.yml +28 -0
- data/test/test/fixtures/users.yml +12 -0
- data/test/test/fixtures/widgets.yml +12 -0
- data/test/test/functional/controller_class_test.rb +36 -0
- data/test/test/functional/controller_test.rb +46 -0
- data/test/test/test_helper.rb +35 -0
- data/test/test/unit/bitmask_test.rb +112 -0
- data/test/test/unit/fixture_test.rb +59 -0
- data/test/test/unit/graph_directed_acyclic_graph_reverse_traverser_test.rb +43 -0
- data/test/test/unit/graph_directed_acyclic_graph_traverser_test.rb +57 -0
- data/test/test/unit/graph_directed_graph_test.rb +66 -0
- data/test/test/unit/graph_edge_test.rb +53 -0
- data/test/test/unit/graph_graph_test.rb +50 -0
- data/test/test/unit/graph_traverser_test.rb +43 -0
- data/test/test/unit/graph_vertex_test.rb +57 -0
- data/test/test/unit/permission_test.rb +123 -0
- data/test/test/unit/redis_array_test.rb +60 -0
- data/test/test/unit/redis_connection_manager_test.rb +54 -0
- data/test/test/unit/redis_factory_test.rb +85 -0
- data/test/test/unit/redis_fixture_test.rb +18 -0
- data/test/test/unit/redis_hash_test.rb +43 -0
- data/test/test/unit/redis_model_reference_test.rb +39 -0
- data/test/test/unit/redis_set_test.rb +68 -0
- data/test/test/unit/redis_string_test.rb +25 -0
- data/test/test/unit/redis_test.rb +121 -0
- data/test/test/unit/resource_pool_test.rb +93 -0
- data/test/test/unit/resource_test.rb +33 -0
- data/test/test/unit/role_test.rb +143 -0
- data/test/test/unit/trustee_test.rb +35 -0
- data/test/tmp/.gitignore +2 -0
- data/uninstall.rb +1 -0
- metadata +319 -0
@@ -0,0 +1,93 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class ResourcePoolTest < ActiveSupport::TestCase
|
4
|
+
|
5
|
+
def setup
|
6
|
+
@resources = Array.new(10){|i| "resource #{i}"}
|
7
|
+
@factory = lambda{@resources.pop}
|
8
|
+
end
|
9
|
+
|
10
|
+
test 'create' do
|
11
|
+
@factory.expects(:call).never
|
12
|
+
pool = Authorize::ResourcePool.new(5, @factory)
|
13
|
+
assert_equal 0, pool.size
|
14
|
+
assert_equal 5, pool.available
|
15
|
+
assert !pool.empty?
|
16
|
+
end
|
17
|
+
|
18
|
+
test 'checkout calls factory for inventory' do
|
19
|
+
@factory.expects(:call).once.returns(@resources[0])
|
20
|
+
pool = Authorize::ResourcePool.new(5, @factory)
|
21
|
+
assert_same @resources[0], pool.checkout
|
22
|
+
end
|
23
|
+
|
24
|
+
test 'checkout waits until one available' do
|
25
|
+
begin
|
26
|
+
@factory.expects(:call).once.returns(@resources[0])
|
27
|
+
pool = Authorize::ResourcePool.new(1, @factory)
|
28
|
+
pool.checkout # claim the only resource
|
29
|
+
t = Thread.new(pool) {|p| p.checkout}
|
30
|
+
t.run
|
31
|
+
assert_equal 'sleep', t.status
|
32
|
+
assert_equal 1, pool.num_waiting
|
33
|
+
ensure
|
34
|
+
t.exit
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
test 'checkouts return distinct resources' do
|
39
|
+
pool = Authorize::ResourcePool.new(5, @factory)
|
40
|
+
resources = []
|
41
|
+
5.times {resources << pool.checkout}
|
42
|
+
assert_equal 5, resources.uniq.size
|
43
|
+
end
|
44
|
+
|
45
|
+
test 'checkin releases previously checked out resource' do
|
46
|
+
pool = Authorize::ResourcePool.new(10, @factory)
|
47
|
+
res = pool.checkout
|
48
|
+
pool.checkin(res)
|
49
|
+
assert pool.include?(res)
|
50
|
+
assert_equal 10, pool.available
|
51
|
+
end
|
52
|
+
|
53
|
+
test 'checkin signals when one available' do
|
54
|
+
begin
|
55
|
+
@factory.expects(:call).once.returns(@resources[0])
|
56
|
+
pool = Authorize::ResourcePool.new(1, @factory)
|
57
|
+
res = pool.checkout # claim the only resource
|
58
|
+
t = Thread.new(pool) {|p| p.checkout}
|
59
|
+
t.run
|
60
|
+
assert_equal 'sleep', t.status
|
61
|
+
assert_equal 1, pool.num_waiting
|
62
|
+
pool.checkin(res)
|
63
|
+
t.join(2)
|
64
|
+
assert_equal false, t.status
|
65
|
+
ensure
|
66
|
+
t.exit
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
test 'expire removes resource from pool' do
|
71
|
+
pool = Authorize::ResourcePool.new(3, @factory)
|
72
|
+
resources = []
|
73
|
+
3.times {resources << pool.checkout}
|
74
|
+
marked_for_expiration = resources.first
|
75
|
+
not_marked_for_expiration = resources.last
|
76
|
+
3.times {pool.checkin(resources.pop)}
|
77
|
+
pool.expire {|obj| obj == marked_for_expiration}
|
78
|
+
assert !pool.include?(marked_for_expiration)
|
79
|
+
assert pool.include?(not_marked_for_expiration)
|
80
|
+
end
|
81
|
+
|
82
|
+
test 'freshen never removes resource from pool' do
|
83
|
+
pool = Authorize::ResourcePool.new(3, @factory)
|
84
|
+
resources = []
|
85
|
+
3.times {resources << pool.checkout}
|
86
|
+
marked = resources.first
|
87
|
+
not_marked = resources.last
|
88
|
+
3.times {pool.checkin(resources.pop)}
|
89
|
+
pool.freshen {|obj| obj == marked}
|
90
|
+
assert pool.include?(marked)
|
91
|
+
assert pool.include?(not_marked)
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
|
4
|
+
class ResourceTest < ActiveSupport::TestCase
|
5
|
+
fixtures :all
|
6
|
+
|
7
|
+
test 'has permissions' do
|
8
|
+
assert_equal Set[permissions(:a_read_foo)], widgets(:foo).permissions.to_set
|
9
|
+
end
|
10
|
+
|
11
|
+
test 'permitted scope' do
|
12
|
+
assert_equal Set[widgets(:foo), widgets(:bar)], Widget.permitted([roles(:a)]).to_set
|
13
|
+
assert_equal Set[widgets(:bar)], Widget.permitted([roles(:d)]).to_set
|
14
|
+
end
|
15
|
+
|
16
|
+
test 'permitted scope to do specified access mode' do
|
17
|
+
assert_equal Set[widgets(:foo)], Widget.permitted([roles(:a)], :read).to_set
|
18
|
+
end
|
19
|
+
|
20
|
+
test 'permitted scope with class permission' do
|
21
|
+
assert_equal Widget.all.to_set, Widget.permitted([roles(:c)]).to_set
|
22
|
+
end
|
23
|
+
|
24
|
+
test 'permitted scope with global permission' do
|
25
|
+
assert_equal Widget.all.to_set, Widget.permitted([roles(:administrator)]).to_set
|
26
|
+
end
|
27
|
+
|
28
|
+
test 'destroy permissions on destroy' do
|
29
|
+
assert_difference('Authorize::Permission.count', -1) do
|
30
|
+
widgets(:foo).destroy
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,143 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'authorize/graph/fixtures'
|
3
|
+
|
4
|
+
class RoleTest < ActiveSupport::TestCase
|
5
|
+
|
6
|
+
fixtures :all
|
7
|
+
|
8
|
+
def setup
|
9
|
+
Authorize::Redis::String.index.clear # Clear the cache
|
10
|
+
Authorize::Redis::Set.index.clear
|
11
|
+
Authorize::Redis::Hash.index.clear
|
12
|
+
Authorize::Graph::DirectedGraph.index.clear
|
13
|
+
Authorize::Graph::Vertex.index.clear
|
14
|
+
Authorize::Graph::Edge.index.clear
|
15
|
+
Authorize::Graph::Fixtures.create_fixtures
|
16
|
+
end
|
17
|
+
|
18
|
+
test 'new global' do
|
19
|
+
assert r = Authorize::Role.new(:name => 'Master of the Universe', :relation => 'MST')
|
20
|
+
assert r.valid?
|
21
|
+
end
|
22
|
+
|
23
|
+
test 'new' do
|
24
|
+
assert r = Authorize::Role.new(:name => 'friend of %s', :resource => users(:chris), :relation => 'FRN')
|
25
|
+
assert r.valid?
|
26
|
+
end
|
27
|
+
|
28
|
+
test 'create' do
|
29
|
+
Authorize::Graph::Graph.db.expects(:set).with(regexp_matches(/Authorize::Role::vertices::\d*::_/), nil).returns(true)
|
30
|
+
assert_difference 'Authorize::Role.count' do
|
31
|
+
r = Authorize::Role.create(:name => 'friend of %s', :resource => users(:chris), :relation => 'FRN')
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
test 'new identity' do
|
36
|
+
assert r = Authorize::Role.new(:resource => users(:alex))
|
37
|
+
assert r.valid?, r.errors.full_messages
|
38
|
+
end
|
39
|
+
|
40
|
+
test 'unique name in resource scope' do
|
41
|
+
assert r = Authorize::Role.new(:name => 'administrator')
|
42
|
+
assert !r.valid?
|
43
|
+
assert r.errors[:name]
|
44
|
+
end
|
45
|
+
|
46
|
+
test 'has permissions' do
|
47
|
+
assert_equal Set[permissions(:b_overlord)], roles(:administrator).permissions.to_set
|
48
|
+
end
|
49
|
+
|
50
|
+
test 'relation scope' do
|
51
|
+
assert_equal Set[roles(:e)], Authorize::Role.as('HSK').to_set
|
52
|
+
end
|
53
|
+
|
54
|
+
test 'may adds modes to existing permission' do
|
55
|
+
p = permissions(:e_delete_bar)
|
56
|
+
mask = p.mask + [:update]
|
57
|
+
assert_equal mask, roles(:e).may(:update, widgets(:bar))
|
58
|
+
assert p.reload.mask.include?(:update)
|
59
|
+
end
|
60
|
+
|
61
|
+
test 'may_not removes modes from existing permission' do
|
62
|
+
p = permissions(:e_delete_bar)
|
63
|
+
mask = p.mask - [:delete]
|
64
|
+
assert_equal mask , roles(:e).may_not(:delete, widgets(:bar))
|
65
|
+
assert !p.reload.mask.include?(:update)
|
66
|
+
end
|
67
|
+
|
68
|
+
test 'may inserts permission as required' do
|
69
|
+
assert_difference "Authorize::Permission.count", 1 do
|
70
|
+
assert_equal Set[:list, :update], roles(:e).may(:update, widgets(:foo))
|
71
|
+
end
|
72
|
+
assert !Authorize::Permission.over(widgets(:foo)).as([roles(:e)]).empty?
|
73
|
+
end
|
74
|
+
|
75
|
+
test 'may_not deletes permission as required' do
|
76
|
+
assert_difference "Authorize::Permission.count", -1 do
|
77
|
+
assert_equal Set[], roles(:e).may_not(:all, widgets(:bar))
|
78
|
+
end
|
79
|
+
assert Authorize::Permission.over(widgets(:bar)).as([roles(:e)]).empty?
|
80
|
+
end
|
81
|
+
|
82
|
+
test 'may_not does nothing as required' do
|
83
|
+
assert_no_difference "Authorize::Permission.count" do
|
84
|
+
assert_equal Set[], roles(:e).may_not(:all, widgets(:foo))
|
85
|
+
end
|
86
|
+
assert Authorize::Permission.over(widgets(:foo)).as([roles(:e)]).empty?
|
87
|
+
end
|
88
|
+
|
89
|
+
test 'may predicate' do
|
90
|
+
assert roles(:c).may?(:read, Widget)
|
91
|
+
assert !roles(:c).may?(:read, User)
|
92
|
+
assert roles(:user_chris).may?(:all, users(:chris))
|
93
|
+
end
|
94
|
+
|
95
|
+
test 'may_not predicate' do
|
96
|
+
assert roles(:c).may_not?(:read, User)
|
97
|
+
assert !roles(:c).may_not?(:read, Widget)
|
98
|
+
assert roles(:user_chris).may_not?(:all, users(:alex))
|
99
|
+
end
|
100
|
+
|
101
|
+
test 'stringify' do
|
102
|
+
assert_kind_of String, roles(:administrator).to_s
|
103
|
+
assert_kind_of String, roles(:c).to_s
|
104
|
+
assert_equal users(:chris).to_s, roles(:user_chris).to_s
|
105
|
+
end
|
106
|
+
|
107
|
+
test 'vertex' do
|
108
|
+
assert_kind_of Authorize::Graph::Vertex, v = roles(:user_chris).vertex
|
109
|
+
assert Authorize::Role.graph.vertices.include?(v)
|
110
|
+
end
|
111
|
+
|
112
|
+
test 'descendant roles' do
|
113
|
+
assert_equal Set[roles(:registered_users), roles(:public)], roles(:user_chris).descendants
|
114
|
+
end
|
115
|
+
|
116
|
+
test 'ancestor roles' do
|
117
|
+
assert_equal Set[roles(:user_pascale)], roles(:administrator).ancestors
|
118
|
+
end
|
119
|
+
|
120
|
+
test 'link' do
|
121
|
+
assert !roles(:user_chris).descendants.include?(roles(:administrator))
|
122
|
+
assert_kind_of Authorize::Graph::Edge, edge = roles(:user_chris).link(roles(:administrator))
|
123
|
+
assert roles(:user_chris).descendants.include?(roles(:administrator))
|
124
|
+
assert Authorize::Role.graph.edges.include?(edge)
|
125
|
+
end
|
126
|
+
|
127
|
+
test 'reuse existing edge on redundant link' do
|
128
|
+
Authorize::Graph::Edge.expects(:new).never
|
129
|
+
roles(:user_chris).link(roles(:registered_users))
|
130
|
+
end
|
131
|
+
|
132
|
+
test 'unlink' do
|
133
|
+
assert roles(:user_chris).descendants.include?(roles(:registered_users))
|
134
|
+
assert_kind_of Authorize::Graph::Edge, edge = roles(:user_chris).unlink(roles(:registered_users))
|
135
|
+
assert !roles(:user_chris).descendants.include?(roles(:registered_users))
|
136
|
+
assert !Authorize::Role.graph.edges.include?(edge)
|
137
|
+
end
|
138
|
+
|
139
|
+
test 'destroy' do
|
140
|
+
roles(:user_chris).vertex.expects(:destroy).returns(true)
|
141
|
+
roles(:user_chris).destroy
|
142
|
+
end
|
143
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class TrusteeTest < ActiveSupport::TestCase
|
4
|
+
fixtures :all
|
5
|
+
|
6
|
+
def setup
|
7
|
+
Authorize::Redis::String.index.clear # Clear the cache
|
8
|
+
Authorize::Redis::Set.index.clear
|
9
|
+
Authorize::Redis::Hash.index.clear
|
10
|
+
Authorize::Graph::Graph.index.clear
|
11
|
+
Authorize::Graph::Vertex.index.clear
|
12
|
+
Authorize::Graph::Edge.index.clear
|
13
|
+
end
|
14
|
+
|
15
|
+
test 'has primary role' do
|
16
|
+
assert_equal roles(:user_chris), users(:chris).role
|
17
|
+
end
|
18
|
+
|
19
|
+
test 'create primary role' do
|
20
|
+
assert_difference "Authorize::Role.count" do
|
21
|
+
assert_difference "Authorize::Role.graph.vertices.count" do
|
22
|
+
users(:alex).create_role
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
test 'primary role created after create' do
|
28
|
+
assert_difference "Authorize::Role.count" do
|
29
|
+
assert_difference "Authorize::Role.graph.vertices.count" do
|
30
|
+
assert u = User.create, u.errors.full_messages
|
31
|
+
assert u.role
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/test/tmp/.gitignore
ADDED
data/uninstall.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# Uninstall hook code here
|
metadata
ADDED
@@ -0,0 +1,319 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: authorize
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Chris Hapgood
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-04-20 00:00:00 -04:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: mocha
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 25
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
- 9
|
33
|
+
version: "0.9"
|
34
|
+
type: :development
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: sqlite3
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ~>
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 9
|
45
|
+
segments:
|
46
|
+
- 1
|
47
|
+
- 3
|
48
|
+
version: "1.3"
|
49
|
+
type: :development
|
50
|
+
version_requirements: *id002
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
name: rails
|
53
|
+
prerelease: false
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ~>
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 5
|
60
|
+
segments:
|
61
|
+
- 2
|
62
|
+
- 3
|
63
|
+
version: "2.3"
|
64
|
+
type: :development
|
65
|
+
version_requirements: *id003
|
66
|
+
- !ruby/object:Gem::Dependency
|
67
|
+
name: redis
|
68
|
+
prerelease: false
|
69
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
71
|
+
requirements:
|
72
|
+
- - ~>
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
hash: 1
|
75
|
+
segments:
|
76
|
+
- 2
|
77
|
+
- 1
|
78
|
+
version: "2.1"
|
79
|
+
type: :runtime
|
80
|
+
version_requirements: *id004
|
81
|
+
description: Authorize implements a full-blown Role-based Access Control (RBAC) system for Ruby on Rails
|
82
|
+
email:
|
83
|
+
- cch1@hapgoods.com
|
84
|
+
executables: []
|
85
|
+
|
86
|
+
extensions: []
|
87
|
+
|
88
|
+
extra_rdoc_files: []
|
89
|
+
|
90
|
+
files:
|
91
|
+
- .gitignore
|
92
|
+
- Gemfile
|
93
|
+
- Gemfile.lock
|
94
|
+
- LICENSE
|
95
|
+
- README
|
96
|
+
- Rakefile
|
97
|
+
- TODO.txt
|
98
|
+
- authorize.gemspec
|
99
|
+
- generators/authorize/USAGE
|
100
|
+
- generators/authorize/authorize_generator.rb
|
101
|
+
- generators/authorize/templates/migrate/create_authorizations.rb
|
102
|
+
- install.rb
|
103
|
+
- lib/authorize.rb
|
104
|
+
- lib/authorize/action_controller.rb
|
105
|
+
- lib/authorize/action_view.rb
|
106
|
+
- lib/authorize/active_record.rb
|
107
|
+
- lib/authorize/bitmask.rb
|
108
|
+
- lib/authorize/exceptions.rb
|
109
|
+
- lib/authorize/graph.rb
|
110
|
+
- lib/authorize/graph/directed_acyclic_graph.rb
|
111
|
+
- lib/authorize/graph/directed_acyclic_graph_reverse_traverser.rb
|
112
|
+
- lib/authorize/graph/directed_acyclic_graph_traverser.rb
|
113
|
+
- lib/authorize/graph/directed_graph.rb
|
114
|
+
- lib/authorize/graph/edge.rb
|
115
|
+
- lib/authorize/graph/factory.rb
|
116
|
+
- lib/authorize/graph/fixtures.rb
|
117
|
+
- lib/authorize/graph/graph.rb
|
118
|
+
- lib/authorize/graph/traverser.rb
|
119
|
+
- lib/authorize/graph/undirected_graph.rb
|
120
|
+
- lib/authorize/graph/vertex.rb
|
121
|
+
- lib/authorize/permission.rb
|
122
|
+
- lib/authorize/redis.rb
|
123
|
+
- lib/authorize/redis/array.rb
|
124
|
+
- lib/authorize/redis/base.rb
|
125
|
+
- lib/authorize/redis/connection_manager.rb
|
126
|
+
- lib/authorize/redis/connection_specification.rb
|
127
|
+
- lib/authorize/redis/factory.rb
|
128
|
+
- lib/authorize/redis/fixtures.rb
|
129
|
+
- lib/authorize/redis/hash.rb
|
130
|
+
- lib/authorize/redis/model_reference.rb
|
131
|
+
- lib/authorize/redis/model_set.rb
|
132
|
+
- lib/authorize/redis/set.rb
|
133
|
+
- lib/authorize/redis/string.rb
|
134
|
+
- lib/authorize/resource.rb
|
135
|
+
- lib/authorize/resource_pool.rb
|
136
|
+
- lib/authorize/role.rb
|
137
|
+
- lib/authorize/test_helper.rb
|
138
|
+
- lib/authorize/trustee.rb
|
139
|
+
- lib/authorize/version.rb
|
140
|
+
- rails/init.rb
|
141
|
+
- tasks/authorize_tasks.rake
|
142
|
+
- test/Rakefile
|
143
|
+
- test/app/controllers/application_controller.rb
|
144
|
+
- test/app/controllers/thingy_controller.rb
|
145
|
+
- test/app/controllers/widgets_controller.rb
|
146
|
+
- test/app/models/public.rb
|
147
|
+
- test/app/models/user.rb
|
148
|
+
- test/app/models/widget.rb
|
149
|
+
- test/config/boot.rb
|
150
|
+
- test/config/database.yml
|
151
|
+
- test/config/environment.rb
|
152
|
+
- test/config/environments/development.rb
|
153
|
+
- test/config/environments/test.rb
|
154
|
+
- test/config/initializers/mask.rb
|
155
|
+
- test/config/initializers/redis.rb
|
156
|
+
- test/config/routes.rb
|
157
|
+
- test/db/.gitignore
|
158
|
+
- test/db/schema.rb
|
159
|
+
- test/log/.gitignore
|
160
|
+
- test/public/javascripts/application.js
|
161
|
+
- test/public/javascripts/controls.js
|
162
|
+
- test/public/javascripts/dragdrop.js
|
163
|
+
- test/public/javascripts/effects.js
|
164
|
+
- test/public/javascripts/prototype.js
|
165
|
+
- test/script/about
|
166
|
+
- test/script/console
|
167
|
+
- test/script/dbconsole
|
168
|
+
- test/script/destroy
|
169
|
+
- test/script/generate
|
170
|
+
- test/script/performance/benchmarker
|
171
|
+
- test/script/performance/profiler
|
172
|
+
- test/script/performance/request
|
173
|
+
- test/script/plugin
|
174
|
+
- test/script/process/inspector
|
175
|
+
- test/script/process/reaper
|
176
|
+
- test/script/process/spawner
|
177
|
+
- test/script/runner
|
178
|
+
- test/script/server
|
179
|
+
- test/test/fixtures/authorize/role_graph.yml
|
180
|
+
- test/test/fixtures/permissions.yml
|
181
|
+
- test/test/fixtures/redis/redis.yml
|
182
|
+
- test/test/fixtures/redis/role_graph.yml
|
183
|
+
- test/test/fixtures/roles.yml
|
184
|
+
- test/test/fixtures/users.yml
|
185
|
+
- test/test/fixtures/widgets.yml
|
186
|
+
- test/test/functional/controller_class_test.rb
|
187
|
+
- test/test/functional/controller_test.rb
|
188
|
+
- test/test/test_helper.rb
|
189
|
+
- test/test/unit/bitmask_test.rb
|
190
|
+
- test/test/unit/fixture_test.rb
|
191
|
+
- test/test/unit/graph_directed_acyclic_graph_reverse_traverser_test.rb
|
192
|
+
- test/test/unit/graph_directed_acyclic_graph_traverser_test.rb
|
193
|
+
- test/test/unit/graph_directed_graph_test.rb
|
194
|
+
- test/test/unit/graph_edge_test.rb
|
195
|
+
- test/test/unit/graph_graph_test.rb
|
196
|
+
- test/test/unit/graph_traverser_test.rb
|
197
|
+
- test/test/unit/graph_vertex_test.rb
|
198
|
+
- test/test/unit/permission_test.rb
|
199
|
+
- test/test/unit/redis_array_test.rb
|
200
|
+
- test/test/unit/redis_connection_manager_test.rb
|
201
|
+
- test/test/unit/redis_factory_test.rb
|
202
|
+
- test/test/unit/redis_fixture_test.rb
|
203
|
+
- test/test/unit/redis_hash_test.rb
|
204
|
+
- test/test/unit/redis_model_reference_test.rb
|
205
|
+
- test/test/unit/redis_set_test.rb
|
206
|
+
- test/test/unit/redis_string_test.rb
|
207
|
+
- test/test/unit/redis_test.rb
|
208
|
+
- test/test/unit/resource_pool_test.rb
|
209
|
+
- test/test/unit/resource_test.rb
|
210
|
+
- test/test/unit/role_test.rb
|
211
|
+
- test/test/unit/trustee_test.rb
|
212
|
+
- test/tmp/.gitignore
|
213
|
+
- uninstall.rb
|
214
|
+
has_rdoc: true
|
215
|
+
homepage: ""
|
216
|
+
licenses: []
|
217
|
+
|
218
|
+
post_install_message:
|
219
|
+
rdoc_options: []
|
220
|
+
|
221
|
+
require_paths:
|
222
|
+
- lib
|
223
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
224
|
+
none: false
|
225
|
+
requirements:
|
226
|
+
- - ">="
|
227
|
+
- !ruby/object:Gem::Version
|
228
|
+
hash: 3
|
229
|
+
segments:
|
230
|
+
- 0
|
231
|
+
version: "0"
|
232
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
233
|
+
none: false
|
234
|
+
requirements:
|
235
|
+
- - ">="
|
236
|
+
- !ruby/object:Gem::Version
|
237
|
+
hash: 3
|
238
|
+
segments:
|
239
|
+
- 0
|
240
|
+
version: "0"
|
241
|
+
requirements: []
|
242
|
+
|
243
|
+
rubyforge_project: authorize
|
244
|
+
rubygems_version: 1.3.7
|
245
|
+
signing_key:
|
246
|
+
specification_version: 3
|
247
|
+
summary: A fast and flexible RBAC for Rails
|
248
|
+
test_files:
|
249
|
+
- test/Rakefile
|
250
|
+
- test/app/controllers/application_controller.rb
|
251
|
+
- test/app/controllers/thingy_controller.rb
|
252
|
+
- test/app/controllers/widgets_controller.rb
|
253
|
+
- test/app/models/public.rb
|
254
|
+
- test/app/models/user.rb
|
255
|
+
- test/app/models/widget.rb
|
256
|
+
- test/config/boot.rb
|
257
|
+
- test/config/database.yml
|
258
|
+
- test/config/environment.rb
|
259
|
+
- test/config/environments/development.rb
|
260
|
+
- test/config/environments/test.rb
|
261
|
+
- test/config/initializers/mask.rb
|
262
|
+
- test/config/initializers/redis.rb
|
263
|
+
- test/config/routes.rb
|
264
|
+
- test/db/.gitignore
|
265
|
+
- test/db/schema.rb
|
266
|
+
- test/log/.gitignore
|
267
|
+
- test/public/javascripts/application.js
|
268
|
+
- test/public/javascripts/controls.js
|
269
|
+
- test/public/javascripts/dragdrop.js
|
270
|
+
- test/public/javascripts/effects.js
|
271
|
+
- test/public/javascripts/prototype.js
|
272
|
+
- test/script/about
|
273
|
+
- test/script/console
|
274
|
+
- test/script/dbconsole
|
275
|
+
- test/script/destroy
|
276
|
+
- test/script/generate
|
277
|
+
- test/script/performance/benchmarker
|
278
|
+
- test/script/performance/profiler
|
279
|
+
- test/script/performance/request
|
280
|
+
- test/script/plugin
|
281
|
+
- test/script/process/inspector
|
282
|
+
- test/script/process/reaper
|
283
|
+
- test/script/process/spawner
|
284
|
+
- test/script/runner
|
285
|
+
- test/script/server
|
286
|
+
- test/test/fixtures/authorize/role_graph.yml
|
287
|
+
- test/test/fixtures/permissions.yml
|
288
|
+
- test/test/fixtures/redis/redis.yml
|
289
|
+
- test/test/fixtures/redis/role_graph.yml
|
290
|
+
- test/test/fixtures/roles.yml
|
291
|
+
- test/test/fixtures/users.yml
|
292
|
+
- test/test/fixtures/widgets.yml
|
293
|
+
- test/test/functional/controller_class_test.rb
|
294
|
+
- test/test/functional/controller_test.rb
|
295
|
+
- test/test/test_helper.rb
|
296
|
+
- test/test/unit/bitmask_test.rb
|
297
|
+
- test/test/unit/fixture_test.rb
|
298
|
+
- test/test/unit/graph_directed_acyclic_graph_reverse_traverser_test.rb
|
299
|
+
- test/test/unit/graph_directed_acyclic_graph_traverser_test.rb
|
300
|
+
- test/test/unit/graph_directed_graph_test.rb
|
301
|
+
- test/test/unit/graph_edge_test.rb
|
302
|
+
- test/test/unit/graph_graph_test.rb
|
303
|
+
- test/test/unit/graph_traverser_test.rb
|
304
|
+
- test/test/unit/graph_vertex_test.rb
|
305
|
+
- test/test/unit/permission_test.rb
|
306
|
+
- test/test/unit/redis_array_test.rb
|
307
|
+
- test/test/unit/redis_connection_manager_test.rb
|
308
|
+
- test/test/unit/redis_factory_test.rb
|
309
|
+
- test/test/unit/redis_fixture_test.rb
|
310
|
+
- test/test/unit/redis_hash_test.rb
|
311
|
+
- test/test/unit/redis_model_reference_test.rb
|
312
|
+
- test/test/unit/redis_set_test.rb
|
313
|
+
- test/test/unit/redis_string_test.rb
|
314
|
+
- test/test/unit/redis_test.rb
|
315
|
+
- test/test/unit/resource_pool_test.rb
|
316
|
+
- test/test/unit/resource_test.rb
|
317
|
+
- test/test/unit/role_test.rb
|
318
|
+
- test/test/unit/trustee_test.rb
|
319
|
+
- test/tmp/.gitignore
|