acl9 0.12.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +21 -7
  3. data/.travis.yml +19 -0
  4. data/Appraisals +8 -0
  5. data/CONTRIBUTING.md +58 -0
  6. data/Gemfile +2 -0
  7. data/Gemfile.lock +88 -32
  8. data/LICENSE +9 -0
  9. data/README.md +156 -0
  10. data/Rakefile +6 -3
  11. data/acl9.gemspec +10 -13
  12. data/gemfiles/rails_4.0.gemfile +8 -0
  13. data/gemfiles/rails_4.1.gemfile +8 -0
  14. data/lib/acl9/model_extensions/for_subject.rb +5 -1
  15. data/lib/acl9/model_extensions.rb +3 -24
  16. data/lib/acl9/version.rb +1 -1
  17. data/lib/acl9.rb +1 -1
  18. data/test/controller_extensions/actions_test.rb +167 -0
  19. data/test/controller_extensions/anon_test.rb +39 -0
  20. data/test/controller_extensions/base.rb +96 -0
  21. data/test/controller_extensions/basics_test.rb +44 -0
  22. data/test/controller_extensions/conditions_test.rb +48 -0
  23. data/test/controller_extensions/method_test.rb +50 -0
  24. data/test/controller_extensions/multi_match_test.rb +142 -0
  25. data/test/controller_extensions/multiple_role_arguments_test.rb +135 -0
  26. data/test/controller_extensions/prepositions_test.rb +99 -0
  27. data/test/controller_extensions/pseudo_role_test.rb +26 -0
  28. data/test/controller_extensions/role_test.rb +75 -0
  29. data/test/controllers/acl_action_override_test.rb +24 -0
  30. data/test/controllers/acl_arguments_test.rb +5 -0
  31. data/test/controllers/acl_block_test.rb +5 -0
  32. data/test/controllers/acl_boolean_method_test.rb +5 -0
  33. data/test/controllers/acl_helper_method_test.rb +26 -0
  34. data/test/controllers/acl_ivars_test.rb +15 -0
  35. data/test/controllers/acl_method2_test.rb +6 -0
  36. data/test/controllers/acl_method_test.rb +6 -0
  37. data/test/controllers/acl_object_hash_test.rb +18 -0
  38. data/test/controllers/acl_query_method_named_test.rb +9 -0
  39. data/test/controllers/acl_query_method_test.rb +9 -0
  40. data/test/controllers/acl_query_method_with_lambda_test.rb +9 -0
  41. data/test/controllers/acl_query_mixin.rb +51 -0
  42. data/test/controllers/acl_subject_method_test.rb +15 -0
  43. data/test/controllers/arguments_checking_test.rb +43 -0
  44. data/test/dummy/app/controllers/acl_action_override.rb +15 -0
  45. data/test/dummy/app/controllers/acl_arguments.rb +10 -0
  46. data/test/dummy/app/controllers/acl_block.rb +6 -0
  47. data/test/dummy/app/controllers/acl_boolean_method.rb +23 -0
  48. data/test/dummy/app/controllers/acl_helper_method.rb +11 -0
  49. data/test/dummy/app/controllers/acl_ivars.rb +17 -0
  50. data/test/dummy/app/controllers/acl_method.rb +6 -0
  51. data/test/dummy/app/controllers/acl_method2.rb +6 -0
  52. data/test/dummy/app/controllers/acl_objects_hash.rb +10 -0
  53. data/test/dummy/app/controllers/acl_query_method.rb +9 -0
  54. data/test/dummy/app/controllers/acl_query_method_named.rb +13 -0
  55. data/test/dummy/app/controllers/acl_query_method_with_lambda.rb +9 -0
  56. data/test/dummy/app/controllers/acl_subject_method.rb +16 -0
  57. data/test/dummy/app/controllers/application_controller.rb +7 -0
  58. data/test/dummy/app/controllers/empty_controller.rb +5 -0
  59. data/test/dummy/app/helpers/application_helper.rb +2 -0
  60. data/test/dummy/app/helpers/some_helper.rb +8 -0
  61. data/test/dummy/app/models/.keep +0 -0
  62. data/test/dummy/app/models/access.rb +3 -0
  63. data/test/dummy/app/models/account.rb +3 -0
  64. data/test/dummy/app/models/bar.rb +3 -0
  65. data/test/dummy/app/models/concerns/.keep +0 -0
  66. data/test/dummy/app/models/foo.rb +3 -0
  67. data/test/dummy/app/models/foo_bar.rb +3 -0
  68. data/test/dummy/app/models/other/foo.rb +5 -0
  69. data/test/dummy/app/models/other/role.rb +5 -0
  70. data/test/dummy/app/models/other/user.rb +5 -0
  71. data/test/dummy/app/models/role.rb +3 -0
  72. data/test/dummy/app/models/user.rb +3 -0
  73. data/test/dummy/app/models/uuid.rb +4 -0
  74. data/test/dummy/config/application.rb +23 -0
  75. data/test/dummy/config/boot.rb +4 -0
  76. data/test/dummy/config/database.yml +25 -0
  77. data/test/dummy/config/environment.rb +5 -0
  78. data/test/dummy/config/environments/development.rb +37 -0
  79. data/test/dummy/config/environments/production.rb +78 -0
  80. data/test/dummy/config/environments/test.rb +39 -0
  81. data/test/dummy/config/initializers/assets.rb +8 -0
  82. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  83. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  84. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  85. data/test/dummy/config/initializers/inflections.rb +16 -0
  86. data/test/dummy/config/initializers/mime_types.rb +4 -0
  87. data/test/dummy/config/initializers/secrets.rb +1 -0
  88. data/test/dummy/config/initializers/session_store.rb +3 -0
  89. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  90. data/test/dummy/config/locales/en.yml +23 -0
  91. data/test/dummy/config/routes.rb +3 -0
  92. data/test/dummy/config.ru +4 -0
  93. data/test/dummy/db/migrate/20141117132218_create_tables.rb +102 -0
  94. data/test/helpers/helper_test.rb +89 -0
  95. data/test/models/roles_test.rb +251 -0
  96. data/test/models/roles_with_custom_association_names_test.rb +28 -0
  97. data/test/models/roles_with_custom_class_names_test.rb +28 -0
  98. data/test/models/system_roles_test.rb +16 -0
  99. data/test/models/users_roles_and_subjects_with_namespaced_class_names_test.rb +30 -0
  100. data/test/test_helper.rb +76 -23
  101. data/test/version_test.rb +2 -2
  102. metadata +190 -74
  103. data/README.textile +0 -921
  104. data/VERSION.yml +0 -5
  105. data/init.rb +0 -1
  106. data/test/access_control_test.rb +0 -338
  107. data/test/dsl_base_test.rb +0 -795
  108. data/test/helpers_test.rb +0 -133
  109. data/test/roles_test.rb +0 -370
  110. data/test/support/controllers.rb +0 -207
  111. data/test/support/models.rb +0 -59
  112. data/test/support/schema.rb +0 -93
metadata CHANGED
@@ -1,59 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acl9
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.3
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - oleg dashevskii
8
+ - Jason King
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2010-11-02 00:00:00.000000000 Z
12
+ date: 2014-11-23 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rails
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
- - - ">="
18
+ - - "~>"
18
19
  - !ruby/object:Gem::Version
19
- version: 2.3.12
20
+ version: '4.0'
20
21
  type: :runtime
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: 2.3.12
27
- - !ruby/object:Gem::Dependency
28
- name: be9-context
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 0.5.5
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
25
+ - - "~>"
39
26
  - !ruby/object:Gem::Version
40
- version: 0.5.5
27
+ version: '4.0'
41
28
  - !ruby/object:Gem::Dependency
42
- name: jnunemaker-matchy
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: 0.4.0
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: 0.4.0
55
- - !ruby/object:Gem::Dependency
56
- name: rake
29
+ name: codeclimate-test-reporter
57
30
  requirement: !ruby/object:Gem::Requirement
58
31
  requirements:
59
32
  - - ">="
@@ -94,41 +67,32 @@ dependencies:
94
67
  - - ">="
95
68
  - !ruby/object:Gem::Version
96
69
  version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: turn
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- description: Role-based authorization system for Rails with a nice DSL for access
112
- control lists
70
+ description: Role-based authorization system for Rails with a concise DSL for securing
71
+ your Rails application. Acl9 makes it easy to get security right for your app, the
72
+ access control code sits right in your controller, the syntax is very easy to understand,
73
+ and acl9 makes it easy to test your access rules.
113
74
  email:
114
75
  - olegdashevskii@gmail.com
76
+ - jk@handle.it
115
77
  executables: []
116
78
  extensions: []
117
- extra_rdoc_files:
118
- - README.textile
119
- - TODO
79
+ extra_rdoc_files: []
120
80
  files:
121
81
  - ".gitignore"
82
+ - ".travis.yml"
83
+ - Appraisals
122
84
  - CHANGELOG.textile
85
+ - CONTRIBUTING.md
123
86
  - Gemfile
124
87
  - Gemfile.lock
88
+ - LICENSE
125
89
  - MIT-LICENSE
126
- - README.textile
90
+ - README.md
127
91
  - Rakefile
128
92
  - TODO
129
- - VERSION.yml
130
93
  - acl9.gemspec
131
- - init.rb
94
+ - gemfiles/rails_4.0.gemfile
95
+ - gemfiles/rails_4.1.gemfile
132
96
  - lib/acl9.rb
133
97
  - lib/acl9/controller_extensions.rb
134
98
  - lib/acl9/controller_extensions/dsl_base.rb
@@ -138,17 +102,93 @@ files:
138
102
  - lib/acl9/model_extensions/for_object.rb
139
103
  - lib/acl9/model_extensions/for_subject.rb
140
104
  - lib/acl9/version.rb
141
- - test/access_control_test.rb
142
- - test/dsl_base_test.rb
143
- - test/helpers_test.rb
144
- - test/roles_test.rb
145
- - test/support/controllers.rb
146
- - test/support/models.rb
147
- - test/support/schema.rb
105
+ - test/controller_extensions/actions_test.rb
106
+ - test/controller_extensions/anon_test.rb
107
+ - test/controller_extensions/base.rb
108
+ - test/controller_extensions/basics_test.rb
109
+ - test/controller_extensions/conditions_test.rb
110
+ - test/controller_extensions/method_test.rb
111
+ - test/controller_extensions/multi_match_test.rb
112
+ - test/controller_extensions/multiple_role_arguments_test.rb
113
+ - test/controller_extensions/prepositions_test.rb
114
+ - test/controller_extensions/pseudo_role_test.rb
115
+ - test/controller_extensions/role_test.rb
116
+ - test/controllers/acl_action_override_test.rb
117
+ - test/controllers/acl_arguments_test.rb
118
+ - test/controllers/acl_block_test.rb
119
+ - test/controllers/acl_boolean_method_test.rb
120
+ - test/controllers/acl_helper_method_test.rb
121
+ - test/controllers/acl_ivars_test.rb
122
+ - test/controllers/acl_method2_test.rb
123
+ - test/controllers/acl_method_test.rb
124
+ - test/controllers/acl_object_hash_test.rb
125
+ - test/controllers/acl_query_method_named_test.rb
126
+ - test/controllers/acl_query_method_test.rb
127
+ - test/controllers/acl_query_method_with_lambda_test.rb
128
+ - test/controllers/acl_query_mixin.rb
129
+ - test/controllers/acl_subject_method_test.rb
130
+ - test/controllers/arguments_checking_test.rb
131
+ - test/dummy/app/controllers/acl_action_override.rb
132
+ - test/dummy/app/controllers/acl_arguments.rb
133
+ - test/dummy/app/controllers/acl_block.rb
134
+ - test/dummy/app/controllers/acl_boolean_method.rb
135
+ - test/dummy/app/controllers/acl_helper_method.rb
136
+ - test/dummy/app/controllers/acl_ivars.rb
137
+ - test/dummy/app/controllers/acl_method.rb
138
+ - test/dummy/app/controllers/acl_method2.rb
139
+ - test/dummy/app/controllers/acl_objects_hash.rb
140
+ - test/dummy/app/controllers/acl_query_method.rb
141
+ - test/dummy/app/controllers/acl_query_method_named.rb
142
+ - test/dummy/app/controllers/acl_query_method_with_lambda.rb
143
+ - test/dummy/app/controllers/acl_subject_method.rb
144
+ - test/dummy/app/controllers/application_controller.rb
145
+ - test/dummy/app/controllers/empty_controller.rb
146
+ - test/dummy/app/helpers/application_helper.rb
147
+ - test/dummy/app/helpers/some_helper.rb
148
+ - test/dummy/app/models/.keep
149
+ - test/dummy/app/models/access.rb
150
+ - test/dummy/app/models/account.rb
151
+ - test/dummy/app/models/bar.rb
152
+ - test/dummy/app/models/concerns/.keep
153
+ - test/dummy/app/models/foo.rb
154
+ - test/dummy/app/models/foo_bar.rb
155
+ - test/dummy/app/models/other/foo.rb
156
+ - test/dummy/app/models/other/role.rb
157
+ - test/dummy/app/models/other/user.rb
158
+ - test/dummy/app/models/role.rb
159
+ - test/dummy/app/models/user.rb
160
+ - test/dummy/app/models/uuid.rb
161
+ - test/dummy/config.ru
162
+ - test/dummy/config/application.rb
163
+ - test/dummy/config/boot.rb
164
+ - test/dummy/config/database.yml
165
+ - test/dummy/config/environment.rb
166
+ - test/dummy/config/environments/development.rb
167
+ - test/dummy/config/environments/production.rb
168
+ - test/dummy/config/environments/test.rb
169
+ - test/dummy/config/initializers/assets.rb
170
+ - test/dummy/config/initializers/backtrace_silencers.rb
171
+ - test/dummy/config/initializers/cookies_serializer.rb
172
+ - test/dummy/config/initializers/filter_parameter_logging.rb
173
+ - test/dummy/config/initializers/inflections.rb
174
+ - test/dummy/config/initializers/mime_types.rb
175
+ - test/dummy/config/initializers/secrets.rb
176
+ - test/dummy/config/initializers/session_store.rb
177
+ - test/dummy/config/initializers/wrap_parameters.rb
178
+ - test/dummy/config/locales/en.yml
179
+ - test/dummy/config/routes.rb
180
+ - test/dummy/db/migrate/20141117132218_create_tables.rb
181
+ - test/helpers/helper_test.rb
182
+ - test/models/roles_test.rb
183
+ - test/models/roles_with_custom_association_names_test.rb
184
+ - test/models/roles_with_custom_class_names_test.rb
185
+ - test/models/system_roles_test.rb
186
+ - test/models/users_roles_and_subjects_with_namespaced_class_names_test.rb
148
187
  - test/test_helper.rb
149
188
  - test/version_test.rb
150
189
  homepage: http://github.com/be9/acl9
151
- licenses: []
190
+ licenses:
191
+ - MIT
152
192
  metadata: {}
153
193
  post_install_message:
154
194
  rdoc_options:
@@ -159,7 +199,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
159
199
  requirements:
160
200
  - - ">="
161
201
  - !ruby/object:Gem::Version
162
- version: '0'
202
+ version: '2'
163
203
  required_rubygems_version: !ruby/object:Gem::Requirement
164
204
  requirements:
165
205
  - - ">="
@@ -170,15 +210,91 @@ rubyforge_project:
170
210
  rubygems_version: 2.2.2
171
211
  signing_key:
172
212
  specification_version: 4
173
- summary: Yet another role-based authorization system for Rails
213
+ summary: Role-based authorization system for Rails with a concise DSL for securing
214
+ your Rails application.
174
215
  test_files:
175
- - test/access_control_test.rb
176
- - test/dsl_base_test.rb
177
- - test/helpers_test.rb
178
- - test/roles_test.rb
179
- - test/support/controllers.rb
180
- - test/support/models.rb
181
- - test/support/schema.rb
216
+ - test/controller_extensions/actions_test.rb
217
+ - test/controller_extensions/anon_test.rb
218
+ - test/controller_extensions/base.rb
219
+ - test/controller_extensions/basics_test.rb
220
+ - test/controller_extensions/conditions_test.rb
221
+ - test/controller_extensions/method_test.rb
222
+ - test/controller_extensions/multi_match_test.rb
223
+ - test/controller_extensions/multiple_role_arguments_test.rb
224
+ - test/controller_extensions/prepositions_test.rb
225
+ - test/controller_extensions/pseudo_role_test.rb
226
+ - test/controller_extensions/role_test.rb
227
+ - test/controllers/acl_action_override_test.rb
228
+ - test/controllers/acl_arguments_test.rb
229
+ - test/controllers/acl_block_test.rb
230
+ - test/controllers/acl_boolean_method_test.rb
231
+ - test/controllers/acl_helper_method_test.rb
232
+ - test/controllers/acl_ivars_test.rb
233
+ - test/controllers/acl_method2_test.rb
234
+ - test/controllers/acl_method_test.rb
235
+ - test/controllers/acl_object_hash_test.rb
236
+ - test/controllers/acl_query_method_named_test.rb
237
+ - test/controllers/acl_query_method_test.rb
238
+ - test/controllers/acl_query_method_with_lambda_test.rb
239
+ - test/controllers/acl_query_mixin.rb
240
+ - test/controllers/acl_subject_method_test.rb
241
+ - test/controllers/arguments_checking_test.rb
242
+ - test/dummy/app/controllers/acl_action_override.rb
243
+ - test/dummy/app/controllers/acl_arguments.rb
244
+ - test/dummy/app/controllers/acl_block.rb
245
+ - test/dummy/app/controllers/acl_boolean_method.rb
246
+ - test/dummy/app/controllers/acl_helper_method.rb
247
+ - test/dummy/app/controllers/acl_ivars.rb
248
+ - test/dummy/app/controllers/acl_method.rb
249
+ - test/dummy/app/controllers/acl_method2.rb
250
+ - test/dummy/app/controllers/acl_objects_hash.rb
251
+ - test/dummy/app/controllers/acl_query_method.rb
252
+ - test/dummy/app/controllers/acl_query_method_named.rb
253
+ - test/dummy/app/controllers/acl_query_method_with_lambda.rb
254
+ - test/dummy/app/controllers/acl_subject_method.rb
255
+ - test/dummy/app/controllers/application_controller.rb
256
+ - test/dummy/app/controllers/empty_controller.rb
257
+ - test/dummy/app/helpers/application_helper.rb
258
+ - test/dummy/app/helpers/some_helper.rb
259
+ - test/dummy/app/models/.keep
260
+ - test/dummy/app/models/access.rb
261
+ - test/dummy/app/models/account.rb
262
+ - test/dummy/app/models/bar.rb
263
+ - test/dummy/app/models/concerns/.keep
264
+ - test/dummy/app/models/foo.rb
265
+ - test/dummy/app/models/foo_bar.rb
266
+ - test/dummy/app/models/other/foo.rb
267
+ - test/dummy/app/models/other/role.rb
268
+ - test/dummy/app/models/other/user.rb
269
+ - test/dummy/app/models/role.rb
270
+ - test/dummy/app/models/user.rb
271
+ - test/dummy/app/models/uuid.rb
272
+ - test/dummy/config.ru
273
+ - test/dummy/config/application.rb
274
+ - test/dummy/config/boot.rb
275
+ - test/dummy/config/database.yml
276
+ - test/dummy/config/environment.rb
277
+ - test/dummy/config/environments/development.rb
278
+ - test/dummy/config/environments/production.rb
279
+ - test/dummy/config/environments/test.rb
280
+ - test/dummy/config/initializers/assets.rb
281
+ - test/dummy/config/initializers/backtrace_silencers.rb
282
+ - test/dummy/config/initializers/cookies_serializer.rb
283
+ - test/dummy/config/initializers/filter_parameter_logging.rb
284
+ - test/dummy/config/initializers/inflections.rb
285
+ - test/dummy/config/initializers/mime_types.rb
286
+ - test/dummy/config/initializers/secrets.rb
287
+ - test/dummy/config/initializers/session_store.rb
288
+ - test/dummy/config/initializers/wrap_parameters.rb
289
+ - test/dummy/config/locales/en.yml
290
+ - test/dummy/config/routes.rb
291
+ - test/dummy/db/migrate/20141117132218_create_tables.rb
292
+ - test/helpers/helper_test.rb
293
+ - test/models/roles_test.rb
294
+ - test/models/roles_with_custom_association_names_test.rb
295
+ - test/models/roles_with_custom_class_names_test.rb
296
+ - test/models/system_roles_test.rb
297
+ - test/models/users_roles_and_subjects_with_namespaced_class_names_test.rb
182
298
  - test/test_helper.rb
183
299
  - test/version_test.rb
184
300
  has_rdoc: