cbac 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. data/Manifest +70 -74
  2. data/README.rdoc +51 -51
  3. data/Rakefile +39 -39
  4. data/cbac.gemspec +30 -31
  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 -135
  11. data/lib/cbac/cbac_pristine/pristine_file.rb +173 -170
  12. data/lib/cbac/cbac_pristine/pristine_permission.rb +205 -194
  13. data/lib/cbac/cbac_pristine/pristine_role.rb +41 -41
  14. data/lib/cbac/config.rb +9 -9
  15. data/lib/cbac/context_role.rb +27 -27
  16. data/lib/cbac/generic_role.rb +5 -5
  17. data/lib/cbac/known_permission.rb +14 -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 -31
  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 -0
  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/fixtures/cbac_generic_roles.yml +9 -9
  60. data/test/fixtures/cbac_memberships.yml +8 -8
  61. data/test/fixtures/cbac_permissions.yml +14 -14
  62. data/test/fixtures/cbac_privilege_set.yml +18 -18
  63. data/test/test_cbac_actions.rb +71 -71
  64. data/test/test_cbac_authorize_context_roles.rb +39 -39
  65. data/test/test_cbac_authorize_generic_roles.rb +36 -36
  66. data/test/test_cbac_context_role.rb +50 -50
  67. data/test/test_cbac_privilege.rb +151 -151
  68. data/test/test_cbac_privilege_set.rb +50 -50
  69. data/test/test_helper.rb +28 -28
  70. metadata +14 -15
  71. data/nbproject/private/private.properties +0 -3
  72. data/nbproject/private/private.xml +0 -4
  73. data/nbproject/private/rake-d.txt +0 -0
  74. data/nbproject/project.properties +0 -9
  75. data/nbproject/project.xml +0 -16
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cbac
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 3
5
+ prerelease:
5
6
  segments:
6
7
  - 0
7
8
  - 6
8
- - 1
9
- version: 0.6.1
9
+ - 2
10
+ version: 0.6.2
10
11
  platform: ruby
11
12
  authors:
12
13
  - Bert Meerman
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2011-02-08 00:00:00 +01:00
18
+ date: 2011-03-02 00:00:00 +01:00
18
19
  default_executable:
19
20
  dependencies: []
20
21
 
@@ -72,6 +73,7 @@ files:
72
73
  - Manifest
73
74
  - README.rdoc
74
75
  - Rakefile
76
+ - cbac.gemspec
75
77
  - config/cbac/context_roles.rb
76
78
  - config/cbac/privileges.rb
77
79
  - context_roles.rb
@@ -117,11 +119,7 @@ files:
117
119
  - lib/generators/cbac/copy_files/views/permissions/_update_generic_role.html.erb
118
120
  - lib/generators/cbac/copy_files/views/permissions/index.html.erb
119
121
  - lib/generators/cbac/copy_files/views/upgrade/index.html.erb
120
- - nbproject/private/private.properties
121
- - nbproject/private/private.xml
122
- - nbproject/private/rake-d.txt
123
- - nbproject/project.properties
124
- - nbproject/project.xml
122
+ - migrations/20110211105533_add_pristine_files_to_cbac_upgrade_path.rb
125
123
  - privileges.rb
126
124
  - rails/init.rb
127
125
  - spec/cbac_pristine_file_spec.rb
@@ -143,7 +141,6 @@ files:
143
141
  - test/test_cbac_privilege.rb
144
142
  - test/test_cbac_privilege_set.rb
145
143
  - test/test_helper.rb
146
- - cbac.gemspec
147
144
  has_rdoc: true
148
145
  homepage: http://cbac.rubyforge.org
149
146
  licenses: []
@@ -163,6 +160,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
163
160
  requirements:
164
161
  - - ">="
165
162
  - !ruby/object:Gem::Version
163
+ hash: 3
166
164
  segments:
167
165
  - 0
168
166
  version: "0"
@@ -171,6 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
169
  requirements:
172
170
  - - ">="
173
171
  - !ruby/object:Gem::Version
172
+ hash: 11
174
173
  segments:
175
174
  - 1
176
175
  - 2
@@ -178,15 +177,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
177
  requirements: []
179
178
 
180
179
  rubyforge_project: cbac
181
- rubygems_version: 1.3.7
180
+ rubygems_version: 1.5.2
182
181
  signing_key:
183
182
  specification_version: 3
184
183
  summary: CBAC - Simple authorization system for Rails applications.
185
184
  test_files:
186
- - test/test_cbac_actions.rb
187
- - test/test_cbac_authorize_context_roles.rb
188
- - test/test_cbac_authorize_generic_roles.rb
189
185
  - test/test_cbac_context_role.rb
186
+ - test/test_cbac_authorize_context_roles.rb
187
+ - test/test_cbac_actions.rb
188
+ - test/test_helper.rb
190
189
  - test/test_cbac_privilege.rb
190
+ - test/test_cbac_authorize_generic_roles.rb
191
191
  - test/test_cbac_privilege_set.rb
192
- - test/test_helper.rb
@@ -1,3 +0,0 @@
1
- file.reference.CBAC-generators=C:\\Users\\bert\\Documents\\Projects\\CBAC\\CBAC\\generators
2
- file.reference.CBAC-lib=C:\\Users\\bert\\Documents\\Projects\\CBAC\\CBAC\\lib
3
- file.reference.CBAC-test=C:\\Users\\bert\\Documents\\Projects\\CBAC\\CBAC\\test
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project-private xmlns="http://www.netbeans.org/ns/project-private/1">
3
- <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
4
- </project-private>
File without changes
@@ -1,9 +0,0 @@
1
- file.reference.CBAC-generators=generators
2
- file.reference.CBAC-lib=lib
3
- file.reference.CBAC-test=test
4
- lib.dir=${file.reference.CBAC-lib}
5
- main.file=
6
- platform.active=Ruby
7
- source.encoding=UTF-8
8
- src.dir=${file.reference.CBAC-generators}
9
- test.src.dir=${file.reference.CBAC-test}
@@ -1,16 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project xmlns="http://www.netbeans.org/ns/project/1">
3
- <type>org.netbeans.modules.ruby.rubyproject</type>
4
- <configuration>
5
- <data xmlns="http://www.netbeans.org/ns/ruby-project/1">
6
- <name>cbac</name>
7
- <source-roots>
8
- <root id="src.dir"/>
9
- <root id="lib.dir"/>
10
- </source-roots>
11
- <test-roots>
12
- <root id="test.src.dir"/>
13
- </test-roots>
14
- </data>
15
- </configuration>
16
- </project>