cantango 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (578) hide show
  1. data/.document +5 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +58 -0
  4. data/LICENSE.txt +20 -0
  5. data/README.textile +211 -0
  6. data/Rakefile +48 -0
  7. data/VERSION +1 -0
  8. data/cantango.gemspec +658 -0
  9. data/ideas/feature_list.markdown +58 -0
  10. data/lib/cantango.rb +32 -0
  11. data/lib/cantango/ability.rb +56 -0
  12. data/lib/cantango/ability/cache.rb +95 -0
  13. data/lib/cantango/ability/cache/base_cache.rb +26 -0
  14. data/lib/cantango/ability/cache/kompiler.rb +24 -0
  15. data/lib/cantango/ability/cache/moneta_cache.rb +32 -0
  16. data/lib/cantango/ability/cache/session_cache.rb +38 -0
  17. data/lib/cantango/ability/class_methods.rb +27 -0
  18. data/lib/cantango/ability/masquerade_helpers.rb +19 -0
  19. data/lib/cantango/ability/permission_helpers.rb +20 -0
  20. data/lib/cantango/ability/permit_helpers.rb +27 -0
  21. data/lib/cantango/ability/role_helpers.rb +26 -0
  22. data/lib/cantango/ability/scope.rb +20 -0
  23. data/lib/cantango/ability/user_helpers.rb +22 -0
  24. data/lib/cantango/api.rb +5 -0
  25. data/lib/cantango/api/aliases.rb +8 -0
  26. data/lib/cantango/api/aliases/account_permit.rb +8 -0
  27. data/lib/cantango/api/aliases/license.rb +7 -0
  28. data/lib/cantango/api/aliases/permit.rb +9 -0
  29. data/lib/cantango/api/aliases/role_group_permit.rb +7 -0
  30. data/lib/cantango/api/aliases/role_permit.rb +7 -0
  31. data/lib/cantango/api/aliases/user_permit.rb +8 -0
  32. data/lib/cantango/api/common.rb +10 -0
  33. data/lib/cantango/api/options.rb +16 -0
  34. data/lib/cantango/api/user.rb +20 -0
  35. data/lib/cantango/api/user/ability.rb +38 -0
  36. data/lib/cantango/api/user/can.rb +26 -0
  37. data/lib/cantango/api/user/scope.rb +29 -0
  38. data/lib/cantango/api/user_account.rb +20 -0
  39. data/lib/cantango/api/user_account/ability.rb +44 -0
  40. data/lib/cantango/api/user_account/can.rb +26 -0
  41. data/lib/cantango/api/user_account/scope.rb +29 -0
  42. data/lib/cantango/cache.rb +6 -0
  43. data/lib/cantango/cache/moneta_cache.rb +68 -0
  44. data/lib/cantango/cancan/rule.rb +6 -0
  45. data/lib/cantango/configuration.rb +83 -0
  46. data/lib/cantango/configuration/ability.rb +13 -0
  47. data/lib/cantango/configuration/autoload.rb +38 -0
  48. data/lib/cantango/configuration/categories.rb +55 -0
  49. data/lib/cantango/configuration/engines.rb +49 -0
  50. data/lib/cantango/configuration/engines/cache.rb +20 -0
  51. data/lib/cantango/configuration/engines/engine.rb +31 -0
  52. data/lib/cantango/configuration/engines/permission.rb +49 -0
  53. data/lib/cantango/configuration/engines/permit.rb +26 -0
  54. data/lib/cantango/configuration/engines/store.rb +24 -0
  55. data/lib/cantango/configuration/factory.rb +59 -0
  56. data/lib/cantango/configuration/guest.rb +57 -0
  57. data/lib/cantango/configuration/hash_registry.rb +62 -0
  58. data/lib/cantango/configuration/models.rb +48 -0
  59. data/lib/cantango/configuration/registry.rb +53 -0
  60. data/lib/cantango/configuration/role_groups.rb +15 -0
  61. data/lib/cantango/configuration/role_registry.rb +43 -0
  62. data/lib/cantango/configuration/roles.rb +16 -0
  63. data/lib/cantango/configuration/user.rb +47 -0
  64. data/lib/cantango/configuration/user_account.rb +23 -0
  65. data/lib/cantango/configuration/user_accounts.rb +7 -0
  66. data/lib/cantango/configuration/users.rb +7 -0
  67. data/lib/cantango/helpers.rb +5 -0
  68. data/lib/cantango/helpers/role_methods.rb +26 -0
  69. data/lib/cantango/permission_engine.rb +7 -0
  70. data/lib/cantango/permission_engine/builder.rb +6 -0
  71. data/lib/cantango/permission_engine/collector.rb +43 -0
  72. data/lib/cantango/permission_engine/compiler.rb +67 -0
  73. data/lib/cantango/permission_engine/evaluator.rb +34 -0
  74. data/lib/cantango/permission_engine/factory.rb +60 -0
  75. data/lib/cantango/permission_engine/loader.rb +7 -0
  76. data/lib/cantango/permission_engine/loader/base.rb +39 -0
  77. data/lib/cantango/permission_engine/loader/categories.rb +50 -0
  78. data/lib/cantango/permission_engine/loader/permissions.rb +66 -0
  79. data/lib/cantango/permission_engine/moneta_store.rb +30 -0
  80. data/lib/cantango/permission_engine/parser.rb +32 -0
  81. data/lib/cantango/permission_engine/parser/categories.rb +18 -0
  82. data/lib/cantango/permission_engine/parser/category.rb +34 -0
  83. data/lib/cantango/permission_engine/parser/default.rb +20 -0
  84. data/lib/cantango/permission_engine/parser/ownership.rb +32 -0
  85. data/lib/cantango/permission_engine/parser/permissions.rb +33 -0
  86. data/lib/cantango/permission_engine/parser/regex.rb +35 -0
  87. data/lib/cantango/permission_engine/parser/relationship.rb +23 -0
  88. data/lib/cantango/permission_engine/parser/rule.rb +31 -0
  89. data/lib/cantango/permission_engine/permission.rb +40 -0
  90. data/lib/cantango/permission_engine/selector.rb +16 -0
  91. data/lib/cantango/permission_engine/selector/base.rb +19 -0
  92. data/lib/cantango/permission_engine/selector/licenses.rb +19 -0
  93. data/lib/cantango/permission_engine/selector/role_groups.rb +24 -0
  94. data/lib/cantango/permission_engine/selector/roles.rb +25 -0
  95. data/lib/cantango/permission_engine/selector/users.rb +22 -0
  96. data/lib/cantango/permission_engine/statement.rb +14 -0
  97. data/lib/cantango/permission_engine/statements.rb +35 -0
  98. data/lib/cantango/permission_engine/store.rb +33 -0
  99. data/lib/cantango/permission_engine/yaml_store.rb +108 -0
  100. data/lib/cantango/permit_engine.rb +8 -0
  101. data/lib/cantango/permit_engine/account_permit.rb +41 -0
  102. data/lib/cantango/permit_engine/account_permit/builder.rb +22 -0
  103. data/lib/cantango/permit_engine/account_permit/finder.rb +20 -0
  104. data/lib/cantango/permit_engine/builder.rb +8 -0
  105. data/lib/cantango/permit_engine/builder/base.rb +50 -0
  106. data/lib/cantango/permit_engine/builder/special_permits.rb +20 -0
  107. data/lib/cantango/permit_engine/compatibility.rb +20 -0
  108. data/lib/cantango/permit_engine/executor.rb +7 -0
  109. data/lib/cantango/permit_engine/executor/abstract.rb +40 -0
  110. data/lib/cantango/permit_engine/executor/base.rb +51 -0
  111. data/lib/cantango/permit_engine/executor/system.rb +13 -0
  112. data/lib/cantango/permit_engine/factory.rb +45 -0
  113. data/lib/cantango/permit_engine/finder.rb +39 -0
  114. data/lib/cantango/permit_engine/license.rb +37 -0
  115. data/lib/cantango/permit_engine/license/loader.rb +19 -0
  116. data/lib/cantango/permit_engine/license/rules.rb +17 -0
  117. data/lib/cantango/permit_engine/permit.rb +149 -0
  118. data/lib/cantango/permit_engine/role_group_permit.rb +37 -0
  119. data/lib/cantango/permit_engine/role_group_permit/builder.rb +47 -0
  120. data/lib/cantango/permit_engine/role_group_permit/finder.rb +20 -0
  121. data/lib/cantango/permit_engine/role_matcher.rb +13 -0
  122. data/lib/cantango/permit_engine/role_permit.rb +38 -0
  123. data/lib/cantango/permit_engine/role_permit/builder.rb +46 -0
  124. data/lib/cantango/permit_engine/role_permit/finder.rb +19 -0
  125. data/lib/cantango/permit_engine/user_permit.rb +40 -0
  126. data/lib/cantango/permit_engine/user_permit/builder.rb +21 -0
  127. data/lib/cantango/permit_engine/user_permit/finder.rb +20 -0
  128. data/lib/cantango/permit_engine/util.rb +19 -0
  129. data/lib/cantango/rails.rb +5 -0
  130. data/lib/cantango/rails/base_helpers.rb +26 -0
  131. data/lib/cantango/rails/controller_helpers.rb +15 -0
  132. data/lib/cantango/rails/engine.rb +47 -0
  133. data/lib/cantango/rails/railtie.rb +7 -0
  134. data/lib/cantango/rails/view_helpers.rb +15 -0
  135. data/lib/cantango/rspec.rb +1 -0
  136. data/lib/cantango/rspec/config.rb +9 -0
  137. data/lib/cantango/rspec/matchers.rb +9 -0
  138. data/lib/cantango/rspec/matchers/be_allowed_to.rb +26 -0
  139. data/lib/cantango/rspec/matchers/have_license.rb +11 -0
  140. data/lib/cantango/rspec/matchers/have_license_class.rb +14 -0
  141. data/lib/cantango/rspec/matchers/have_license_file.rb +82 -0
  142. data/lib/cantango/rules.rb +23 -0
  143. data/lib/cantango/rules/adaptor.rb +32 -0
  144. data/lib/cantango/rules/adaptor/active_record.rb +13 -0
  145. data/lib/cantango/rules/adaptor/generic.rb +16 -0
  146. data/lib/cantango/rules/adaptor/mongoid.rb +13 -0
  147. data/lib/cantango/rules/dsl.rb +24 -0
  148. data/lib/cantango/rules/rule_class.rb +11 -0
  149. data/lib/cantango/rules/scope.rb +24 -0
  150. data/lib/cantango/rules/user_relation.rb +68 -0
  151. data/lib/cantango/users.rb +5 -0
  152. data/lib/cantango/users/macros.rb +9 -0
  153. data/lib/cantango/users/masquerade.rb +22 -0
  154. data/lib/cantango/users/masquerade/session_active_user.rb +18 -0
  155. data/lib/cantango/users/user.rb +30 -0
  156. data/lib/cantango/users/user_account.rb +23 -0
  157. data/lib/generators/cantango/base.rb +52 -0
  158. data/lib/generators/cantango/license/license_generator.rb +34 -0
  159. data/lib/generators/cantango/license/templates/license.erb +10 -0
  160. data/lib/generators/cantango/license_base.rb +15 -0
  161. data/lib/generators/cantango/licenses/licenses_generator.rb +31 -0
  162. data/lib/generators/cantango/permit_generator.rb +36 -0
  163. data/lib/generators/cantango/role_permit/role_permit_generator.rb +42 -0
  164. data/lib/generators/cantango/role_permit/templates/account_permit.erb +4 -0
  165. data/lib/generators/cantango/role_permit/templates/role_group_permit.erb +14 -0
  166. data/lib/generators/cantango/role_permit/templates/role_permit.erb +13 -0
  167. data/lib/generators/cantango/role_permits/role_permits_generator.rb +127 -0
  168. data/spec/Note_on_licenses.textile +44 -0
  169. data/spec/Refactor_into_engines.textile +115 -0
  170. data/spec/TODO +7 -0
  171. data/spec/active_record/AR_README.textile +20 -0
  172. data/spec/active_record/config_helper.rb +108 -0
  173. data/spec/active_record/db/database.yml +4 -0
  174. data/spec/active_record/helper/ar_config.rb +19 -0
  175. data/spec/active_record/helper/permits_config.rb +12 -0
  176. data/spec/active_record/helper/rails_config.rb +6 -0
  177. data/spec/active_record/helper/rspec_config.rb +20 -0
  178. data/spec/active_record/migrations/001_create_user.rb +14 -0
  179. data/spec/active_record/migrations/002_create_comment.rb +13 -0
  180. data/spec/active_record/migrations/003_create_post.rb +13 -0
  181. data/spec/active_record/migrations/004_create_article.rb +13 -0
  182. data/spec/active_record/migrations/005_create_account.rb +13 -0
  183. data/spec/active_record/migrations/006_create_todo.rb +12 -0
  184. data/spec/active_record/migrations/007_create_user_todos.rb +13 -0
  185. data/spec/active_record/scenarios/SCENARIOS README.textile +19 -0
  186. data/spec/active_record/scenarios/engines/permission_engine/cantango_permissions.yml +63 -0
  187. data/spec/active_record/scenarios/engines/permission_engine/categories.yml +6 -0
  188. data/spec/active_record/scenarios/engines/permission_engine/tango_permission_yml_spec.rb +77 -0
  189. data/spec/active_record/scenarios/engines/permission_engine/users.rb +88 -0
  190. data/spec/active_record/scenarios/engines/permit_engine/licenses_spec.rb +37 -0
  191. data/spec/active_record/scenarios/engines/permit_engine/role_groups_permits_spec.rb +35 -0
  192. data/spec/active_record/scenarios/guest_user_admin/admin_user_spec.rb +19 -0
  193. data/spec/active_record/scenarios/guest_user_admin/docs/GUEST_ADMIN_USER_SCENARIO.textile +20 -0
  194. data/spec/active_record/scenarios/guest_user_admin/editor_spec.rb +19 -0
  195. data/spec/active_record/scenarios/guest_user_admin/guest_user_spec.rb +16 -0
  196. data/spec/active_record/scenarios/guest_user_admin/user_having_user_and_editor_roles_spec.rb +19 -0
  197. data/spec/active_record/scenarios/guest_user_admin/user_spec.rb +32 -0
  198. data/spec/active_record/scenarios/masquerading/masquerading_for_admin_account_spec.rb +41 -0
  199. data/spec/active_record/scenarios/masquerading/masquerading_for_admin_user_spec.rb +38 -0
  200. data/spec/active_record/scenarios/shared/api.rb +4 -0
  201. data/spec/active_record/scenarios/shared/can_tango.rb +2 -0
  202. data/spec/active_record/scenarios/shared/examples/user_accounts.rb +47 -0
  203. data/spec/active_record/scenarios/shared/examples/users.rb +85 -0
  204. data/spec/active_record/scenarios/shared/licenses/musicians_license.rb +12 -0
  205. data/spec/active_record/scenarios/shared/models/items.rb +26 -0
  206. data/spec/active_record/scenarios/shared/models/todo.rb +4 -0
  207. data/spec/active_record/scenarios/shared/models/user_todo.rb +4 -0
  208. data/spec/active_record/scenarios/shared/models/users.rb +46 -0
  209. data/spec/active_record/scenarios/shared/permits/PERMITS README.textile +3 -0
  210. data/spec/active_record/scenarios/shared/permits/account_permits/admin_account_permit.rb +30 -0
  211. data/spec/active_record/scenarios/shared/permits/account_permits/guest_account_permit.rb +16 -0
  212. data/spec/active_record/scenarios/shared/permits/account_permits/user_account_permit.rb +46 -0
  213. data/spec/active_record/scenarios/shared/permits/role/admin_permit.rb +11 -0
  214. data/spec/active_record/scenarios/shared/permits/role/editor_permit.rb +42 -0
  215. data/spec/active_record/scenarios/shared/permits/role/guest_permit.rb +26 -0
  216. data/spec/active_record/scenarios/shared/permits/role/super_admin_permit.rb +9 -0
  217. data/spec/active_record/scenarios/shared/permits/role/user_permit.rb +49 -0
  218. data/spec/active_record/scenarios/shared/permits/role_group/bloggers_permit.rb +8 -0
  219. data/spec/active_record/scenarios/shared/permits/role_group/musicians_permit.rb +9 -0
  220. data/spec/active_record/scenarios/shared/permits/special/any_role_permit.rb +10 -0
  221. data/spec/active_record/scenarios/shared/permits/special/system_role_permit.rb +10 -0
  222. data/spec/active_record/scenarios/user_accounts/admin_account_spec.rb +34 -0
  223. data/spec/active_record/scenarios/user_accounts/config/account_permits.yml +0 -0
  224. data/spec/active_record/scenarios/user_accounts/docs/USER_ACCOUNTS_SCENARIO.textile +20 -0
  225. data/spec/active_record/scenarios/user_accounts/docs/basic_rules_spec_possible_samples.txt +84 -0
  226. data/spec/active_record/scenarios/user_accounts/guest_account_spec.rb +34 -0
  227. data/spec/active_record/scenarios/user_accounts/helpers.rb +5 -0
  228. data/spec/active_record/scenarios/user_accounts/helpers/account_setup.rb +41 -0
  229. data/spec/active_record/scenarios/user_accounts/helpers/user_factory.rb +19 -0
  230. data/spec/active_record/scenarios/user_accounts/permits/admin_account_permit.rb +28 -0
  231. data/spec/active_record/scenarios/user_accounts/permits/guest_account_permit.rb +14 -0
  232. data/spec/active_record/scenarios/user_accounts/permits/user_account_permit.rb +43 -0
  233. data/spec/active_record/scenarios/user_accounts/user_account_spec.rb +36 -0
  234. data/spec/active_record/spec_helper.rb +19 -0
  235. data/spec/cantango/README.textile +3 -0
  236. data/spec/cantango/ability/cache/compiler_spec.rb +45 -0
  237. data/spec/cantango/ability/cache/session_cache_spec.rb +11 -0
  238. data/spec/cantango/ability/cache_spec.rb +107 -0
  239. data/spec/cantango/ability_filters_spec.rb +128 -0
  240. data/spec/cantango/ability_spec.rb +74 -0
  241. data/spec/cantango/api/current_user_accounts.rb +14 -0
  242. data/spec/cantango/api/current_users.rb +10 -0
  243. data/spec/cantango/api/user/ability_api_spec.rb +44 -0
  244. data/spec/cantango/api/user/can_api_spec.rb +109 -0
  245. data/spec/cantango/api/user/scope_api_spec.rb +65 -0
  246. data/spec/cantango/api/user_account/ability_api_spec.rb +29 -0
  247. data/spec/cantango/api/user_account/can_api_spec.rb +82 -0
  248. data/spec/cantango/api/user_account/scope_api_spec.rb +0 -0
  249. data/spec/cantango/api/user_account_api_spec.rb +0 -0
  250. data/spec/cantango/api/user_api_spec.rb +0 -0
  251. data/spec/cantango/configuration/ability_spec.rb +13 -0
  252. data/spec/cantango/configuration/autoload_spec.rb +53 -0
  253. data/spec/cantango/configuration/categories_spec.rb +60 -0
  254. data/spec/cantango/configuration/engines/cache_spec.rb +19 -0
  255. data/spec/cantango/configuration/engines/engine_shared.rb +22 -0
  256. data/spec/cantango/configuration/engines/permission_spec.rb +31 -0
  257. data/spec/cantango/configuration/engines/permit_spec.rb +16 -0
  258. data/spec/cantango/configuration/engines/store_engine_shared.rb +16 -0
  259. data/spec/cantango/configuration/engines/store_shared.rb +36 -0
  260. data/spec/cantango/configuration/engines_spec.rb +41 -0
  261. data/spec/cantango/configuration/factory_spec.rb +20 -0
  262. data/spec/cantango/configuration/guest/find_guest_default_way_spec.rb +33 -0
  263. data/spec/cantango/configuration/guest_spec.rb +62 -0
  264. data/spec/cantango/configuration/hash_registry_spec.rb +17 -0
  265. data/spec/cantango/configuration/registry_spec.rb +17 -0
  266. data/spec/cantango/configuration/role_groups_spec.rb +15 -0
  267. data/spec/cantango/configuration/roles_spec.rb +16 -0
  268. data/spec/cantango/configuration/shared/factory_ex.rb +40 -0
  269. data/spec/cantango/configuration/shared/hash_registry_ex.rb +65 -0
  270. data/spec/cantango/configuration/shared/registry_ex.rb +39 -0
  271. data/spec/cantango/configuration/shared/role_registry_ex.rb +22 -0
  272. data/spec/cantango/configuration/user_account_spec.rb +26 -0
  273. data/spec/cantango/configuration/user_spec.rb +46 -0
  274. data/spec/cantango/configuration_spec.rb +42 -0
  275. data/spec/cantango/license/save_license_spec.rb +24 -0
  276. data/spec/cantango/models/items.rb +12 -0
  277. data/spec/cantango/models/users.rb +13 -0
  278. data/spec/cantango/moneta_spec.rb +31 -0
  279. data/spec/cantango/parser/categories_spec.rb +0 -0
  280. data/spec/cantango/parser/permissions_spec.rb +0 -0
  281. data/spec/cantango/permission_engine/PERMISSION_STORE.textile +75 -0
  282. data/spec/cantango/permission_engine/categories_store_spec.rb +10 -0
  283. data/spec/cantango/permission_engine/compiler_spec.rb +32 -0
  284. data/spec/cantango/permission_engine/loader/categories_spec.rb +19 -0
  285. data/spec/cantango/permission_engine/loader/permissions/cantango_permissions_loader.rb +27 -0
  286. data/spec/cantango/permission_engine/loader/permissions/shared.rb +9 -0
  287. data/spec/cantango/permission_engine/moneta_store_spec.rb +0 -0
  288. data/spec/cantango/permission_engine/parser_spec.rb +39 -0
  289. data/spec/cantango/permission_engine/permission_spec.rb +35 -0
  290. data/spec/cantango/permission_engine/permission_store_spec.rb +10 -0
  291. data/spec/cantango/permission_engine/shared_examples.rb +22 -0
  292. data/spec/cantango/permission_engine/store_spec.rb +8 -0
  293. data/spec/cantango/permission_engine/user_permission_store_spec.rb +12 -0
  294. data/spec/cantango/permission_engine/yaml_store_spec.rb +83 -0
  295. data/spec/cantango/permit_engine/account_permit_spec.rb +47 -0
  296. data/spec/cantango/permit_engine/builder/role_group_permits_spec.rb +63 -0
  297. data/spec/cantango/permit_engine/builder/role_permits_spec.rb +58 -0
  298. data/spec/cantango/permit_engine/builder/special_permits_spec.rb +42 -0
  299. data/spec/cantango/permit_engine/executor/system_spec.rb +61 -0
  300. data/spec/cantango/permit_engine/factory_spec.rb +50 -0
  301. data/spec/cantango/permit_engine/finder_spec.rb +70 -0
  302. data/spec/cantango/permit_engine/permit/permit_static_and_dynamic_rules_spec.rb +74 -0
  303. data/spec/cantango/permit_engine/role_group_permit_spec.rb +43 -0
  304. data/spec/cantango/permit_engine/role_permit_spec.rb +44 -0
  305. data/spec/cantango/permit_engine/user_permit_spec.rb +41 -0
  306. data/spec/cantango/rules_spec.rb +55 -0
  307. data/spec/devise-dummy/Rakefile +7 -0
  308. data/spec/devise-dummy/app/controllers/accounts_controller.rb +25 -0
  309. data/spec/devise-dummy/app/controllers/application_controller.rb +3 -0
  310. data/spec/devise-dummy/app/controllers/articles_controller.rb +48 -0
  311. data/spec/devise-dummy/app/controllers/comments_controller.rb +40 -0
  312. data/spec/devise-dummy/app/controllers/concertos_controller.rb +49 -0
  313. data/spec/devise-dummy/app/controllers/main_controller.rb +8 -0
  314. data/spec/devise-dummy/app/controllers/posts_controller.rb +49 -0
  315. data/spec/devise-dummy/app/controllers/users_controller.rb +25 -0
  316. data/spec/devise-dummy/app/helpers/application_helper.rb +2 -0
  317. data/spec/devise-dummy/app/models/account_setup.rb +41 -0
  318. data/spec/devise-dummy/app/models/admin.rb +11 -0
  319. data/spec/devise-dummy/app/models/article.rb +6 -0
  320. data/spec/devise-dummy/app/models/comment.rb +5 -0
  321. data/spec/devise-dummy/app/models/concerto.rb +6 -0
  322. data/spec/devise-dummy/app/models/guest.rb +34 -0
  323. data/spec/devise-dummy/app/models/improvisation.rb +2 -0
  324. data/spec/devise-dummy/app/models/post.rb +5 -0
  325. data/spec/devise-dummy/app/models/song.rb +3 -0
  326. data/spec/devise-dummy/app/models/tune.rb +3 -0
  327. data/spec/devise-dummy/app/models/user.rb +22 -0
  328. data/spec/devise-dummy/app/permits/accounts/admin/roles/editor_permit.rb +15 -0
  329. data/spec/devise-dummy/app/permits/licenses/bloggers_license.rb +12 -0
  330. data/spec/devise-dummy/app/permits/licenses/musicians_license.rb +13 -0
  331. data/spec/devise-dummy/app/permits/role_groups/editor_permit.rb +13 -0
  332. data/spec/devise-dummy/app/permits/roles/admin_permit.rb +12 -0
  333. data/spec/devise-dummy/app/permits/roles/guest_permit.rb +12 -0
  334. data/spec/devise-dummy/app/permits/roles/user_permit.rb +14 -0
  335. data/spec/devise-dummy/app/views/articles/admin.html.haml +20 -0
  336. data/spec/devise-dummy/app/views/articles/admin_account.html.haml +20 -0
  337. data/spec/devise-dummy/app/views/articles/guest.html.haml +20 -0
  338. data/spec/devise-dummy/app/views/articles/index.html.haml +23 -0
  339. data/spec/devise-dummy/app/views/articles/show.html.haml +10 -0
  340. data/spec/devise-dummy/app/views/comments/guest.html.haml +20 -0
  341. data/spec/devise-dummy/app/views/comments/index.html.haml +20 -0
  342. data/spec/devise-dummy/app/views/concertos/admin.html.haml +19 -0
  343. data/spec/devise-dummy/app/views/concertos/admin_account.html.haml +20 -0
  344. data/spec/devise-dummy/app/views/concertos/guest.html.haml +20 -0
  345. data/spec/devise-dummy/app/views/concertos/index.html.haml +19 -0
  346. data/spec/devise-dummy/app/views/concertos/show.html.haml +10 -0
  347. data/spec/devise-dummy/app/views/devise/confirmations/new.html.erb +12 -0
  348. data/spec/devise-dummy/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  349. data/spec/devise-dummy/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  350. data/spec/devise-dummy/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  351. data/spec/devise-dummy/app/views/devise/passwords/edit.html.erb +16 -0
  352. data/spec/devise-dummy/app/views/devise/passwords/new.html.erb +12 -0
  353. data/spec/devise-dummy/app/views/devise/registrations/edit.html.erb +25 -0
  354. data/spec/devise-dummy/app/views/devise/registrations/new.html.erb +18 -0
  355. data/spec/devise-dummy/app/views/devise/sessions/new.html.erb +17 -0
  356. data/spec/devise-dummy/app/views/devise/shared/_links.erb +25 -0
  357. data/spec/devise-dummy/app/views/devise/unlocks/new.html.erb +12 -0
  358. data/spec/devise-dummy/app/views/layouts/application.html.erb +14 -0
  359. data/spec/devise-dummy/app/views/main/index.html.haml +1 -0
  360. data/spec/devise-dummy/app/views/posts/admin.html.haml +20 -0
  361. data/spec/devise-dummy/app/views/posts/admin_account.html.haml +20 -0
  362. data/spec/devise-dummy/app/views/posts/guest.html.haml +20 -0
  363. data/spec/devise-dummy/app/views/posts/index.html.haml +19 -0
  364. data/spec/devise-dummy/app/views/posts/show.html.haml +11 -0
  365. data/spec/devise-dummy/app/views/users/admin.html.haml +19 -0
  366. data/spec/devise-dummy/app/views/users/admin_account.html.haml +19 -0
  367. data/spec/devise-dummy/app/views/users/guest.html.haml +19 -0
  368. data/spec/devise-dummy/app/views/users/index.html.haml +19 -0
  369. data/spec/devise-dummy/app/views/users/show.html.haml +11 -0
  370. data/spec/devise-dummy/config.ru +4 -0
  371. data/spec/devise-dummy/config/application.rb +46 -0
  372. data/spec/devise-dummy/config/boot.rb +10 -0
  373. data/spec/devise-dummy/config/cantango_permissions.yml +50 -0
  374. data/spec/devise-dummy/config/categories.yml +10 -0
  375. data/spec/devise-dummy/config/database.yml +22 -0
  376. data/spec/devise-dummy/config/environment.rb +5 -0
  377. data/spec/devise-dummy/config/environments/development.rb +26 -0
  378. data/spec/devise-dummy/config/environments/production.rb +49 -0
  379. data/spec/devise-dummy/config/environments/test.rb +35 -0
  380. data/spec/devise-dummy/config/initializers/backtrace_silencers.rb +7 -0
  381. data/spec/devise-dummy/config/initializers/cantango.rb +8 -0
  382. data/spec/devise-dummy/config/initializers/devise.rb +204 -0
  383. data/spec/devise-dummy/config/initializers/inflections.rb +10 -0
  384. data/spec/devise-dummy/config/initializers/mime_types.rb +5 -0
  385. data/spec/devise-dummy/config/initializers/secret_token.rb +7 -0
  386. data/spec/devise-dummy/config/initializers/session_store.rb +8 -0
  387. data/spec/devise-dummy/config/initializers/simple_roles.rb +42 -0
  388. data/spec/devise-dummy/config/locales/devise.en.yml +53 -0
  389. data/spec/devise-dummy/config/locales/en.yml +5 -0
  390. data/spec/devise-dummy/config/routes.rb +88 -0
  391. data/spec/devise-dummy/db/migrate/002_create_comment.rb +13 -0
  392. data/spec/devise-dummy/db/migrate/003_create_post.rb +14 -0
  393. data/spec/devise-dummy/db/migrate/004_create_article.rb +14 -0
  394. data/spec/devise-dummy/db/migrate/005_create_account.rb +13 -0
  395. data/spec/devise-dummy/db/migrate/006_create_concerto.rb +14 -0
  396. data/spec/devise-dummy/db/migrate/007_devise_create_users.rb +31 -0
  397. data/spec/devise-dummy/db/schema.rb +75 -0
  398. data/spec/devise-dummy/db/seeds.rb +5 -0
  399. data/spec/devise-dummy/db/users.txt +7 -0
  400. data/spec/devise-dummy/public/404.html +26 -0
  401. data/spec/devise-dummy/public/422.html +26 -0
  402. data/spec/devise-dummy/public/500.html +26 -0
  403. data/spec/devise-dummy/public/favicon.ico +0 -0
  404. data/spec/devise-dummy/public/javascripts/application.js +2 -0
  405. data/spec/devise-dummy/public/javascripts/controls.js +965 -0
  406. data/spec/devise-dummy/public/javascripts/dragdrop.js +974 -0
  407. data/spec/devise-dummy/public/javascripts/effects.js +1123 -0
  408. data/spec/devise-dummy/public/javascripts/prototype.js +6001 -0
  409. data/spec/devise-dummy/public/javascripts/rails.js +191 -0
  410. data/spec/devise-dummy/public/stylesheets/.gitkeep +0 -0
  411. data/spec/devise-dummy/script/rails +6 -0
  412. data/spec/devise-dummy_spec_helper.rb +41 -0
  413. data/spec/devise-integration/concerto_spec.rb +80 -0
  414. data/spec/dummy/Rakefile +7 -0
  415. data/spec/dummy/app/controllers/accounts_controller.rb +23 -0
  416. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  417. data/spec/dummy/app/controllers/articles_controller.rb +55 -0
  418. data/spec/dummy/app/controllers/comments_controller.rb +38 -0
  419. data/spec/dummy/app/controllers/concertos_controller.rb +43 -0
  420. data/spec/dummy/app/controllers/main_controller.rb +8 -0
  421. data/spec/dummy/app/controllers/posts_controller.rb +47 -0
  422. data/spec/dummy/app/controllers/sessions_controller.rb +16 -0
  423. data/spec/dummy/app/controllers/users_controller.rb +23 -0
  424. data/spec/dummy/app/helpers/application_helper.rb +37 -0
  425. data/spec/dummy/app/models/account_setup.rb +41 -0
  426. data/spec/dummy/app/models/admin.rb +4 -0
  427. data/spec/dummy/app/models/article.rb +6 -0
  428. data/spec/dummy/app/models/comment.rb +5 -0
  429. data/spec/dummy/app/models/concerto.rb +6 -0
  430. data/spec/dummy/app/models/guest.rb +27 -0
  431. data/spec/dummy/app/models/improvisation.rb +2 -0
  432. data/spec/dummy/app/models/post.rb +5 -0
  433. data/spec/dummy/app/models/song.rb +3 -0
  434. data/spec/dummy/app/models/tune.rb +3 -0
  435. data/spec/dummy/app/models/user.rb +12 -0
  436. data/spec/dummy/app/permits/accounts/admin/roles/editor_permit.rb +15 -0
  437. data/spec/dummy/app/permits/licenses/bloggers_license.rb +12 -0
  438. data/spec/dummy/app/permits/licenses/musicians_license.rb +13 -0
  439. data/spec/dummy/app/permits/role_groups/editor_permit.rb +13 -0
  440. data/spec/dummy/app/permits/roles/admin_permit.rb +12 -0
  441. data/spec/dummy/app/permits/roles/guest_permit.rb +12 -0
  442. data/spec/dummy/app/permits/roles/user_permit.rb +18 -0
  443. data/spec/dummy/app/views/articles/admin.html.haml +20 -0
  444. data/spec/dummy/app/views/articles/admin_account.html.haml +20 -0
  445. data/spec/dummy/app/views/articles/guest.html.haml +20 -0
  446. data/spec/dummy/app/views/articles/index.html.haml +23 -0
  447. data/spec/dummy/app/views/articles/show.html.haml +10 -0
  448. data/spec/dummy/app/views/comments/guest.html.haml +20 -0
  449. data/spec/dummy/app/views/comments/index.html.haml +20 -0
  450. data/spec/dummy/app/views/concertos/admin.html.haml +20 -0
  451. data/spec/dummy/app/views/concertos/admin_account.html.haml +20 -0
  452. data/spec/dummy/app/views/concertos/guest.html.haml +20 -0
  453. data/spec/dummy/app/views/concertos/index.html.haml +19 -0
  454. data/spec/dummy/app/views/concertos/show.html.haml +10 -0
  455. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  456. data/spec/dummy/app/views/main/index.html.haml +1 -0
  457. data/spec/dummy/app/views/posts/admin.html.haml +20 -0
  458. data/spec/dummy/app/views/posts/admin_account.html.haml +20 -0
  459. data/spec/dummy/app/views/posts/guest.html.haml +20 -0
  460. data/spec/dummy/app/views/posts/index.html.haml +19 -0
  461. data/spec/dummy/app/views/posts/show.html.haml +11 -0
  462. data/spec/dummy/app/views/users/admin.html.haml +19 -0
  463. data/spec/dummy/app/views/users/admin_account.html.haml +19 -0
  464. data/spec/dummy/app/views/users/guest.html.haml +19 -0
  465. data/spec/dummy/app/views/users/index.html.haml +19 -0
  466. data/spec/dummy/app/views/users/show.html.haml +11 -0
  467. data/spec/dummy/config.ru +4 -0
  468. data/spec/dummy/config/application.rb +43 -0
  469. data/spec/dummy/config/boot.rb +10 -0
  470. data/spec/dummy/config/cantango_permissions.yml +50 -0
  471. data/spec/dummy/config/categories.yml +10 -0
  472. data/spec/dummy/config/database.yml +22 -0
  473. data/spec/dummy/config/environment.rb +5 -0
  474. data/spec/dummy/config/environments/development.rb +26 -0
  475. data/spec/dummy/config/environments/production.rb +49 -0
  476. data/spec/dummy/config/environments/test.rb +35 -0
  477. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  478. data/spec/dummy/config/initializers/cantango.rb +5 -0
  479. data/spec/dummy/config/initializers/inflections.rb +10 -0
  480. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  481. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  482. data/spec/dummy/config/initializers/session_store.rb +8 -0
  483. data/spec/dummy/config/initializers/simple_roles.rb +44 -0
  484. data/spec/dummy/config/locales/en.yml +5 -0
  485. data/spec/dummy/config/routes.rb +84 -0
  486. data/spec/dummy/db/migrate/001_create_user.rb +16 -0
  487. data/spec/dummy/db/migrate/002_create_comment.rb +13 -0
  488. data/spec/dummy/db/migrate/003_create_post.rb +14 -0
  489. data/spec/dummy/db/migrate/004_create_article.rb +14 -0
  490. data/spec/dummy/db/migrate/005_create_account.rb +13 -0
  491. data/spec/dummy/db/migrate/006_create_concerto.rb +14 -0
  492. data/spec/dummy/public/404.html +26 -0
  493. data/spec/dummy/public/422.html +26 -0
  494. data/spec/dummy/public/500.html +26 -0
  495. data/spec/dummy/public/favicon.ico +0 -0
  496. data/spec/dummy/public/javascripts/application.js +2 -0
  497. data/spec/dummy/public/javascripts/controls.js +965 -0
  498. data/spec/dummy/public/javascripts/dragdrop.js +974 -0
  499. data/spec/dummy/public/javascripts/effects.js +1123 -0
  500. data/spec/dummy/public/javascripts/prototype.js +6001 -0
  501. data/spec/dummy/public/javascripts/rails.js +191 -0
  502. data/spec/dummy/public/stylesheets/.gitkeep +0 -0
  503. data/spec/dummy/script/rails +6 -0
  504. data/spec/dummy/tmp/pids/server.pid +1 -0
  505. data/spec/dummy_spec_helper.rb +43 -0
  506. data/spec/entire_suite_spec.rb +15 -0
  507. data/spec/factories.rb +8 -0
  508. data/spec/fixtures/config/cantango_permissions.yml +48 -0
  509. data/spec/fixtures/config/categories.yml +6 -0
  510. data/spec/fixtures/config/evaluator_fixtures.yml +18 -0
  511. data/spec/fixtures/config/licenses.yml +4 -0
  512. data/spec/fixtures/config/permissions.yml +19 -0
  513. data/spec/fixtures/config/role_group.yml +4 -0
  514. data/spec/fixtures/config/roles.yml +4 -0
  515. data/spec/fixtures/config/user_permissions.yml +8 -0
  516. data/spec/fixtures/models.rb +2 -0
  517. data/spec/fixtures/models/items.rb +8 -0
  518. data/spec/fixtures/models/simple_roles.rb +44 -0
  519. data/spec/fixtures/models/user.rb +22 -0
  520. data/spec/fixtures/models/user_account.rb +21 -0
  521. data/spec/fixtures/tango_fixtures.rb +29 -0
  522. data/spec/generators/cantango/account_role_permit_generator_spec.rb +35 -0
  523. data/spec/generators/cantango/account_role_permits_generator_spec.rb +59 -0
  524. data/spec/generators/cantango/license_generator_spec.rb +33 -0
  525. data/spec/generators/cantango/licenses_generator_spec.rb +58 -0
  526. data/spec/generators/cantango/role_permit_generator_spec.rb +35 -0
  527. data/spec/generators/cantango/role_permits_generator_spec.rb +58 -0
  528. data/spec/helpers/dummy_app_ability.rb +26 -0
  529. data/spec/integration/Design_notes.textile +30 -0
  530. data/spec/integration/admin_user/masquerade_spec.rb +22 -0
  531. data/spec/integration/cache_using_moneta_spec.rb +46 -0
  532. data/spec/integration/cache_using_session_spec.rb +46 -0
  533. data/spec/integration/main_spec.rb +16 -0
  534. data/spec/integration/performance/ability_initialize_performance.rb +54 -0
  535. data/spec/integration/performance/cache_performance.rb +31 -0
  536. data/spec/integration/performance/can_performance.rb +54 -0
  537. data/spec/integration/performance/helpers/ability.rb +44 -0
  538. data/spec/integration/performance/helpers/ability_api.rb +44 -0
  539. data/spec/integration/performance/helpers/ability_raw.rb +8 -0
  540. data/spec/integration/performance/helpers/cache.rb +37 -0
  541. data/spec/integration/performance/helpers/rules.rb +12 -0
  542. data/spec/integration/performance/integral_performance_caching_disabled.rb +33 -0
  543. data/spec/integration/performance/integral_performance_caching_enabled.rb +33 -0
  544. data/spec/integration/performance/raw_performance.rb +11 -0
  545. data/spec/integration/user/articles_spec.rb +39 -0
  546. data/spec/integration/user/concerto_spec.rb +39 -0
  547. data/spec/note_on_caching_and_dynamic.textile +114 -0
  548. data/spec/path_helper.rb +9 -0
  549. data/spec/simple_roles.rb +46 -0
  550. data/spec/spec_helper.rb +22 -0
  551. data/wiki/ability/initialize.markdown +45 -0
  552. data/wiki/api/user/api.markdown +88 -0
  553. data/wiki/api/user_account/api.markdown +88 -0
  554. data/wiki/config/ability.markdown +18 -0
  555. data/wiki/config/autoload.markdown +31 -0
  556. data/wiki/config/guest.markdown +49 -0
  557. data/wiki/config/models_registration.markdown +16 -0
  558. data/wiki/config/role_groups.markdown +1 -0
  559. data/wiki/config/roles.markdown +1 -0
  560. data/wiki/engines/cache/config.markdown +31 -0
  561. data/wiki/engines/cache/session_store.markdown +0 -0
  562. data/wiki/engines/cache/store.markdown +6 -0
  563. data/wiki/engines/permissions/categories.markdown +33 -0
  564. data/wiki/engines/permissions/config.markdown +60 -0
  565. data/wiki/engines/permissions/moneta_store.markdown +0 -0
  566. data/wiki/engines/permissions/store.markdown +0 -0
  567. data/wiki/engines/permissions/yaml_store.markdown +0 -0
  568. data/wiki/engines/permits/config.markdown +0 -0
  569. data/wiki/engines/permits/licenses.markdown +0 -0
  570. data/wiki/engines/permits/role_groups.markdown +0 -0
  571. data/wiki/engines/permits/roles.markdown +0 -0
  572. data/wiki/engines/permits/user_accounts.markdown +0 -0
  573. data/wiki/feature_list.markdown +39 -0
  574. data/wiki/rules_caching.markdown +17 -0
  575. data/wiki/users/masquerading.markdown +29 -0
  576. data/wiki/when_to_use.markdown +64 -0
  577. data/wiki/why_to_use.markdown +11 -0
  578. metadata +788 -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 @@
1
+ --format nested --color
data/Gemfile ADDED
@@ -0,0 +1,58 @@
1
+ source 'http://rubygems.org'
2
+
3
+ group :default do
4
+ gem 'rails', '>= 3.0.1'
5
+ gem 'cancan', '>= 1.4'
6
+ gem 'sugar-high', '>= 0.5'
7
+ gem 'sqlite3'
8
+ gem 'hashie', '>= 0.4'
9
+ gem 'sourcify'
10
+ gem 'dkastner-moneta', '>= 1.0'
11
+ gem "friendly_id"
12
+
13
+ # adapters
14
+ gem 'meta_where'
15
+ # gem 'mongoid'
16
+ end
17
+
18
+ group :test do
19
+ gem 'require_all', '~> 1.2.0'
20
+
21
+ # Data
22
+ gem 'database_cleaner', :git => "git://github.com/kristianmandrup/database_cleaner.git"
23
+
24
+ gem 'factory_girl'
25
+
26
+ # Specs
27
+ gem 'spork'
28
+ gem "rspec-rails", '>= 2.5'
29
+ gem 'capybara'
30
+ gem 'rails-app-spec'
31
+ gem 'mocha'
32
+ gem "launchy"
33
+
34
+ gem 'cutter'
35
+
36
+ # Rails
37
+ gem 'haml'
38
+ gem 'decent_exposure'
39
+
40
+ # integration
41
+ gem "devise"
42
+
43
+ # Generators
44
+ gem 'generator-spec'
45
+ end
46
+
47
+ group :development do
48
+ gem 'devise'
49
+ gem "rspec", ">= 2.5.0"
50
+ gem "jeweler", ">= 1.6.4"
51
+ gem "bundler", "~> 1.0.10"
52
+ gem "rdoc"
53
+
54
+ # gem 'logging_assist'
55
+ # gem 'meta_where'
56
+ # gem 'mongoid'
57
+ end
58
+
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.textile ADDED
@@ -0,0 +1,211 @@
1
+ h1. CanTango
2
+
3
+ CanTango extends "CanCan":http://github.com/ryanb/cancan and offers a role oriented
4
+ permissions design. CanTango also integrates well with "Devise":https://github.com/plataformatec/devise and scenarios with multiple user accounts.
5
+
6
+ h2. Supported ruby versions
7
+
8
+ Tested to work with:
9
+ * Ruby 1.9+
10
+
11
+ Currently doesn't support:
12
+ * Ruby 1.8.7
13
+
14
+ h2. August 15, RC4 released!
15
+
16
+ Today marks the first CanTango release, version 0.8.0.
17
+ The project includes two working dummy apps (see spec folder).
18
+
19
+ * "dummy" - how to use CanTango in a Rails 3 app without Devise.
20
+ * "devise-dummy" - integration _with_ Devise :)
21
+
22
+ Enjoy!
23
+
24
+ h2. Should I use CanTango for my permission requirements?
25
+
26
+ * "CanCan vs CanTango":https://github.com/kristianmandrup/cantango/wiki/CanCan-vs-CanTango
27
+ * "CanTango overview":https://github.com/kristianmandrup/cantango/wiki
28
+
29
+ h2. Install
30
+
31
+ @gem install cantango@
32
+
33
+ h2. Usage in a Rails 3 app
34
+
35
+ Insert into Gemfile
36
+
37
+ @gem 'cantango'@
38
+
39
+ Run bundler to bundle gems in the app
40
+
41
+ @$ bundle@
42
+
43
+ h2. Running the dumy app integration tests
44
+
45
+ <pre>
46
+ $ bundle
47
+
48
+ # run dummy app integration specs
49
+ $ bundle exec rspec spec/integration
50
+
51
+ # dun devise dummy integration specs
52
+ $ bundle exec rspec spec/devise-integration
53
+ </pre>
54
+
55
+ We suggest you look at the wiki scenarios and check out the dummy apps to
56
+ get a feel for how to integrate CanTango in your app.
57
+
58
+ h2. Design overview
59
+
60
+ The CanTango pattern is simple:
61
+ 1. Return cached rules (if available)
62
+ 2. Generate rules
63
+ 3. Cache rules
64
+
65
+ _CanTango::Ability#initialize_
66
+
67
+ 1. Use cached rules and return if user has cached rules
68
+ 2. Generate rules for Permits (if 'Permits engine' is turned on)
69
+ 3. Generate rules for Permissions (if 'Permissions engine' is turned on)
70
+ 4. Cache generated rules with unique key for current user (ability candidate)
71
+
72
+ See "CanTango Ability":https://github.com/kristianmandrup/cantango/wiki/Cantango-ability
73
+
74
+ h2. Rails 3 configuration
75
+
76
+ See "Configuration":https://github.com/kristianmandrup/cantango/wiki/Configuration
77
+
78
+ h3. Minimal role system requirements
79
+
80
+ _CanTango_ requires that you have some kind of 'role system' in place (see "Role system requirement":https://github.com/kristianmandrup/cantango/wiki/Role-system-requirements)
81
+
82
+ h3. Supported role systems
83
+
84
+ Currently the role system "Troles":https://github.com/kristianmandrup/troles is targeted, but any role system will do with a few minor patches on top
85
+
86
+ h2. Permission configuration
87
+
88
+ Permission rules can be defined in:
89
+ * Permission store
90
+ * Permit classes
91
+
92
+ h3. Permits
93
+
94
+ See "Permits":https://github.com/kristianmandrup/cantango/wiki/Permits
95
+
96
+ h3. Permissions store
97
+
98
+ Permission rules can be stored and maintained in a "Permissions store":https://github.com/kristianmandrup/cantango/wiki/Permissions-store
99
+ A Permissions store can be either a simple YAML file or a key-value store supported by "Moneta":https://github.com/dkastner/moneta
100
+
101
+
102
+ h2. Application configuration for CanTango
103
+
104
+ * Define roles that Users can have
105
+ * Define which roles are available
106
+ * Define a Permit for each role.
107
+ * For each Permit, define what Users with a role matching the permit can do
108
+
109
+ h2. Extensions
110
+
111
+ CanTango will be integrated with "CanCan REST links":https://github.com/kristianmandrup/cancan-rest-links, letting you easily control which users have access to which models in your app.
112
+
113
+ The coming Rails 3 engine
114
+ "Dancing":https://github.com/kristianmandrup/dancing will likely include a generator that you can use to
115
+ configure your Rails app for Devise, CanCan, CanTango and Troles.
116
+
117
+ h2. Quickstart
118
+
119
+ See "Quickstart guide":https://github.com/kristianmandrup/cantango/wiki/Quickstart in the wiki.
120
+
121
+ We also have a complete setup guide for a simple and a complex permissions scenario.
122
+
123
+ * "Simple scenario":https://github.com/kristianmandrup/cantango/wiki/Simple-scenario
124
+ * "Complex scenario":https://github.com/kristianmandrup/cantango/wiki/Complex-scenario
125
+
126
+ h2. Define Permits
127
+
128
+ Permits can be defined for any of the following:
129
+
130
+ * Roles
131
+ * Role groups
132
+ * User types (not yet implemented)
133
+
134
+ In addition you can also define _licenses_, that are sets of permit rules that can be reused in various role and role group permits.
135
+
136
+ You can use Generators to generate your permits. All Permit classes should be placed in the app/permits folder of a Rails app.
137
+
138
+ See "Role permits":https://github.com/kristianmandrup/cantango/wiki/Role-Permits in the wiki.
139
+
140
+ h3. Account permits
141
+
142
+ You can limist a Permit to only take effect for a certain account
143
+
144
+ See "Account permits":https://github.com/kristianmandrup/cantango/wiki/Account-permits on the wiki
145
+
146
+ h3. Role group permits
147
+
148
+ See "RoleGroup permits":https://github.com/kristianmandrup/cantango/wiki/Role-Group-permits
149
+
150
+ h3. Advanced permission control
151
+
152
+ The Permits system uses some special permits _System_ and _Any_, that can be configured for
153
+ advanced permission scenarios as described in the wiki. You also have
154
+ other special options available for advanced permission scenarios.
155
+
156
+ See "Advanced Permits":https://github.com/kristianmandrup/cantango/wiki/Advanced-permits
157
+
158
+ h2. Licenses
159
+
160
+ Licenses are named permission sets that can be reused across various permits (like mixins).
161
+
162
+ See "Licenses":https://github.com/kristianmandrup/cantango/wiki/Licenses in the wiki.
163
+
164
+ h2. Generators
165
+
166
+ The gem comes with the following generators
167
+
168
+ * can_tango:install - generate initial configuration files to "install" CanTango in your app
169
+ * can_tango:role_permits - generate multiple permits
170
+ * can_tango:role_permit - generate a single permit
171
+ * can_tango:licenses - generate multiple licenses
172
+ * can_tango:license - generate a single license
173
+
174
+ See "Generators":https://github.com/kristianmandrup/cantango/wiki/Generators
175
+
176
+ Note: Some work is still needed on the generators... please help out!
177
+
178
+ h2. You need help?
179
+
180
+ Please post ideas, questions etc. in the "cantango group":http://groups.google.com/group/cantango on Google.
181
+
182
+ h3. Bugs, issues or feature request/ideas?
183
+
184
+ If you encounter bugs, raise an issue or:
185
+
186
+ * Fork the project.
187
+ * Make your feature addition or bug fix.
188
+ * Add tests for it. This is important so I don't break it in a
189
+ future version unintentionally.
190
+ * Commit, do not mess with rakefile, version, or history.
191
+ (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
192
+ * Send me a pull request. Bonus points for topic branches.
193
+
194
+ h2. Contributors
195
+
196
+ * Kristian Mandrup
197
+ * Main architect
198
+ * Designer of structure
199
+ * Feature ideas
200
+ * Initiator of project
201
+ * Devise app integration specs
202
+
203
+ * "Stanislaw Pankevich":https://github.com/stanislaw
204
+ * Main contributor of permissions engine
205
+ * Caching of Procs
206
+ * Lots of bug fixes and many specs
207
+ * Tireless worker ;)
208
+
209
+ h2. Copyright
210
+
211
+ Copyright (c) 2010 Kristian Mandrup. See LICENSE for details.
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"
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 'rake/rdoctask'
41
+ Rake::RDocTask.new do |rdoc|
42
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
43
+
44
+ rdoc.rdoc_dir = 'rdoc'
45
+ rdoc.title = "cantango #{version}"
46
+ rdoc.rdoc_files.include('README*')
47
+ rdoc.rdoc_files.include('lib/**/*.rb')
48
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.8.0
data/cantango.gemspec ADDED
@@ -0,0 +1,658 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{cantango}
8
+ s.version = "0.8.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = [%q{Kristian Mandrup}, %q{Stanislaw Pankevich}]
12
+ s.date = %q{2011-08-15}
13
+ s.description = %q{Define your permission rules as role- or role group specific permits.
14
+ Integrates well with multiple Devise user acounts.
15
+ Includes rules caching.
16
+ Store permissions in yaml file or key-value store}
17
+ s.email = %q{kmandrup@gmail.com, s.pankevich@gmail.com}
18
+ s.extra_rdoc_files = [
19
+ "LICENSE.txt",
20
+ "README.textile"
21
+ ]
22
+ s.files = [
23
+ ".document",
24
+ ".rspec",
25
+ "Gemfile",
26
+ "LICENSE.txt",
27
+ "README.textile",
28
+ "Rakefile",
29
+ "VERSION",
30
+ "cantango.gemspec",
31
+ "ideas/feature_list.markdown",
32
+ "lib/cantango.rb",
33
+ "lib/cantango/ability.rb",
34
+ "lib/cantango/ability/cache.rb",
35
+ "lib/cantango/ability/cache/base_cache.rb",
36
+ "lib/cantango/ability/cache/kompiler.rb",
37
+ "lib/cantango/ability/cache/moneta_cache.rb",
38
+ "lib/cantango/ability/cache/session_cache.rb",
39
+ "lib/cantango/ability/class_methods.rb",
40
+ "lib/cantango/ability/masquerade_helpers.rb",
41
+ "lib/cantango/ability/permission_helpers.rb",
42
+ "lib/cantango/ability/permit_helpers.rb",
43
+ "lib/cantango/ability/role_helpers.rb",
44
+ "lib/cantango/ability/scope.rb",
45
+ "lib/cantango/ability/user_helpers.rb",
46
+ "lib/cantango/api.rb",
47
+ "lib/cantango/api/aliases.rb",
48
+ "lib/cantango/api/aliases/account_permit.rb",
49
+ "lib/cantango/api/aliases/license.rb",
50
+ "lib/cantango/api/aliases/permit.rb",
51
+ "lib/cantango/api/aliases/role_group_permit.rb",
52
+ "lib/cantango/api/aliases/role_permit.rb",
53
+ "lib/cantango/api/aliases/user_permit.rb",
54
+ "lib/cantango/api/common.rb",
55
+ "lib/cantango/api/options.rb",
56
+ "lib/cantango/api/user.rb",
57
+ "lib/cantango/api/user/ability.rb",
58
+ "lib/cantango/api/user/can.rb",
59
+ "lib/cantango/api/user/scope.rb",
60
+ "lib/cantango/api/user_account.rb",
61
+ "lib/cantango/api/user_account/ability.rb",
62
+ "lib/cantango/api/user_account/can.rb",
63
+ "lib/cantango/api/user_account/scope.rb",
64
+ "lib/cantango/cache.rb",
65
+ "lib/cantango/cache/moneta_cache.rb",
66
+ "lib/cantango/cancan/rule.rb",
67
+ "lib/cantango/configuration.rb",
68
+ "lib/cantango/configuration/ability.rb",
69
+ "lib/cantango/configuration/autoload.rb",
70
+ "lib/cantango/configuration/categories.rb",
71
+ "lib/cantango/configuration/engines.rb",
72
+ "lib/cantango/configuration/engines/cache.rb",
73
+ "lib/cantango/configuration/engines/engine.rb",
74
+ "lib/cantango/configuration/engines/permission.rb",
75
+ "lib/cantango/configuration/engines/permit.rb",
76
+ "lib/cantango/configuration/engines/store.rb",
77
+ "lib/cantango/configuration/factory.rb",
78
+ "lib/cantango/configuration/guest.rb",
79
+ "lib/cantango/configuration/hash_registry.rb",
80
+ "lib/cantango/configuration/models.rb",
81
+ "lib/cantango/configuration/registry.rb",
82
+ "lib/cantango/configuration/role_groups.rb",
83
+ "lib/cantango/configuration/role_registry.rb",
84
+ "lib/cantango/configuration/roles.rb",
85
+ "lib/cantango/configuration/user.rb",
86
+ "lib/cantango/configuration/user_account.rb",
87
+ "lib/cantango/configuration/user_accounts.rb",
88
+ "lib/cantango/configuration/users.rb",
89
+ "lib/cantango/helpers.rb",
90
+ "lib/cantango/helpers/role_methods.rb",
91
+ "lib/cantango/permission_engine.rb",
92
+ "lib/cantango/permission_engine/builder.rb",
93
+ "lib/cantango/permission_engine/collector.rb",
94
+ "lib/cantango/permission_engine/compiler.rb",
95
+ "lib/cantango/permission_engine/evaluator.rb",
96
+ "lib/cantango/permission_engine/factory.rb",
97
+ "lib/cantango/permission_engine/loader.rb",
98
+ "lib/cantango/permission_engine/loader/base.rb",
99
+ "lib/cantango/permission_engine/loader/categories.rb",
100
+ "lib/cantango/permission_engine/loader/permissions.rb",
101
+ "lib/cantango/permission_engine/moneta_store.rb",
102
+ "lib/cantango/permission_engine/parser.rb",
103
+ "lib/cantango/permission_engine/parser/categories.rb",
104
+ "lib/cantango/permission_engine/parser/category.rb",
105
+ "lib/cantango/permission_engine/parser/default.rb",
106
+ "lib/cantango/permission_engine/parser/ownership.rb",
107
+ "lib/cantango/permission_engine/parser/permissions.rb",
108
+ "lib/cantango/permission_engine/parser/regex.rb",
109
+ "lib/cantango/permission_engine/parser/relationship.rb",
110
+ "lib/cantango/permission_engine/parser/rule.rb",
111
+ "lib/cantango/permission_engine/permission.rb",
112
+ "lib/cantango/permission_engine/selector.rb",
113
+ "lib/cantango/permission_engine/selector/base.rb",
114
+ "lib/cantango/permission_engine/selector/licenses.rb",
115
+ "lib/cantango/permission_engine/selector/role_groups.rb",
116
+ "lib/cantango/permission_engine/selector/roles.rb",
117
+ "lib/cantango/permission_engine/selector/users.rb",
118
+ "lib/cantango/permission_engine/statement.rb",
119
+ "lib/cantango/permission_engine/statements.rb",
120
+ "lib/cantango/permission_engine/store.rb",
121
+ "lib/cantango/permission_engine/yaml_store.rb",
122
+ "lib/cantango/permit_engine.rb",
123
+ "lib/cantango/permit_engine/account_permit.rb",
124
+ "lib/cantango/permit_engine/account_permit/builder.rb",
125
+ "lib/cantango/permit_engine/account_permit/finder.rb",
126
+ "lib/cantango/permit_engine/builder.rb",
127
+ "lib/cantango/permit_engine/builder/base.rb",
128
+ "lib/cantango/permit_engine/builder/special_permits.rb",
129
+ "lib/cantango/permit_engine/compatibility.rb",
130
+ "lib/cantango/permit_engine/executor.rb",
131
+ "lib/cantango/permit_engine/executor/abstract.rb",
132
+ "lib/cantango/permit_engine/executor/base.rb",
133
+ "lib/cantango/permit_engine/executor/system.rb",
134
+ "lib/cantango/permit_engine/factory.rb",
135
+ "lib/cantango/permit_engine/finder.rb",
136
+ "lib/cantango/permit_engine/license.rb",
137
+ "lib/cantango/permit_engine/license/loader.rb",
138
+ "lib/cantango/permit_engine/license/rules.rb",
139
+ "lib/cantango/permit_engine/permit.rb",
140
+ "lib/cantango/permit_engine/role_group_permit.rb",
141
+ "lib/cantango/permit_engine/role_group_permit/builder.rb",
142
+ "lib/cantango/permit_engine/role_group_permit/finder.rb",
143
+ "lib/cantango/permit_engine/role_matcher.rb",
144
+ "lib/cantango/permit_engine/role_permit.rb",
145
+ "lib/cantango/permit_engine/role_permit/builder.rb",
146
+ "lib/cantango/permit_engine/role_permit/finder.rb",
147
+ "lib/cantango/permit_engine/user_permit.rb",
148
+ "lib/cantango/permit_engine/user_permit/builder.rb",
149
+ "lib/cantango/permit_engine/user_permit/finder.rb",
150
+ "lib/cantango/permit_engine/util.rb",
151
+ "lib/cantango/rails.rb",
152
+ "lib/cantango/rails/base_helpers.rb",
153
+ "lib/cantango/rails/controller_helpers.rb",
154
+ "lib/cantango/rails/engine.rb",
155
+ "lib/cantango/rails/railtie.rb",
156
+ "lib/cantango/rails/view_helpers.rb",
157
+ "lib/cantango/rspec.rb",
158
+ "lib/cantango/rspec/config.rb",
159
+ "lib/cantango/rspec/matchers.rb",
160
+ "lib/cantango/rspec/matchers/be_allowed_to.rb",
161
+ "lib/cantango/rspec/matchers/have_license.rb",
162
+ "lib/cantango/rspec/matchers/have_license_class.rb",
163
+ "lib/cantango/rspec/matchers/have_license_file.rb",
164
+ "lib/cantango/rules.rb",
165
+ "lib/cantango/rules/adaptor.rb",
166
+ "lib/cantango/rules/adaptor/active_record.rb",
167
+ "lib/cantango/rules/adaptor/generic.rb",
168
+ "lib/cantango/rules/adaptor/mongoid.rb",
169
+ "lib/cantango/rules/dsl.rb",
170
+ "lib/cantango/rules/rule_class.rb",
171
+ "lib/cantango/rules/scope.rb",
172
+ "lib/cantango/rules/user_relation.rb",
173
+ "lib/cantango/users.rb",
174
+ "lib/cantango/users/macros.rb",
175
+ "lib/cantango/users/masquerade.rb",
176
+ "lib/cantango/users/masquerade/session_active_user.rb",
177
+ "lib/cantango/users/user.rb",
178
+ "lib/cantango/users/user_account.rb",
179
+ "lib/generators/cantango/base.rb",
180
+ "lib/generators/cantango/license/license_generator.rb",
181
+ "lib/generators/cantango/license/templates/license.erb",
182
+ "lib/generators/cantango/license_base.rb",
183
+ "lib/generators/cantango/licenses/licenses_generator.rb",
184
+ "lib/generators/cantango/permit_generator.rb",
185
+ "lib/generators/cantango/role_permit/role_permit_generator.rb",
186
+ "lib/generators/cantango/role_permit/templates/account_permit.erb",
187
+ "lib/generators/cantango/role_permit/templates/role_group_permit.erb",
188
+ "lib/generators/cantango/role_permit/templates/role_permit.erb",
189
+ "lib/generators/cantango/role_permits/role_permits_generator.rb",
190
+ "spec/Note_on_licenses.textile",
191
+ "spec/Refactor_into_engines.textile",
192
+ "spec/TODO",
193
+ "spec/active_record/AR_README.textile",
194
+ "spec/active_record/config_helper.rb",
195
+ "spec/active_record/db/database.yml",
196
+ "spec/active_record/helper/ar_config.rb",
197
+ "spec/active_record/helper/permits_config.rb",
198
+ "spec/active_record/helper/rails_config.rb",
199
+ "spec/active_record/helper/rspec_config.rb",
200
+ "spec/active_record/migrations/001_create_user.rb",
201
+ "spec/active_record/migrations/002_create_comment.rb",
202
+ "spec/active_record/migrations/003_create_post.rb",
203
+ "spec/active_record/migrations/004_create_article.rb",
204
+ "spec/active_record/migrations/005_create_account.rb",
205
+ "spec/active_record/migrations/006_create_todo.rb",
206
+ "spec/active_record/migrations/007_create_user_todos.rb",
207
+ "spec/active_record/scenarios/SCENARIOS README.textile",
208
+ "spec/active_record/scenarios/engines/permission_engine/cantango_permissions.yml",
209
+ "spec/active_record/scenarios/engines/permission_engine/categories.yml",
210
+ "spec/active_record/scenarios/engines/permission_engine/tango_permission_yml_spec.rb",
211
+ "spec/active_record/scenarios/engines/permission_engine/users.rb",
212
+ "spec/active_record/scenarios/engines/permit_engine/licenses_spec.rb",
213
+ "spec/active_record/scenarios/engines/permit_engine/role_groups_permits_spec.rb",
214
+ "spec/active_record/scenarios/guest_user_admin/admin_user_spec.rb",
215
+ "spec/active_record/scenarios/guest_user_admin/docs/GUEST_ADMIN_USER_SCENARIO.textile",
216
+ "spec/active_record/scenarios/guest_user_admin/editor_spec.rb",
217
+ "spec/active_record/scenarios/guest_user_admin/guest_user_spec.rb",
218
+ "spec/active_record/scenarios/guest_user_admin/user_having_user_and_editor_roles_spec.rb",
219
+ "spec/active_record/scenarios/guest_user_admin/user_spec.rb",
220
+ "spec/active_record/scenarios/masquerading/masquerading_for_admin_account_spec.rb",
221
+ "spec/active_record/scenarios/masquerading/masquerading_for_admin_user_spec.rb",
222
+ "spec/active_record/scenarios/shared/api.rb",
223
+ "spec/active_record/scenarios/shared/can_tango.rb",
224
+ "spec/active_record/scenarios/shared/examples/user_accounts.rb",
225
+ "spec/active_record/scenarios/shared/examples/users.rb",
226
+ "spec/active_record/scenarios/shared/licenses/musicians_license.rb",
227
+ "spec/active_record/scenarios/shared/models/items.rb",
228
+ "spec/active_record/scenarios/shared/models/todo.rb",
229
+ "spec/active_record/scenarios/shared/models/user_todo.rb",
230
+ "spec/active_record/scenarios/shared/models/users.rb",
231
+ "spec/active_record/scenarios/shared/permits/PERMITS README.textile",
232
+ "spec/active_record/scenarios/shared/permits/account_permits/admin_account_permit.rb",
233
+ "spec/active_record/scenarios/shared/permits/account_permits/guest_account_permit.rb",
234
+ "spec/active_record/scenarios/shared/permits/account_permits/user_account_permit.rb",
235
+ "spec/active_record/scenarios/shared/permits/role/admin_permit.rb",
236
+ "spec/active_record/scenarios/shared/permits/role/editor_permit.rb",
237
+ "spec/active_record/scenarios/shared/permits/role/guest_permit.rb",
238
+ "spec/active_record/scenarios/shared/permits/role/super_admin_permit.rb",
239
+ "spec/active_record/scenarios/shared/permits/role/user_permit.rb",
240
+ "spec/active_record/scenarios/shared/permits/role_group/bloggers_permit.rb",
241
+ "spec/active_record/scenarios/shared/permits/role_group/musicians_permit.rb",
242
+ "spec/active_record/scenarios/shared/permits/special/any_role_permit.rb",
243
+ "spec/active_record/scenarios/shared/permits/special/system_role_permit.rb",
244
+ "spec/active_record/scenarios/user_accounts/admin_account_spec.rb",
245
+ "spec/active_record/scenarios/user_accounts/config/account_permits.yml",
246
+ "spec/active_record/scenarios/user_accounts/docs/USER_ACCOUNTS_SCENARIO.textile",
247
+ "spec/active_record/scenarios/user_accounts/docs/basic_rules_spec_possible_samples.txt",
248
+ "spec/active_record/scenarios/user_accounts/guest_account_spec.rb",
249
+ "spec/active_record/scenarios/user_accounts/helpers.rb",
250
+ "spec/active_record/scenarios/user_accounts/helpers/account_setup.rb",
251
+ "spec/active_record/scenarios/user_accounts/helpers/user_factory.rb",
252
+ "spec/active_record/scenarios/user_accounts/permits/admin_account_permit.rb",
253
+ "spec/active_record/scenarios/user_accounts/permits/guest_account_permit.rb",
254
+ "spec/active_record/scenarios/user_accounts/permits/user_account_permit.rb",
255
+ "spec/active_record/scenarios/user_accounts/user_account_spec.rb",
256
+ "spec/active_record/spec_helper.rb",
257
+ "spec/cantango/README.textile",
258
+ "spec/cantango/ability/cache/compiler_spec.rb",
259
+ "spec/cantango/ability/cache/session_cache_spec.rb",
260
+ "spec/cantango/ability/cache_spec.rb",
261
+ "spec/cantango/ability_filters_spec.rb",
262
+ "spec/cantango/ability_spec.rb",
263
+ "spec/cantango/api/current_user_accounts.rb",
264
+ "spec/cantango/api/current_users.rb",
265
+ "spec/cantango/api/user/ability_api_spec.rb",
266
+ "spec/cantango/api/user/can_api_spec.rb",
267
+ "spec/cantango/api/user/scope_api_spec.rb",
268
+ "spec/cantango/api/user_account/ability_api_spec.rb",
269
+ "spec/cantango/api/user_account/can_api_spec.rb",
270
+ "spec/cantango/api/user_account/scope_api_spec.rb",
271
+ "spec/cantango/api/user_account_api_spec.rb",
272
+ "spec/cantango/api/user_api_spec.rb",
273
+ "spec/cantango/configuration/ability_spec.rb",
274
+ "spec/cantango/configuration/autoload_spec.rb",
275
+ "spec/cantango/configuration/categories_spec.rb",
276
+ "spec/cantango/configuration/engines/cache_spec.rb",
277
+ "spec/cantango/configuration/engines/engine_shared.rb",
278
+ "spec/cantango/configuration/engines/permission_spec.rb",
279
+ "spec/cantango/configuration/engines/permit_spec.rb",
280
+ "spec/cantango/configuration/engines/store_engine_shared.rb",
281
+ "spec/cantango/configuration/engines/store_shared.rb",
282
+ "spec/cantango/configuration/engines_spec.rb",
283
+ "spec/cantango/configuration/factory_spec.rb",
284
+ "spec/cantango/configuration/guest/find_guest_default_way_spec.rb",
285
+ "spec/cantango/configuration/guest_spec.rb",
286
+ "spec/cantango/configuration/hash_registry_spec.rb",
287
+ "spec/cantango/configuration/registry_spec.rb",
288
+ "spec/cantango/configuration/role_groups_spec.rb",
289
+ "spec/cantango/configuration/roles_spec.rb",
290
+ "spec/cantango/configuration/shared/factory_ex.rb",
291
+ "spec/cantango/configuration/shared/hash_registry_ex.rb",
292
+ "spec/cantango/configuration/shared/registry_ex.rb",
293
+ "spec/cantango/configuration/shared/role_registry_ex.rb",
294
+ "spec/cantango/configuration/user_account_spec.rb",
295
+ "spec/cantango/configuration/user_spec.rb",
296
+ "spec/cantango/configuration_spec.rb",
297
+ "spec/cantango/license/save_license_spec.rb",
298
+ "spec/cantango/models/items.rb",
299
+ "spec/cantango/models/users.rb",
300
+ "spec/cantango/moneta_spec.rb",
301
+ "spec/cantango/parser/categories_spec.rb",
302
+ "spec/cantango/parser/permissions_spec.rb",
303
+ "spec/cantango/permission_engine/PERMISSION_STORE.textile",
304
+ "spec/cantango/permission_engine/categories_store_spec.rb",
305
+ "spec/cantango/permission_engine/compiler_spec.rb",
306
+ "spec/cantango/permission_engine/loader/categories_spec.rb",
307
+ "spec/cantango/permission_engine/loader/permissions/cantango_permissions_loader.rb",
308
+ "spec/cantango/permission_engine/loader/permissions/shared.rb",
309
+ "spec/cantango/permission_engine/moneta_store_spec.rb",
310
+ "spec/cantango/permission_engine/parser_spec.rb",
311
+ "spec/cantango/permission_engine/permission_spec.rb",
312
+ "spec/cantango/permission_engine/permission_store_spec.rb",
313
+ "spec/cantango/permission_engine/shared_examples.rb",
314
+ "spec/cantango/permission_engine/store_spec.rb",
315
+ "spec/cantango/permission_engine/user_permission_store_spec.rb",
316
+ "spec/cantango/permission_engine/yaml_store_spec.rb",
317
+ "spec/cantango/permit_engine/account_permit_spec.rb",
318
+ "spec/cantango/permit_engine/builder/role_group_permits_spec.rb",
319
+ "spec/cantango/permit_engine/builder/role_permits_spec.rb",
320
+ "spec/cantango/permit_engine/builder/special_permits_spec.rb",
321
+ "spec/cantango/permit_engine/executor/system_spec.rb",
322
+ "spec/cantango/permit_engine/factory_spec.rb",
323
+ "spec/cantango/permit_engine/finder_spec.rb",
324
+ "spec/cantango/permit_engine/permit/permit_static_and_dynamic_rules_spec.rb",
325
+ "spec/cantango/permit_engine/role_group_permit_spec.rb",
326
+ "spec/cantango/permit_engine/role_permit_spec.rb",
327
+ "spec/cantango/permit_engine/user_permit_spec.rb",
328
+ "spec/cantango/rules_spec.rb",
329
+ "spec/devise-dummy/Rakefile",
330
+ "spec/devise-dummy/app/controllers/accounts_controller.rb",
331
+ "spec/devise-dummy/app/controllers/application_controller.rb",
332
+ "spec/devise-dummy/app/controllers/articles_controller.rb",
333
+ "spec/devise-dummy/app/controllers/comments_controller.rb",
334
+ "spec/devise-dummy/app/controllers/concertos_controller.rb",
335
+ "spec/devise-dummy/app/controllers/main_controller.rb",
336
+ "spec/devise-dummy/app/controllers/posts_controller.rb",
337
+ "spec/devise-dummy/app/controllers/users_controller.rb",
338
+ "spec/devise-dummy/app/helpers/application_helper.rb",
339
+ "spec/devise-dummy/app/models/account_setup.rb",
340
+ "spec/devise-dummy/app/models/admin.rb",
341
+ "spec/devise-dummy/app/models/article.rb",
342
+ "spec/devise-dummy/app/models/comment.rb",
343
+ "spec/devise-dummy/app/models/concerto.rb",
344
+ "spec/devise-dummy/app/models/guest.rb",
345
+ "spec/devise-dummy/app/models/improvisation.rb",
346
+ "spec/devise-dummy/app/models/post.rb",
347
+ "spec/devise-dummy/app/models/song.rb",
348
+ "spec/devise-dummy/app/models/tune.rb",
349
+ "spec/devise-dummy/app/models/user.rb",
350
+ "spec/devise-dummy/app/permits/accounts/admin/roles/editor_permit.rb",
351
+ "spec/devise-dummy/app/permits/licenses/bloggers_license.rb",
352
+ "spec/devise-dummy/app/permits/licenses/musicians_license.rb",
353
+ "spec/devise-dummy/app/permits/role_groups/editor_permit.rb",
354
+ "spec/devise-dummy/app/permits/roles/admin_permit.rb",
355
+ "spec/devise-dummy/app/permits/roles/guest_permit.rb",
356
+ "spec/devise-dummy/app/permits/roles/user_permit.rb",
357
+ "spec/devise-dummy/app/views/articles/admin.html.haml",
358
+ "spec/devise-dummy/app/views/articles/admin_account.html.haml",
359
+ "spec/devise-dummy/app/views/articles/guest.html.haml",
360
+ "spec/devise-dummy/app/views/articles/index.html.haml",
361
+ "spec/devise-dummy/app/views/articles/show.html.haml",
362
+ "spec/devise-dummy/app/views/comments/guest.html.haml",
363
+ "spec/devise-dummy/app/views/comments/index.html.haml",
364
+ "spec/devise-dummy/app/views/concertos/admin.html.haml",
365
+ "spec/devise-dummy/app/views/concertos/admin_account.html.haml",
366
+ "spec/devise-dummy/app/views/concertos/guest.html.haml",
367
+ "spec/devise-dummy/app/views/concertos/index.html.haml",
368
+ "spec/devise-dummy/app/views/concertos/show.html.haml",
369
+ "spec/devise-dummy/app/views/devise/confirmations/new.html.erb",
370
+ "spec/devise-dummy/app/views/devise/mailer/confirmation_instructions.html.erb",
371
+ "spec/devise-dummy/app/views/devise/mailer/reset_password_instructions.html.erb",
372
+ "spec/devise-dummy/app/views/devise/mailer/unlock_instructions.html.erb",
373
+ "spec/devise-dummy/app/views/devise/passwords/edit.html.erb",
374
+ "spec/devise-dummy/app/views/devise/passwords/new.html.erb",
375
+ "spec/devise-dummy/app/views/devise/registrations/edit.html.erb",
376
+ "spec/devise-dummy/app/views/devise/registrations/new.html.erb",
377
+ "spec/devise-dummy/app/views/devise/sessions/new.html.erb",
378
+ "spec/devise-dummy/app/views/devise/shared/_links.erb",
379
+ "spec/devise-dummy/app/views/devise/unlocks/new.html.erb",
380
+ "spec/devise-dummy/app/views/layouts/application.html.erb",
381
+ "spec/devise-dummy/app/views/main/index.html.haml",
382
+ "spec/devise-dummy/app/views/posts/admin.html.haml",
383
+ "spec/devise-dummy/app/views/posts/admin_account.html.haml",
384
+ "spec/devise-dummy/app/views/posts/guest.html.haml",
385
+ "spec/devise-dummy/app/views/posts/index.html.haml",
386
+ "spec/devise-dummy/app/views/posts/show.html.haml",
387
+ "spec/devise-dummy/app/views/users/admin.html.haml",
388
+ "spec/devise-dummy/app/views/users/admin_account.html.haml",
389
+ "spec/devise-dummy/app/views/users/guest.html.haml",
390
+ "spec/devise-dummy/app/views/users/index.html.haml",
391
+ "spec/devise-dummy/app/views/users/show.html.haml",
392
+ "spec/devise-dummy/config.ru",
393
+ "spec/devise-dummy/config/application.rb",
394
+ "spec/devise-dummy/config/boot.rb",
395
+ "spec/devise-dummy/config/cantango_permissions.yml",
396
+ "spec/devise-dummy/config/categories.yml",
397
+ "spec/devise-dummy/config/database.yml",
398
+ "spec/devise-dummy/config/environment.rb",
399
+ "spec/devise-dummy/config/environments/development.rb",
400
+ "spec/devise-dummy/config/environments/production.rb",
401
+ "spec/devise-dummy/config/environments/test.rb",
402
+ "spec/devise-dummy/config/initializers/backtrace_silencers.rb",
403
+ "spec/devise-dummy/config/initializers/cantango.rb",
404
+ "spec/devise-dummy/config/initializers/devise.rb",
405
+ "spec/devise-dummy/config/initializers/inflections.rb",
406
+ "spec/devise-dummy/config/initializers/mime_types.rb",
407
+ "spec/devise-dummy/config/initializers/secret_token.rb",
408
+ "spec/devise-dummy/config/initializers/session_store.rb",
409
+ "spec/devise-dummy/config/initializers/simple_roles.rb",
410
+ "spec/devise-dummy/config/locales/devise.en.yml",
411
+ "spec/devise-dummy/config/locales/en.yml",
412
+ "spec/devise-dummy/config/routes.rb",
413
+ "spec/devise-dummy/db/migrate/002_create_comment.rb",
414
+ "spec/devise-dummy/db/migrate/003_create_post.rb",
415
+ "spec/devise-dummy/db/migrate/004_create_article.rb",
416
+ "spec/devise-dummy/db/migrate/005_create_account.rb",
417
+ "spec/devise-dummy/db/migrate/006_create_concerto.rb",
418
+ "spec/devise-dummy/db/migrate/007_devise_create_users.rb",
419
+ "spec/devise-dummy/db/schema.rb",
420
+ "spec/devise-dummy/db/seeds.rb",
421
+ "spec/devise-dummy/db/users.txt",
422
+ "spec/devise-dummy/public/404.html",
423
+ "spec/devise-dummy/public/422.html",
424
+ "spec/devise-dummy/public/500.html",
425
+ "spec/devise-dummy/public/favicon.ico",
426
+ "spec/devise-dummy/public/javascripts/application.js",
427
+ "spec/devise-dummy/public/javascripts/controls.js",
428
+ "spec/devise-dummy/public/javascripts/dragdrop.js",
429
+ "spec/devise-dummy/public/javascripts/effects.js",
430
+ "spec/devise-dummy/public/javascripts/prototype.js",
431
+ "spec/devise-dummy/public/javascripts/rails.js",
432
+ "spec/devise-dummy/public/stylesheets/.gitkeep",
433
+ "spec/devise-dummy/script/rails",
434
+ "spec/devise-dummy_spec_helper.rb",
435
+ "spec/devise-integration/concerto_spec.rb",
436
+ "spec/dummy/Rakefile",
437
+ "spec/dummy/app/controllers/accounts_controller.rb",
438
+ "spec/dummy/app/controllers/application_controller.rb",
439
+ "spec/dummy/app/controllers/articles_controller.rb",
440
+ "spec/dummy/app/controllers/comments_controller.rb",
441
+ "spec/dummy/app/controllers/concertos_controller.rb",
442
+ "spec/dummy/app/controllers/main_controller.rb",
443
+ "spec/dummy/app/controllers/posts_controller.rb",
444
+ "spec/dummy/app/controllers/sessions_controller.rb",
445
+ "spec/dummy/app/controllers/users_controller.rb",
446
+ "spec/dummy/app/helpers/application_helper.rb",
447
+ "spec/dummy/app/models/account_setup.rb",
448
+ "spec/dummy/app/models/admin.rb",
449
+ "spec/dummy/app/models/article.rb",
450
+ "spec/dummy/app/models/comment.rb",
451
+ "spec/dummy/app/models/concerto.rb",
452
+ "spec/dummy/app/models/guest.rb",
453
+ "spec/dummy/app/models/improvisation.rb",
454
+ "spec/dummy/app/models/post.rb",
455
+ "spec/dummy/app/models/song.rb",
456
+ "spec/dummy/app/models/tune.rb",
457
+ "spec/dummy/app/models/user.rb",
458
+ "spec/dummy/app/permits/accounts/admin/roles/editor_permit.rb",
459
+ "spec/dummy/app/permits/licenses/bloggers_license.rb",
460
+ "spec/dummy/app/permits/licenses/musicians_license.rb",
461
+ "spec/dummy/app/permits/role_groups/editor_permit.rb",
462
+ "spec/dummy/app/permits/roles/admin_permit.rb",
463
+ "spec/dummy/app/permits/roles/guest_permit.rb",
464
+ "spec/dummy/app/permits/roles/user_permit.rb",
465
+ "spec/dummy/app/views/articles/admin.html.haml",
466
+ "spec/dummy/app/views/articles/admin_account.html.haml",
467
+ "spec/dummy/app/views/articles/guest.html.haml",
468
+ "spec/dummy/app/views/articles/index.html.haml",
469
+ "spec/dummy/app/views/articles/show.html.haml",
470
+ "spec/dummy/app/views/comments/guest.html.haml",
471
+ "spec/dummy/app/views/comments/index.html.haml",
472
+ "spec/dummy/app/views/concertos/admin.html.haml",
473
+ "spec/dummy/app/views/concertos/admin_account.html.haml",
474
+ "spec/dummy/app/views/concertos/guest.html.haml",
475
+ "spec/dummy/app/views/concertos/index.html.haml",
476
+ "spec/dummy/app/views/concertos/show.html.haml",
477
+ "spec/dummy/app/views/layouts/application.html.erb",
478
+ "spec/dummy/app/views/main/index.html.haml",
479
+ "spec/dummy/app/views/posts/admin.html.haml",
480
+ "spec/dummy/app/views/posts/admin_account.html.haml",
481
+ "spec/dummy/app/views/posts/guest.html.haml",
482
+ "spec/dummy/app/views/posts/index.html.haml",
483
+ "spec/dummy/app/views/posts/show.html.haml",
484
+ "spec/dummy/app/views/users/admin.html.haml",
485
+ "spec/dummy/app/views/users/admin_account.html.haml",
486
+ "spec/dummy/app/views/users/guest.html.haml",
487
+ "spec/dummy/app/views/users/index.html.haml",
488
+ "spec/dummy/app/views/users/show.html.haml",
489
+ "spec/dummy/config.ru",
490
+ "spec/dummy/config/application.rb",
491
+ "spec/dummy/config/boot.rb",
492
+ "spec/dummy/config/cantango_permissions.yml",
493
+ "spec/dummy/config/categories.yml",
494
+ "spec/dummy/config/database.yml",
495
+ "spec/dummy/config/environment.rb",
496
+ "spec/dummy/config/environments/development.rb",
497
+ "spec/dummy/config/environments/production.rb",
498
+ "spec/dummy/config/environments/test.rb",
499
+ "spec/dummy/config/initializers/backtrace_silencers.rb",
500
+ "spec/dummy/config/initializers/cantango.rb",
501
+ "spec/dummy/config/initializers/inflections.rb",
502
+ "spec/dummy/config/initializers/mime_types.rb",
503
+ "spec/dummy/config/initializers/secret_token.rb",
504
+ "spec/dummy/config/initializers/session_store.rb",
505
+ "spec/dummy/config/initializers/simple_roles.rb",
506
+ "spec/dummy/config/locales/en.yml",
507
+ "spec/dummy/config/routes.rb",
508
+ "spec/dummy/db/migrate/001_create_user.rb",
509
+ "spec/dummy/db/migrate/002_create_comment.rb",
510
+ "spec/dummy/db/migrate/003_create_post.rb",
511
+ "spec/dummy/db/migrate/004_create_article.rb",
512
+ "spec/dummy/db/migrate/005_create_account.rb",
513
+ "spec/dummy/db/migrate/006_create_concerto.rb",
514
+ "spec/dummy/public/404.html",
515
+ "spec/dummy/public/422.html",
516
+ "spec/dummy/public/500.html",
517
+ "spec/dummy/public/favicon.ico",
518
+ "spec/dummy/public/javascripts/application.js",
519
+ "spec/dummy/public/javascripts/controls.js",
520
+ "spec/dummy/public/javascripts/dragdrop.js",
521
+ "spec/dummy/public/javascripts/effects.js",
522
+ "spec/dummy/public/javascripts/prototype.js",
523
+ "spec/dummy/public/javascripts/rails.js",
524
+ "spec/dummy/public/stylesheets/.gitkeep",
525
+ "spec/dummy/script/rails",
526
+ "spec/dummy/tmp/pids/server.pid",
527
+ "spec/dummy_spec_helper.rb",
528
+ "spec/entire_suite_spec.rb",
529
+ "spec/factories.rb",
530
+ "spec/fixtures/config/cantango_permissions.yml",
531
+ "spec/fixtures/config/categories.yml",
532
+ "spec/fixtures/config/evaluator_fixtures.yml",
533
+ "spec/fixtures/config/licenses.yml",
534
+ "spec/fixtures/config/permissions.yml",
535
+ "spec/fixtures/config/role_group.yml",
536
+ "spec/fixtures/config/roles.yml",
537
+ "spec/fixtures/config/user_permissions.yml",
538
+ "spec/fixtures/models.rb",
539
+ "spec/fixtures/models/items.rb",
540
+ "spec/fixtures/models/simple_roles.rb",
541
+ "spec/fixtures/models/user.rb",
542
+ "spec/fixtures/models/user_account.rb",
543
+ "spec/fixtures/tango_fixtures.rb",
544
+ "spec/generators/cantango/account_role_permit_generator_spec.rb",
545
+ "spec/generators/cantango/account_role_permits_generator_spec.rb",
546
+ "spec/generators/cantango/license_generator_spec.rb",
547
+ "spec/generators/cantango/licenses_generator_spec.rb",
548
+ "spec/generators/cantango/role_permit_generator_spec.rb",
549
+ "spec/generators/cantango/role_permits_generator_spec.rb",
550
+ "spec/helpers/dummy_app_ability.rb",
551
+ "spec/integration/Design_notes.textile",
552
+ "spec/integration/admin_user/masquerade_spec.rb",
553
+ "spec/integration/cache_using_moneta_spec.rb",
554
+ "spec/integration/cache_using_session_spec.rb",
555
+ "spec/integration/main_spec.rb",
556
+ "spec/integration/performance/ability_initialize_performance.rb",
557
+ "spec/integration/performance/cache_performance.rb",
558
+ "spec/integration/performance/can_performance.rb",
559
+ "spec/integration/performance/helpers/ability.rb",
560
+ "spec/integration/performance/helpers/ability_api.rb",
561
+ "spec/integration/performance/helpers/ability_raw.rb",
562
+ "spec/integration/performance/helpers/cache.rb",
563
+ "spec/integration/performance/helpers/rules.rb",
564
+ "spec/integration/performance/integral_performance_caching_disabled.rb",
565
+ "spec/integration/performance/integral_performance_caching_enabled.rb",
566
+ "spec/integration/performance/raw_performance.rb",
567
+ "spec/integration/user/articles_spec.rb",
568
+ "spec/integration/user/concerto_spec.rb",
569
+ "spec/note_on_caching_and_dynamic.textile",
570
+ "spec/path_helper.rb",
571
+ "spec/simple_roles.rb",
572
+ "spec/spec_helper.rb",
573
+ "wiki/ability/initialize.markdown",
574
+ "wiki/api/user/api.markdown",
575
+ "wiki/api/user_account/api.markdown",
576
+ "wiki/config/ability.markdown",
577
+ "wiki/config/autoload.markdown",
578
+ "wiki/config/guest.markdown",
579
+ "wiki/config/models_registration.markdown",
580
+ "wiki/config/role_groups.markdown",
581
+ "wiki/config/roles.markdown",
582
+ "wiki/engines/cache/config.markdown",
583
+ "wiki/engines/cache/session_store.markdown",
584
+ "wiki/engines/cache/store.markdown",
585
+ "wiki/engines/permissions/categories.markdown",
586
+ "wiki/engines/permissions/config.markdown",
587
+ "wiki/engines/permissions/moneta_store.markdown",
588
+ "wiki/engines/permissions/store.markdown",
589
+ "wiki/engines/permissions/yaml_store.markdown",
590
+ "wiki/engines/permits/config.markdown",
591
+ "wiki/engines/permits/licenses.markdown",
592
+ "wiki/engines/permits/role_groups.markdown",
593
+ "wiki/engines/permits/roles.markdown",
594
+ "wiki/engines/permits/user_accounts.markdown",
595
+ "wiki/feature_list.markdown",
596
+ "wiki/rules_caching.markdown",
597
+ "wiki/users/masquerading.markdown",
598
+ "wiki/when_to_use.markdown",
599
+ "wiki/why_to_use.markdown"
600
+ ]
601
+ s.homepage = %q{http://github.com/kristianmandrup/cantango}
602
+ s.licenses = [%q{MIT}]
603
+ s.require_paths = [%q{lib}]
604
+ s.rubygems_version = %q{1.8.7}
605
+ s.summary = %q{CanCan extension with role oriented permission management and more}
606
+
607
+ if s.respond_to? :specification_version then
608
+ s.specification_version = 3
609
+
610
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
611
+ s.add_runtime_dependency(%q<rails>, [">= 3.0.1"])
612
+ s.add_runtime_dependency(%q<cancan>, [">= 1.4"])
613
+ s.add_runtime_dependency(%q<sugar-high>, [">= 0.5"])
614
+ s.add_runtime_dependency(%q<sqlite3>, [">= 0"])
615
+ s.add_runtime_dependency(%q<hashie>, [">= 0.4"])
616
+ s.add_runtime_dependency(%q<sourcify>, [">= 0"])
617
+ s.add_runtime_dependency(%q<dkastner-moneta>, [">= 1.0"])
618
+ s.add_runtime_dependency(%q<friendly_id>, [">= 0"])
619
+ s.add_runtime_dependency(%q<meta_where>, [">= 0"])
620
+ s.add_development_dependency(%q<devise>, [">= 0"])
621
+ s.add_development_dependency(%q<rspec>, [">= 2.5.0"])
622
+ s.add_development_dependency(%q<jeweler>, [">= 1.6.4"])
623
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.10"])
624
+ s.add_development_dependency(%q<rdoc>, [">= 0"])
625
+ else
626
+ s.add_dependency(%q<rails>, [">= 3.0.1"])
627
+ s.add_dependency(%q<cancan>, [">= 1.4"])
628
+ s.add_dependency(%q<sugar-high>, [">= 0.5"])
629
+ s.add_dependency(%q<sqlite3>, [">= 0"])
630
+ s.add_dependency(%q<hashie>, [">= 0.4"])
631
+ s.add_dependency(%q<sourcify>, [">= 0"])
632
+ s.add_dependency(%q<dkastner-moneta>, [">= 1.0"])
633
+ s.add_dependency(%q<friendly_id>, [">= 0"])
634
+ s.add_dependency(%q<meta_where>, [">= 0"])
635
+ s.add_dependency(%q<devise>, [">= 0"])
636
+ s.add_dependency(%q<rspec>, [">= 2.5.0"])
637
+ s.add_dependency(%q<jeweler>, [">= 1.6.4"])
638
+ s.add_dependency(%q<bundler>, ["~> 1.0.10"])
639
+ s.add_dependency(%q<rdoc>, [">= 0"])
640
+ end
641
+ else
642
+ s.add_dependency(%q<rails>, [">= 3.0.1"])
643
+ s.add_dependency(%q<cancan>, [">= 1.4"])
644
+ s.add_dependency(%q<sugar-high>, [">= 0.5"])
645
+ s.add_dependency(%q<sqlite3>, [">= 0"])
646
+ s.add_dependency(%q<hashie>, [">= 0.4"])
647
+ s.add_dependency(%q<sourcify>, [">= 0"])
648
+ s.add_dependency(%q<dkastner-moneta>, [">= 1.0"])
649
+ s.add_dependency(%q<friendly_id>, [">= 0"])
650
+ s.add_dependency(%q<meta_where>, [">= 0"])
651
+ s.add_dependency(%q<devise>, [">= 0"])
652
+ s.add_dependency(%q<rspec>, [">= 2.5.0"])
653
+ s.add_dependency(%q<jeweler>, [">= 1.6.4"])
654
+ s.add_dependency(%q<bundler>, ["~> 1.0.10"])
655
+ s.add_dependency(%q<rdoc>, [">= 0"])
656
+ end
657
+ end
658
+