cantango-core 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. data/.document +5 -0
  2. data/.rspec +3 -0
  3. data/Gemfile +54 -0
  4. data/Gemfile.lock +231 -0
  5. data/LICENSE.txt +20 -0
  6. data/README.mdown +90 -0
  7. data/Rakefile +48 -0
  8. data/VERSION +1 -0
  9. data/cantango-core.gemspec +177 -0
  10. data/lib/cantango/ability.rb +5 -0
  11. data/lib/cantango/ability/base.rb +61 -0
  12. data/lib/cantango/ability/cache.rb +7 -0
  13. data/lib/cantango/ability/cache/key.rb +38 -0
  14. data/lib/cantango/ability/cached.rb +28 -0
  15. data/lib/cantango/ability/executor.rb +7 -0
  16. data/lib/cantango/ability/executor/base.rb +53 -0
  17. data/lib/cantango/ability/executor/cache_mode.rb +33 -0
  18. data/lib/cantango/ability/executor/modes.rb +52 -0
  19. data/lib/cantango/ability/executor/no_cache_mode.rb +17 -0
  20. data/lib/cantango/ability/helper.rb +11 -0
  21. data/lib/cantango/ability/helper/account.rb +13 -0
  22. data/lib/cantango/ability/helper/engine.rb +32 -0
  23. data/lib/cantango/ability/helper/role.rb +21 -0
  24. data/lib/cantango/ability/helper/role_group.rb +21 -0
  25. data/lib/cantango/ability/helper/user.rb +18 -0
  26. data/lib/cantango/cancan/rule.rb +6 -0
  27. data/lib/cantango/core.rb +84 -0
  28. data/lib/cantango/engine.rb +39 -0
  29. data/lib/cantango/filter.rb +5 -0
  30. data/lib/cantango/filter/base.rb +31 -0
  31. data/lib/cantango/helpers.rb +5 -0
  32. data/lib/cantango/helpers/debug.rb +10 -0
  33. data/lib/cantango/loader.rb +5 -0
  34. data/lib/cantango/loader/yaml.rb +33 -0
  35. data/lib/cantango/macros.rb +11 -0
  36. data/lib/cantango/macros/account.rb +14 -0
  37. data/lib/cantango/macros/user.rb +16 -0
  38. data/lib/cantango/model.rb +5 -0
  39. data/lib/cantango/model/guest.rb +25 -0
  40. data/lib/cantango/rails.rb +7 -0
  41. data/lib/cantango/rails/engine.rb +63 -0
  42. data/lib/cantango/rails/helpers/base_helper.rb +29 -0
  43. data/lib/cantango/rails/helpers/controller_helper.rb +17 -0
  44. data/lib/cantango/rails/helpers/rest_helper.rb +76 -0
  45. data/lib/cantango/rails/helpers/view_helper.rb +17 -0
  46. data/lib/cantango/rails/railtie.rb +7 -0
  47. data/lib/cantango/rspec.rb +1 -0
  48. data/lib/cantango/rspec/config.rb +3 -0
  49. data/lib/cantango/rspec/matchers.rb +1 -0
  50. data/lib/cantango/rspec/matchers/be_allowed_to.rb +28 -0
  51. data/lib/cantango/rules.rb +8 -0
  52. data/lib/cantango/rules/adaptor.rb +37 -0
  53. data/lib/cantango/rules/adaptor/active_record.rb +10 -0
  54. data/lib/cantango/rules/adaptor/data_mapper.rb +11 -0
  55. data/lib/cantango/rules/adaptor/generic.rb +16 -0
  56. data/lib/cantango/rules/adaptor/mongo.rb +19 -0
  57. data/lib/cantango/rules/adaptor/mongo_mapper.rb +10 -0
  58. data/lib/cantango/rules/adaptor/mongoid.rb +9 -0
  59. data/lib/cantango/rules/adaptor/relational.rb +13 -0
  60. data/lib/cantango/rules/dsl.rb +24 -0
  61. data/lib/cantango/rules/relation.rb +67 -0
  62. data/lib/cantango/rules/rule_class.rb +11 -0
  63. data/lib/cantango/rules/scope.rb +24 -0
  64. data/lib/cantango/scope.rb +5 -0
  65. data/lib/cantango/scope/ability.rb +20 -0
  66. data/lib/generators/cantango/install/install_generator.rb +37 -0
  67. data/lib/generators/cantango/install/templates/cantango.rb +4 -0
  68. data/lib/generators/cantango/install/templates/categories.yml +0 -0
  69. data/lib/generators/cantango/install/templates/permissions.yml +6 -0
  70. data/spec/cantango/ability/base_spec.rb +73 -0
  71. data/spec/cantango/ability/cached_spec.rb +0 -0
  72. data/spec/cantango/ability/executor/base2.rb +75 -0
  73. data/spec/cantango/ability/executor/base_spec.rb +67 -0
  74. data/spec/cantango/ability/executor/cache_mode_spec.rb +77 -0
  75. data/spec/cantango/ability/executor/modes_spec.rb +68 -0
  76. data/spec/cantango/ability/executor/no_cache_mode_spec.rb +0 -0
  77. data/spec/cantango/cancan/rule_spec.rb +0 -0
  78. data/spec/cantango/core_spec.rb +9 -0
  79. data/spec/cantango/engine_spec.rb +0 -0
  80. data/spec/cantango/filter/base_spec.rb +0 -0
  81. data/spec/cantango/helpers/debug_spec.rb +0 -0
  82. data/spec/cantango/loader/yaml_spec.rb +0 -0
  83. data/spec/cantango/macros/account_spec.rb +0 -0
  84. data/spec/cantango/macros/user_spec.rb +0 -0
  85. data/spec/cantango/rspec/be_allowed_to_spec.rb +0 -0
  86. data/spec/cantango/rules/adaptor/active_record_spec.rb +0 -0
  87. data/spec/cantango/rules/adaptor/data_mapper_spec.rb +0 -0
  88. data/spec/cantango/rules/adaptor/mongo_mapper_spec.rb +0 -0
  89. data/spec/cantango/rules/adaptor/mongoid_spec.rb +0 -0
  90. data/spec/cantango/rules/adaptor_spec.rb +0 -0
  91. data/spec/cantango/rules/dsl_spec.rb +0 -0
  92. data/spec/cantango/rules/relation_spec.rb +0 -0
  93. data/spec/cantango/rules/rule_class_spec.rb +0 -0
  94. data/spec/cantango/rules/scope_spec.rb +0 -0
  95. data/spec/cantango/rules_spec.rb +55 -0
  96. data/spec/cantango/scope/ability_spec.rb +0 -0
  97. data/spec/cantango_spec.rb +0 -0
  98. data/spec/generators/cantango/install_generator_spec.rb +42 -0
  99. data/spec/spec_helper.rb +9 -0
  100. metadata +310 -0
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --drb
data/Gemfile ADDED
@@ -0,0 +1,54 @@
1
+ source :rubygems
2
+
3
+ group :default do
4
+ gem 'rails', '>= 3.0.1'
5
+ gem 'cancan', '>= 1.4'
6
+ gem 'sugar-high', '>= 0.6.0'
7
+ gem 'sweetloader', '~> 0.1.0'
8
+ gem 'hashie'
9
+ end
10
+
11
+ group :test do
12
+ gem 'require_all', '~> 1.2.0'
13
+
14
+ # Data
15
+ gem 'database_cleaner'
16
+ gem 'factory_girl'
17
+
18
+ # Specs
19
+ gem 'spork'
20
+ gem 'capybara'
21
+ gem 'rails-app-spec', '>= 0.5.0'
22
+ gem 'mocha'
23
+ gem "launchy"
24
+
25
+ # Debug and performance tests
26
+ gem 'cutter'
27
+
28
+ # Integration testing
29
+ gem 'decent_exposure'
30
+ gem "friendly_id"
31
+ gem "devise", '>= 1.4'
32
+
33
+ # Rails
34
+ gem 'haml'
35
+
36
+ # Generators
37
+ gem 'generator-spec', '>= 0.7.8'
38
+ end
39
+
40
+ group :development, :test do
41
+ gem "rspec-rails", '>= 2.6.1' # needed in development to expose the rails generators
42
+ gem 'forgery', '>= 0.3' # needed in development when using rake db:seed
43
+ gem 'factory_girl'
44
+ gem 'sqlite3'
45
+ end
46
+
47
+ group :development do
48
+ gem "rspec", ">= 2.6.0"
49
+ gem "jeweler", ">= 1.6.4"
50
+ gem "bundler", ">= 1.1.rc"
51
+ gem "rdoc"
52
+ gem 'rake', '>= 0.9.2.2'
53
+ end
54
+
data/Gemfile.lock ADDED
@@ -0,0 +1,231 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ actionmailer (3.1.3)
5
+ actionpack (= 3.1.3)
6
+ mail (~> 2.3.0)
7
+ actionpack (3.1.3)
8
+ activemodel (= 3.1.3)
9
+ activesupport (= 3.1.3)
10
+ builder (~> 3.0.0)
11
+ erubis (~> 2.7.0)
12
+ i18n (~> 0.6)
13
+ rack (~> 1.3.5)
14
+ rack-cache (~> 1.1)
15
+ rack-mount (~> 0.8.2)
16
+ rack-test (~> 0.6.1)
17
+ sprockets (~> 2.0.3)
18
+ activemodel (3.1.3)
19
+ activesupport (= 3.1.3)
20
+ builder (~> 3.0.0)
21
+ i18n (~> 0.6)
22
+ activerecord (3.1.3)
23
+ activemodel (= 3.1.3)
24
+ activesupport (= 3.1.3)
25
+ arel (~> 2.2.1)
26
+ tzinfo (~> 0.3.29)
27
+ activeresource (3.1.3)
28
+ activemodel (= 3.1.3)
29
+ activesupport (= 3.1.3)
30
+ activesupport (3.1.3)
31
+ multi_json (~> 1.0)
32
+ addressable (2.2.6)
33
+ arel (2.2.1)
34
+ babosa (0.3.5)
35
+ bcrypt-ruby (3.0.1)
36
+ builder (3.0.0)
37
+ cancan (1.6.7)
38
+ capybara (1.1.2)
39
+ mime-types (>= 1.16)
40
+ nokogiri (>= 1.3.3)
41
+ rack (>= 1.0.0)
42
+ rack-test (>= 0.5.4)
43
+ selenium-webdriver (~> 2.0)
44
+ xpath (~> 0.1.4)
45
+ childprocess (0.2.2)
46
+ ffi (~> 1.0.6)
47
+ code-spec (0.4.0)
48
+ activesupport (>= 3.0.1)
49
+ require_all (~> 1.2.0)
50
+ rspec (>= 2.4.1)
51
+ sugar-high (>= 0.6.0)
52
+ colorize (0.5.8)
53
+ cutter (0.8.2)
54
+ activesupport (>= 2.3.5)
55
+ colorize (>= 0.5)
56
+ database_cleaner (0.7.0)
57
+ decent_exposure (1.0.1)
58
+ devise (1.5.1)
59
+ bcrypt-ruby (~> 3.0)
60
+ orm_adapter (~> 0.0.3)
61
+ warden (~> 1.1)
62
+ diff-lcs (1.1.3)
63
+ erubis (2.7.0)
64
+ factory_girl (2.3.1)
65
+ activesupport
66
+ ffi (1.0.11)
67
+ file-spec (0.4.0)
68
+ activesupport (>= 3.0.1)
69
+ require_all (~> 1.2.0)
70
+ rspec (>= 2.4.1)
71
+ sugar-high (>= 0.6.0)
72
+ file_mutate (0.1.3)
73
+ activesupport (>= 3.0.1)
74
+ i18n
75
+ sugar-high (>= 0.6.0)
76
+ sweetloader (>= 0.1.0)
77
+ forgery (0.5.0)
78
+ friendly_id (3.3.0.1)
79
+ babosa (~> 0.3.0)
80
+ generator-spec (0.7.8)
81
+ rails (>= 3.0.1)
82
+ rails_artifactor (>= 0.5.0)
83
+ rake (>= 0.8.7)
84
+ require_all (~> 1.2.0)
85
+ rspec (>= 2.4.1)
86
+ sugar-high (>= 0.6.0)
87
+ test-unit (>= 2.0.1)
88
+ git (1.2.5)
89
+ haml (3.1.3)
90
+ hashie (1.2.0)
91
+ hike (1.2.1)
92
+ i18n (0.6.0)
93
+ jeweler (1.6.4)
94
+ bundler (~> 1.0)
95
+ git (>= 1.2.5)
96
+ rake
97
+ json (1.6.1)
98
+ json_pure (1.6.1)
99
+ launchy (2.0.5)
100
+ addressable (~> 2.2.6)
101
+ mail (2.3.0)
102
+ i18n (>= 0.4.0)
103
+ mime-types (~> 1.16)
104
+ treetop (~> 1.4.8)
105
+ metaclass (0.0.1)
106
+ migration_assist (0.4.0)
107
+ rails (>= 3.0.1)
108
+ rails_artifactor (>= 0.5.0)
109
+ require_all (~> 1.2.0)
110
+ sugar-high (>= 0.6.0)
111
+ mime-types (1.17.2)
112
+ mocha (0.10.0)
113
+ metaclass (~> 0.0.1)
114
+ multi_json (1.0.3)
115
+ nokogiri (1.5.0)
116
+ orm_adapter (0.0.5)
117
+ polyglot (0.3.3)
118
+ rack (1.3.5)
119
+ rack-cache (1.1)
120
+ rack (>= 0.4)
121
+ rack-mount (0.8.3)
122
+ rack (>= 1.0.0)
123
+ rack-ssl (1.3.2)
124
+ rack
125
+ rack-test (0.6.1)
126
+ rack (>= 1.0)
127
+ rails (3.1.3)
128
+ actionmailer (= 3.1.3)
129
+ actionpack (= 3.1.3)
130
+ activerecord (= 3.1.3)
131
+ activeresource (= 3.1.3)
132
+ activesupport (= 3.1.3)
133
+ bundler (~> 1.0)
134
+ railties (= 3.1.3)
135
+ rails-app-spec (0.5.0)
136
+ code-spec (>= 0.4.0)
137
+ file-spec (>= 0.4.0)
138
+ migration_assist (>= 0.4.0)
139
+ rails_artifactor (>= 0.5.0)
140
+ rspec (>= 2.4.1)
141
+ rails_artifactor (0.5.1)
142
+ rails_assist (>= 0.5.1)
143
+ rails_assist (0.5.3)
144
+ activesupport (>= 3.0.1)
145
+ file_mutate (~> 0.1.3)
146
+ require_all (~> 1.2.0)
147
+ sugar-high (>= 0.6.0)
148
+ railties (3.1.3)
149
+ actionpack (= 3.1.3)
150
+ activesupport (= 3.1.3)
151
+ rack-ssl (~> 1.3.2)
152
+ rake (>= 0.8.7)
153
+ rdoc (~> 3.4)
154
+ thor (~> 0.14.6)
155
+ rake (0.9.2.2)
156
+ rdoc (3.11)
157
+ json (~> 1.4)
158
+ require_all (1.2.0)
159
+ rspec (2.7.0)
160
+ rspec-core (~> 2.7.0)
161
+ rspec-expectations (~> 2.7.0)
162
+ rspec-mocks (~> 2.7.0)
163
+ rspec-core (2.7.1)
164
+ rspec-expectations (2.7.0)
165
+ diff-lcs (~> 1.1.2)
166
+ rspec-mocks (2.7.0)
167
+ rspec-rails (2.7.0)
168
+ actionpack (~> 3.0)
169
+ activesupport (~> 3.0)
170
+ railties (~> 3.0)
171
+ rspec (~> 2.7.0)
172
+ rubyzip (0.9.4)
173
+ selenium-webdriver (2.13.0)
174
+ childprocess (>= 0.2.1)
175
+ ffi (~> 1.0.9)
176
+ json_pure
177
+ rubyzip
178
+ spork (0.8.5)
179
+ sprockets (2.0.3)
180
+ hike (~> 1.2)
181
+ rack (~> 1.0)
182
+ tilt (~> 1.1, != 1.3.0)
183
+ sqlite3 (1.3.4)
184
+ sugar-high (0.6.0)
185
+ activesupport (>= 3.0.1)
186
+ sweetloader (0.1.1)
187
+ activesupport (>= 3.0.1)
188
+ i18n
189
+ test-unit (2.4.1)
190
+ thor (0.14.6)
191
+ tilt (1.3.3)
192
+ treetop (1.4.10)
193
+ polyglot
194
+ polyglot (>= 0.3.1)
195
+ tzinfo (0.3.31)
196
+ warden (1.1.0)
197
+ rack (>= 1.0)
198
+ xpath (0.1.4)
199
+ nokogiri (~> 1.3)
200
+
201
+ PLATFORMS
202
+ ruby
203
+
204
+ DEPENDENCIES
205
+ bundler (>= 1.1.rc)
206
+ cancan (>= 1.4)
207
+ capybara
208
+ cutter
209
+ database_cleaner
210
+ decent_exposure
211
+ devise (>= 1.4)
212
+ factory_girl
213
+ forgery (>= 0.3)
214
+ friendly_id
215
+ generator-spec (>= 0.7.8)
216
+ haml
217
+ hashie
218
+ jeweler (>= 1.6.4)
219
+ launchy
220
+ mocha
221
+ rails (>= 3.0.1)
222
+ rails-app-spec (>= 0.5.0)
223
+ rake (>= 0.9.2.2)
224
+ rdoc
225
+ require_all (~> 1.2.0)
226
+ rspec (>= 2.6.0)
227
+ rspec-rails (>= 2.6.1)
228
+ spork
229
+ sqlite3
230
+ sugar-high (>= 0.6.0)
231
+ sweetloader (~> 0.1.0)
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Kristian Mandrup
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.mdown ADDED
@@ -0,0 +1,90 @@
1
+ # CanTango Core
2
+
3
+ CanTango is an advanced Access Control (permissions) system for Rails 3. It:
4
+
5
+ * extends "CanCan":http://github.com/ryanb/cancan and offers a more role oriented design
6
+ * integrates with _role_ and _authentication_ systems in a non-intrusive manner
7
+ * can _cache_ ability rules between requests for increased performance
8
+ * can _store_ abilites in a permission store, including a YAML file, for easy administration
9
+ * works well with multiple user accounts and sub applications
10
+ * supports multiple "Devise":https://github.com/plataformatec/devise users
11
+
12
+ *Will CanTango meet my Access Control (permission) requirements?*
13
+
14
+ * "CanCan vs CanTango":https://github.com/kristianmandrup/cantango/wiki/CanCan-vs-CanTango
15
+ * "CanTango overview":https://github.com/kristianmandrup/cantango/wiki
16
+
17
+ ## Installation
18
+
19
+ CanTango has been tested to work with _Ruby 1.9+_ and currently doesn't support _Ruby 1.8.7_
20
+ If you require ruby 1.8.7 support, please help patch it and make a pull request ;)
21
+
22
+ ### Install in Ruby environment (or gem set)
23
+
24
+ `gem install cantango`
25
+
26
+ ## Install in Rails application
27
+
28
+ Insert into Gemfile of your Rails application:
29
+
30
+ `gem 'cantango'`
31
+
32
+ If you want to live on the edge and use the latest master branch, use the `:git` option. To designate a specific branch, use the `:branch` option. You can also clone this project and reference your local copy (easier to debug/fix) by using the `:path` option (see *Bundler* documentation).
33
+
34
+ Run bundler in a terminal/console from the folder of your Gemfile (root folder of the app)
35
+
36
+ `$ bundle`
37
+
38
+ ## CanTango components
39
+
40
+ CanTango has now been split up into these logical components:
41
+
42
+ * [Cantango config](https://github.com/kristianmandrup/cantango-config)
43
+ * [Cantango cache](https://github.com/kristianmandrup/cantango-cache)
44
+ * [Cantango model](https://github.com/kristianmandrup/cantango-model)
45
+ * [Cantango masquerade](https://github.com/kristianmandrup/cantango-masquerade)
46
+
47
+ * [Cantango Permits](https://github.com/kristianmandrup/cantango-permits)
48
+ * [Permit store](https://github.com/kristianmandrup/cantango-permit_store)
49
+ * [Permissions](https://github.com/kristianmandrup/cantango-permissions)
50
+
51
+ ## Quickstart
52
+
53
+ See the [Quickstart guide](https://github.com/kristianmandrup/cantango/wiki/Quickstart) in the wiki.
54
+
55
+ For [devise](https://github.com/plataformatec/devise) integration, see [Quickstart CanTango with Devise](https://github.com/kristianmandrup/cantango/wiki/Quickstart-cantango-with-devise)
56
+
57
+ The following scenarios demonstrate some of the problems CanTango can help solve in an elegant way
58
+
59
+ * [Simple scenario](https://github.com/kristianmandrup/cantango/wiki/Simple-scenario)
60
+ * [Complex scenario](https://github.com/kristianmandrup/cantango/wiki/Complex-scenario)
61
+
62
+ ### Generators
63
+
64
+ Cantango comes with a set of [Generators](https://github.com/kristianmandrup/cantango/wiki/Generators) to get your app dancing...
65
+
66
+ Install CanTango using
67
+
68
+ * cantango:install
69
+
70
+ `$ rails g cantango:install`
71
+
72
+ ### Configuration
73
+
74
+ The CanTango [Configuration](https://github.com/kristianmandrup/cantango/wiki/Configuration) consists of a nice nested configuration DSL.
75
+
76
+ ## Contributing to cantango-core
77
+
78
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
79
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
80
+ * Fork the project
81
+ * Start a feature/bugfix branch
82
+ * Commit and push until you are happy with your contribution
83
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
84
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
85
+
86
+ ## Copyright
87
+
88
+ Copyright (c) 2011 Kristian Mandrup. See LICENSE.txt for
89
+ further details.
90
+
data/Rakefile ADDED
@@ -0,0 +1,48 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "cantango-core"
18
+ gem.homepage = "http://github.com/kristianmandrup/cantango"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{CanCan extension with role oriented permission management and more}
21
+ gem.description = %Q{Define your permission rules as role- or role group specific permits.
22
+ Integrates well with multiple Devise user acounts.
23
+ Includes rules caching.
24
+ Store permissions in yaml file or key-value store}
25
+ gem.email = "kmandrup@gmail.com, s.pankevich@gmail.com"
26
+ gem.authors = ["Kristian Mandrup", "Stanislaw Pankevich"]
27
+ # dependencies defined in Gemfile
28
+ end
29
+ Jeweler::RubygemsDotOrgTasks.new
30
+
31
+ require 'rake/testtask'
32
+ Rake::TestTask.new(:test) do |test|
33
+ test.libs << 'lib' << 'test'
34
+ test.pattern = 'test/**/test_*.rb'
35
+ test.verbose = true
36
+ end
37
+
38
+ task :default => :test
39
+
40
+ require 'rdoc/task'
41
+ RDoc::Task.new do |rdoc|
42
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
43
+
44
+ rdoc.rdoc_dir = 'rdoc'
45
+ rdoc.title = "cantango-core #{version}"
46
+ rdoc.rdoc_files.include('README*')
47
+ rdoc.rdoc_files.include('lib/**/*.rb')
48
+ end