arrthorizer 0.1.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. data/.gitignore +21 -0
  2. data/.travis.yml +6 -0
  3. data/Gemfile +10 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +32 -0
  6. data/Rakefile +8 -0
  7. data/arrthorizer.gemspec +24 -0
  8. data/config.ru +7 -0
  9. data/lib/arrthorizer/arrthorizer_exception.rb +11 -0
  10. data/lib/arrthorizer/context.rb +65 -0
  11. data/lib/arrthorizer/context_builder.rb +11 -0
  12. data/lib/arrthorizer/context_role.rb +31 -0
  13. data/lib/arrthorizer/permission.rb +14 -0
  14. data/lib/arrthorizer/privilege.rb +44 -0
  15. data/lib/arrthorizer/rails/configuration.rb +67 -0
  16. data/lib/arrthorizer/rails/controller_action.rb +45 -0
  17. data/lib/arrthorizer/rails/controller_concern.rb +70 -0
  18. data/lib/arrthorizer/rails/controller_configuration.rb +36 -0
  19. data/lib/arrthorizer/rails/controller_context_builder.rb +39 -0
  20. data/lib/arrthorizer/rails.rb +24 -0
  21. data/lib/arrthorizer/registry.rb +30 -0
  22. data/lib/arrthorizer/role.rb +31 -0
  23. data/lib/arrthorizer/roles.rb +19 -0
  24. data/lib/arrthorizer/version.rb +3 -0
  25. data/lib/arrthorizer.rb +28 -0
  26. data/lib/generators/arrthorizer/install/USAGE +9 -0
  27. data/lib/generators/arrthorizer/install/install_generator.rb +62 -0
  28. data/lib/generators/arrthorizer/install/templates/config.yml +49 -0
  29. data/spec/arrthorizer_exception/inner_spec.rb +21 -0
  30. data/spec/context/equals_spec.rb +44 -0
  31. data/spec/context/merge_spec.rb +37 -0
  32. data/spec/context_builder/build_spec.rb +12 -0
  33. data/spec/context_role/to_key_spec.rb +21 -0
  34. data/spec/context_spec.rb +49 -0
  35. data/spec/controllers/some_controller_spec.rb +79 -0
  36. data/spec/integration/registry/missing_handler_spec.rb +25 -0
  37. data/spec/integration/role_spec.rb +17 -0
  38. data/spec/internal/app/assets/images/rails.png +0 -0
  39. data/spec/internal/app/assets/javascripts/application.js +15 -0
  40. data/spec/internal/app/assets/javascripts/test.js.coffee +3 -0
  41. data/spec/internal/app/assets/stylesheets/application.css +13 -0
  42. data/spec/internal/app/assets/stylesheets/test.css.scss +3 -0
  43. data/spec/internal/app/controllers/application_controller.rb +3 -0
  44. data/spec/internal/app/controllers/some_controller.rb +17 -0
  45. data/spec/internal/app/helpers/application_helper.rb +2 -0
  46. data/spec/internal/app/helpers/test_helper.rb +2 -0
  47. data/spec/internal/app/mailers/.gitkeep +0 -0
  48. data/spec/internal/app/models/.gitkeep +0 -0
  49. data/spec/internal/app/roles/namespaced/context_role.rb +9 -0
  50. data/spec/internal/app/roles/unnamespaced_context_role.rb +6 -0
  51. data/spec/internal/app/views/layouts/application.html.erb +11 -0
  52. data/spec/internal/app/views/some/some_action.html.erb +2 -0
  53. data/spec/internal/config/application.rb +65 -0
  54. data/spec/internal/config/arrthorizer.yml +9 -0
  55. data/spec/internal/config/boot.rb +6 -0
  56. data/spec/internal/config/database.yml +25 -0
  57. data/spec/internal/config/environment.rb +5 -0
  58. data/spec/internal/config/routes.rb +3 -0
  59. data/spec/internal/db/schema.rb +3 -0
  60. data/spec/internal/log/.gitignore +1 -0
  61. data/spec/internal/public/favicon.ico +0 -0
  62. data/spec/permission/grant_spec.rb +14 -0
  63. data/spec/privilege/accessible_to_spec.rb +32 -0
  64. data/spec/privilege/get_spec.rb +35 -0
  65. data/spec/privilege/initialize_spec.rb +15 -0
  66. data/spec/privilege/make_accessible_to_spec.rb +22 -0
  67. data/spec/rails/.gitkeep +0 -0
  68. data/spec/rails/controller_action/initialize_spec.rb +42 -0
  69. data/spec/rails/controller_action/key_for_spec.rb +17 -0
  70. data/spec/rails/controller_action/to_key_spec.rb +14 -0
  71. data/spec/rails/controller_concern/arrthorizer_context_spec.rb +22 -0
  72. data/spec/rails/controller_concern/authorize_spec.rb +113 -0
  73. data/spec/rails/controller_concern/integration_spec.rb +75 -0
  74. data/spec/rails/controller_concern/to_prepare_context_spec.rb +38 -0
  75. data/spec/rails/controller_configuration/initialize_spec.rb +19 -0
  76. data/spec/role/get_spec.rb +29 -0
  77. data/spec/role/shared_examples/finding_the_right_role.rb +6 -0
  78. data/spec/spec_helper.rb +21 -0
  79. data/spec/support/reset.rb +26 -0
  80. metadata +244 -0
metadata ADDED
@@ -0,0 +1,244 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: arrthorizer
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0.pre
5
+ prerelease: 6
6
+ platform: ruby
7
+ authors:
8
+ - René van den Berg
9
+ - Lennaert Meijvogel
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2014-01-31 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rails
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: '0'
31
+ - !ruby/object:Gem::Dependency
32
+ name: combustion
33
+ requirement: !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ~>
37
+ - !ruby/object:Gem::Version
38
+ version: 0.5.1
39
+ type: :development
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ~>
45
+ - !ruby/object:Gem::Version
46
+ version: 0.5.1
47
+ - !ruby/object:Gem::Dependency
48
+ name: sqlite3
49
+ requirement: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ - !ruby/object:Gem::Dependency
64
+ name: rspec-rails
65
+ requirement: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ! '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ type: :development
72
+ prerelease: false
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ description: Contextual authorization for your Rails (3+) application
80
+ email:
81
+ - rene.vandenberg@ogd.nl
82
+ - lennaert.meijvogel@ogd.nl
83
+ executables: []
84
+ extensions: []
85
+ extra_rdoc_files: []
86
+ files:
87
+ - .gitignore
88
+ - .travis.yml
89
+ - Gemfile
90
+ - LICENSE.txt
91
+ - README.md
92
+ - Rakefile
93
+ - arrthorizer.gemspec
94
+ - config.ru
95
+ - lib/arrthorizer.rb
96
+ - lib/arrthorizer/arrthorizer_exception.rb
97
+ - lib/arrthorizer/context.rb
98
+ - lib/arrthorizer/context_builder.rb
99
+ - lib/arrthorizer/context_role.rb
100
+ - lib/arrthorizer/permission.rb
101
+ - lib/arrthorizer/privilege.rb
102
+ - lib/arrthorizer/rails.rb
103
+ - lib/arrthorizer/rails/configuration.rb
104
+ - lib/arrthorizer/rails/controller_action.rb
105
+ - lib/arrthorizer/rails/controller_concern.rb
106
+ - lib/arrthorizer/rails/controller_configuration.rb
107
+ - lib/arrthorizer/rails/controller_context_builder.rb
108
+ - lib/arrthorizer/registry.rb
109
+ - lib/arrthorizer/role.rb
110
+ - lib/arrthorizer/roles.rb
111
+ - lib/arrthorizer/version.rb
112
+ - lib/generators/arrthorizer/install/USAGE
113
+ - lib/generators/arrthorizer/install/install_generator.rb
114
+ - lib/generators/arrthorizer/install/templates/config.yml
115
+ - spec/arrthorizer_exception/inner_spec.rb
116
+ - spec/context/equals_spec.rb
117
+ - spec/context/merge_spec.rb
118
+ - spec/context_builder/build_spec.rb
119
+ - spec/context_role/to_key_spec.rb
120
+ - spec/context_spec.rb
121
+ - spec/controllers/some_controller_spec.rb
122
+ - spec/integration/registry/missing_handler_spec.rb
123
+ - spec/integration/role_spec.rb
124
+ - spec/internal/app/assets/images/rails.png
125
+ - spec/internal/app/assets/javascripts/application.js
126
+ - spec/internal/app/assets/javascripts/test.js.coffee
127
+ - spec/internal/app/assets/stylesheets/application.css
128
+ - spec/internal/app/assets/stylesheets/test.css.scss
129
+ - spec/internal/app/controllers/application_controller.rb
130
+ - spec/internal/app/controllers/some_controller.rb
131
+ - spec/internal/app/helpers/application_helper.rb
132
+ - spec/internal/app/helpers/test_helper.rb
133
+ - spec/internal/app/mailers/.gitkeep
134
+ - spec/internal/app/models/.gitkeep
135
+ - spec/internal/app/roles/namespaced/context_role.rb
136
+ - spec/internal/app/roles/unnamespaced_context_role.rb
137
+ - spec/internal/app/views/layouts/application.html.erb
138
+ - spec/internal/app/views/some/some_action.html.erb
139
+ - spec/internal/config/application.rb
140
+ - spec/internal/config/arrthorizer.yml
141
+ - spec/internal/config/boot.rb
142
+ - spec/internal/config/database.yml
143
+ - spec/internal/config/environment.rb
144
+ - spec/internal/config/routes.rb
145
+ - spec/internal/db/schema.rb
146
+ - spec/internal/log/.gitignore
147
+ - spec/internal/public/favicon.ico
148
+ - spec/permission/grant_spec.rb
149
+ - spec/privilege/accessible_to_spec.rb
150
+ - spec/privilege/get_spec.rb
151
+ - spec/privilege/initialize_spec.rb
152
+ - spec/privilege/make_accessible_to_spec.rb
153
+ - spec/rails/.gitkeep
154
+ - spec/rails/controller_action/initialize_spec.rb
155
+ - spec/rails/controller_action/key_for_spec.rb
156
+ - spec/rails/controller_action/to_key_spec.rb
157
+ - spec/rails/controller_concern/arrthorizer_context_spec.rb
158
+ - spec/rails/controller_concern/authorize_spec.rb
159
+ - spec/rails/controller_concern/integration_spec.rb
160
+ - spec/rails/controller_concern/to_prepare_context_spec.rb
161
+ - spec/rails/controller_configuration/initialize_spec.rb
162
+ - spec/role/get_spec.rb
163
+ - spec/role/shared_examples/finding_the_right_role.rb
164
+ - spec/spec_helper.rb
165
+ - spec/support/reset.rb
166
+ homepage: https://github.com/BUS-ogd/arrthorizer
167
+ licenses: []
168
+ post_install_message:
169
+ rdoc_options: []
170
+ require_paths:
171
+ - lib
172
+ required_ruby_version: !ruby/object:Gem::Requirement
173
+ none: false
174
+ requirements:
175
+ - - ! '>='
176
+ - !ruby/object:Gem::Version
177
+ version: '0'
178
+ segments:
179
+ - 0
180
+ hash: 3748018138546931324
181
+ required_rubygems_version: !ruby/object:Gem::Requirement
182
+ none: false
183
+ requirements:
184
+ - - ! '>'
185
+ - !ruby/object:Gem::Version
186
+ version: 1.3.1
187
+ requirements: []
188
+ rubyforge_project:
189
+ rubygems_version: 1.8.24
190
+ signing_key:
191
+ specification_version: 3
192
+ summary: Contextual authorization for your Rails (3+) application
193
+ test_files:
194
+ - spec/arrthorizer_exception/inner_spec.rb
195
+ - spec/context/equals_spec.rb
196
+ - spec/context/merge_spec.rb
197
+ - spec/context_builder/build_spec.rb
198
+ - spec/context_role/to_key_spec.rb
199
+ - spec/context_spec.rb
200
+ - spec/controllers/some_controller_spec.rb
201
+ - spec/integration/registry/missing_handler_spec.rb
202
+ - spec/integration/role_spec.rb
203
+ - spec/internal/app/assets/images/rails.png
204
+ - spec/internal/app/assets/javascripts/application.js
205
+ - spec/internal/app/assets/javascripts/test.js.coffee
206
+ - spec/internal/app/assets/stylesheets/application.css
207
+ - spec/internal/app/assets/stylesheets/test.css.scss
208
+ - spec/internal/app/controllers/application_controller.rb
209
+ - spec/internal/app/controllers/some_controller.rb
210
+ - spec/internal/app/helpers/application_helper.rb
211
+ - spec/internal/app/helpers/test_helper.rb
212
+ - spec/internal/app/mailers/.gitkeep
213
+ - spec/internal/app/models/.gitkeep
214
+ - spec/internal/app/roles/namespaced/context_role.rb
215
+ - spec/internal/app/roles/unnamespaced_context_role.rb
216
+ - spec/internal/app/views/layouts/application.html.erb
217
+ - spec/internal/app/views/some/some_action.html.erb
218
+ - spec/internal/config/application.rb
219
+ - spec/internal/config/arrthorizer.yml
220
+ - spec/internal/config/boot.rb
221
+ - spec/internal/config/database.yml
222
+ - spec/internal/config/environment.rb
223
+ - spec/internal/config/routes.rb
224
+ - spec/internal/db/schema.rb
225
+ - spec/internal/log/.gitignore
226
+ - spec/internal/public/favicon.ico
227
+ - spec/permission/grant_spec.rb
228
+ - spec/privilege/accessible_to_spec.rb
229
+ - spec/privilege/get_spec.rb
230
+ - spec/privilege/initialize_spec.rb
231
+ - spec/privilege/make_accessible_to_spec.rb
232
+ - spec/rails/.gitkeep
233
+ - spec/rails/controller_action/initialize_spec.rb
234
+ - spec/rails/controller_action/key_for_spec.rb
235
+ - spec/rails/controller_action/to_key_spec.rb
236
+ - spec/rails/controller_concern/arrthorizer_context_spec.rb
237
+ - spec/rails/controller_concern/authorize_spec.rb
238
+ - spec/rails/controller_concern/integration_spec.rb
239
+ - spec/rails/controller_concern/to_prepare_context_spec.rb
240
+ - spec/rails/controller_configuration/initialize_spec.rb
241
+ - spec/role/get_spec.rb
242
+ - spec/role/shared_examples/finding_the_right_role.rb
243
+ - spec/spec_helper.rb
244
+ - spec/support/reset.rb