cbac 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/Manifest +71 -70
  2. data/README.rdoc +51 -51
  3. data/Rakefile +39 -39
  4. data/cbac.gemspec +30 -30
  5. data/config/cbac/context_roles.rb +21 -21
  6. data/config/cbac/privileges.rb +50 -50
  7. data/context_roles.rb +21 -21
  8. data/init.rb +3 -3
  9. data/lib/cbac.rb +132 -132
  10. data/lib/cbac/cbac_pristine/pristine.rb +138 -138
  11. data/lib/cbac/cbac_pristine/pristine_file.rb +179 -173
  12. data/lib/cbac/cbac_pristine/pristine_permission.rb +205 -205
  13. data/lib/cbac/cbac_pristine/pristine_role.rb +43 -42
  14. data/lib/cbac/config.rb +9 -9
  15. data/lib/cbac/context_role.rb +27 -27
  16. data/lib/cbac/generic_role.rb +7 -6
  17. data/lib/cbac/known_permission.rb +15 -14
  18. data/lib/cbac/membership.rb +3 -3
  19. data/lib/cbac/permission.rb +5 -5
  20. data/lib/cbac/privilege.rb +117 -117
  21. data/lib/cbac/privilege_new_api.rb +56 -56
  22. data/lib/cbac/privilege_set.rb +29 -29
  23. data/lib/cbac/privilege_set_record.rb +6 -6
  24. data/lib/cbac/setup.rb +37 -37
  25. data/lib/generators/cbac/USAGE +33 -33
  26. data/lib/generators/cbac/cbac_generator.rb +75 -75
  27. data/lib/generators/cbac/copy_files/config/cbac.pristine +2 -2
  28. data/lib/generators/cbac/copy_files/config/context_roles.rb +17 -17
  29. data/lib/generators/cbac/copy_files/config/privileges.rb +25 -25
  30. data/lib/generators/cbac/copy_files/controllers/generic_roles_controller.rb +30 -30
  31. data/lib/generators/cbac/copy_files/controllers/memberships_controller.rb +22 -22
  32. data/lib/generators/cbac/copy_files/controllers/permissions_controller.rb +61 -61
  33. data/lib/generators/cbac/copy_files/controllers/upgrade_controller.rb +23 -23
  34. data/lib/generators/cbac/copy_files/fixtures/cbac_generic_roles.yml +9 -9
  35. data/lib/generators/cbac/copy_files/fixtures/cbac_memberships.yml +8 -8
  36. data/lib/generators/cbac/copy_files/fixtures/cbac_permissions.yml +8 -8
  37. data/lib/generators/cbac/copy_files/initializers/cbac_config.rb +4 -4
  38. data/lib/generators/cbac/copy_files/migrate/create_cbac_from_scratch.rb +59 -59
  39. data/lib/generators/cbac/copy_files/migrate/create_cbac_upgrade_path.rb +40 -40
  40. data/lib/generators/cbac/copy_files/stylesheets/cbac.css +65 -65
  41. data/lib/generators/cbac/copy_files/tasks/cbac.rake +345 -345
  42. data/lib/generators/cbac/copy_files/views/generic_roles/index.html.erb +58 -58
  43. data/lib/generators/cbac/copy_files/views/layouts/cbac.html.erb +18 -18
  44. data/lib/generators/cbac/copy_files/views/memberships/_update.html.erb +11 -11
  45. data/lib/generators/cbac/copy_files/views/memberships/index.html.erb +23 -23
  46. data/lib/generators/cbac/copy_files/views/permissions/_update_context_role.html.erb +11 -11
  47. data/lib/generators/cbac/copy_files/views/permissions/_update_generic_role.html.erb +11 -11
  48. data/lib/generators/cbac/copy_files/views/permissions/index.html.erb +39 -39
  49. data/lib/generators/cbac/copy_files/views/upgrade/index.html.erb +31 -31
  50. data/migrations/20110211105533_add_pristine_files_to_cbac_upgrade_path.rb +16 -16
  51. data/privileges.rb +50 -50
  52. data/spec/cbac_pristine_file_spec.rb +329 -329
  53. data/spec/cbac_pristine_permission_spec.rb +358 -358
  54. data/spec/cbac_pristine_role_spec.rb +85 -85
  55. data/spec/rcov.opts +1 -1
  56. data/spec/spec.opts +4 -4
  57. data/spec/spec_helper.rb +11 -11
  58. data/tasks/cbac.rake +345 -345
  59. data/test/db/test.sqlite3 +0 -0
  60. data/test/fixtures/cbac_generic_roles.yml +9 -9
  61. data/test/fixtures/cbac_memberships.yml +8 -8
  62. data/test/fixtures/cbac_permissions.yml +14 -14
  63. data/test/fixtures/cbac_privilege_set.yml +18 -18
  64. data/test/test_cbac_actions.rb +71 -71
  65. data/test/test_cbac_authorize_context_roles.rb +39 -39
  66. data/test/test_cbac_authorize_generic_roles.rb +36 -36
  67. data/test/test_cbac_context_role.rb +50 -50
  68. data/test/test_cbac_privilege.rb +151 -151
  69. data/test/test_cbac_privilege_set.rb +50 -50
  70. data/test/test_helper.rb +28 -28
  71. metadata +33 -49
metadata CHANGED
@@ -1,31 +1,24 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: cbac
3
- version: !ruby/object:Gem::Version
4
- hash: 3
5
- prerelease:
6
- segments:
7
- - 0
8
- - 6
9
- - 2
10
- version: 0.6.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.6.3
5
+ prerelease: !!null
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Bert Meerman
14
- autorequire:
9
+ autorequire: !!null
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-03-02 00:00:00 +01:00
19
- default_executable:
12
+ date: 2011-04-21 00:00:00.000000000 +02:00
13
+ default_executable: !!null
20
14
  dependencies: []
21
-
22
- description: Simple authorization system for Rails applications. Allows you to develop applications with a mixed role based authorization and a context based authorization model. Does not supply authentication.
15
+ description: Simple authorization system for Rails applications. Allows you to develop
16
+ applications with a mixed role based authorization and a context based authorization
17
+ model. Does not supply authentication.
23
18
  email: bertm@rubyforge.org
24
19
  executables: []
25
-
26
20
  extensions: []
27
-
28
- extra_rdoc_files:
21
+ extra_rdoc_files:
29
22
  - README.rdoc
30
23
  - lib/cbac.rb
31
24
  - lib/cbac/cbac_pristine/pristine.rb
@@ -69,7 +62,7 @@ extra_rdoc_files:
69
62
  - lib/generators/cbac/copy_files/views/permissions/index.html.erb
70
63
  - lib/generators/cbac/copy_files/views/upgrade/index.html.erb
71
64
  - tasks/cbac.rake
72
- files:
65
+ files:
73
66
  - Manifest
74
67
  - README.rdoc
75
68
  - Rakefile
@@ -144,48 +137,39 @@ files:
144
137
  has_rdoc: true
145
138
  homepage: http://cbac.rubyforge.org
146
139
  licenses: []
147
-
148
- post_install_message:
149
- rdoc_options:
140
+ post_install_message: !!null
141
+ rdoc_options:
150
142
  - --line-numbers
151
143
  - --inline-source
152
144
  - --title
153
145
  - Cbac
154
146
  - --main
155
147
  - README.rdoc
156
- require_paths:
148
+ require_paths:
157
149
  - lib
158
- required_ruby_version: !ruby/object:Gem::Requirement
150
+ required_ruby_version: !ruby/object:Gem::Requirement
159
151
  none: false
160
- requirements:
161
- - - ">="
162
- - !ruby/object:Gem::Version
163
- hash: 3
164
- segments:
165
- - 0
166
- version: "0"
167
- required_rubygems_version: !ruby/object:Gem::Requirement
152
+ requirements:
153
+ - - ! '>='
154
+ - !ruby/object:Gem::Version
155
+ version: '0'
156
+ required_rubygems_version: !ruby/object:Gem::Requirement
168
157
  none: false
169
- requirements:
170
- - - ">="
171
- - !ruby/object:Gem::Version
172
- hash: 11
173
- segments:
174
- - 1
175
- - 2
176
- version: "1.2"
158
+ requirements:
159
+ - - ! '>='
160
+ - !ruby/object:Gem::Version
161
+ version: '1.2'
177
162
  requirements: []
178
-
179
163
  rubyforge_project: cbac
180
- rubygems_version: 1.5.2
181
- signing_key:
164
+ rubygems_version: 1.5.0
165
+ signing_key: !!null
182
166
  specification_version: 3
183
167
  summary: CBAC - Simple authorization system for Rails applications.
184
- test_files:
185
- - test/test_cbac_context_role.rb
186
- - test/test_cbac_authorize_context_roles.rb
168
+ test_files:
187
169
  - test/test_cbac_actions.rb
188
- - test/test_helper.rb
189
- - test/test_cbac_privilege.rb
170
+ - test/test_cbac_authorize_context_roles.rb
190
171
  - test/test_cbac_authorize_generic_roles.rb
172
+ - test/test_cbac_context_role.rb
173
+ - test/test_cbac_privilege.rb
191
174
  - test/test_cbac_privilege_set.rb
175
+ - test/test_helper.rb