cancancan 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +15 -0
  2. data/CHANGELOG.rdoc +427 -0
  3. data/CONTRIBUTING.md +11 -0
  4. data/Gemfile +23 -0
  5. data/LICENSE +20 -0
  6. data/README.rdoc +161 -0
  7. data/Rakefile +18 -0
  8. data/init.rb +1 -0
  9. data/lib/cancan.rb +13 -0
  10. data/lib/cancan/ability.rb +324 -0
  11. data/lib/cancan/controller_additions.rb +397 -0
  12. data/lib/cancan/controller_resource.rb +286 -0
  13. data/lib/cancan/exceptions.rb +50 -0
  14. data/lib/cancan/inherited_resource.rb +20 -0
  15. data/lib/cancan/matchers.rb +14 -0
  16. data/lib/cancan/model_adapters/abstract_adapter.rb +56 -0
  17. data/lib/cancan/model_adapters/active_record_adapter.rb +180 -0
  18. data/lib/cancan/model_adapters/data_mapper_adapter.rb +34 -0
  19. data/lib/cancan/model_adapters/default_adapter.rb +7 -0
  20. data/lib/cancan/model_adapters/mongoid_adapter.rb +54 -0
  21. data/lib/cancan/model_additions.rb +31 -0
  22. data/lib/cancan/rule.rb +147 -0
  23. data/lib/cancancan.rb +1 -0
  24. data/lib/generators/cancan/ability/USAGE +4 -0
  25. data/lib/generators/cancan/ability/ability_generator.rb +11 -0
  26. data/lib/generators/cancan/ability/templates/ability.rb +32 -0
  27. data/spec/README.rdoc +28 -0
  28. data/spec/cancan/ability_spec.rb +455 -0
  29. data/spec/cancan/controller_additions_spec.rb +141 -0
  30. data/spec/cancan/controller_resource_spec.rb +553 -0
  31. data/spec/cancan/exceptions_spec.rb +58 -0
  32. data/spec/cancan/inherited_resource_spec.rb +60 -0
  33. data/spec/cancan/matchers_spec.rb +29 -0
  34. data/spec/cancan/model_adapters/active_record_adapter_spec.rb +358 -0
  35. data/spec/cancan/model_adapters/data_mapper_adapter_spec.rb +118 -0
  36. data/spec/cancan/model_adapters/default_adapter_spec.rb +7 -0
  37. data/spec/cancan/model_adapters/mongoid_adapter_spec.rb +226 -0
  38. data/spec/cancan/rule_spec.rb +52 -0
  39. data/spec/matchers.rb +13 -0
  40. data/spec/spec.opts +2 -0
  41. data/spec/spec_helper.rb +77 -0
  42. metadata +126 -0
metadata ADDED
@@ -0,0 +1,126 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cancancan
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.7.0
5
+ platform: ruby
6
+ authors:
7
+ - Bryan Rite
8
+ - Ryan Bates
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-02-19 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ~>
19
+ - !ruby/object:Gem::Version
20
+ version: '2.14'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ~>
26
+ - !ruby/object:Gem::Version
27
+ version: '2.14'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rails
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ~>
33
+ - !ruby/object:Gem::Version
34
+ version: 3.0.9
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ~>
40
+ - !ruby/object:Gem::Version
41
+ version: 3.0.9
42
+ - !ruby/object:Gem::Dependency
43
+ name: supermodel
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ~>
47
+ - !ruby/object:Gem::Version
48
+ version: 0.1.4
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ~>
54
+ - !ruby/object:Gem::Version
55
+ version: 0.1.4
56
+ description: Continuation of the simple authorization solution for Rails which is
57
+ decoupled from user roles. All permissions are stored in a single location.
58
+ email: bryan@bryanrite.com
59
+ executables: []
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - lib/cancan/ability.rb
64
+ - lib/cancan/controller_additions.rb
65
+ - lib/cancan/controller_resource.rb
66
+ - lib/cancan/exceptions.rb
67
+ - lib/cancan/inherited_resource.rb
68
+ - lib/cancan/matchers.rb
69
+ - lib/cancan/model_adapters/abstract_adapter.rb
70
+ - lib/cancan/model_adapters/active_record_adapter.rb
71
+ - lib/cancan/model_adapters/data_mapper_adapter.rb
72
+ - lib/cancan/model_adapters/default_adapter.rb
73
+ - lib/cancan/model_adapters/mongoid_adapter.rb
74
+ - lib/cancan/model_additions.rb
75
+ - lib/cancan/rule.rb
76
+ - lib/cancan.rb
77
+ - lib/cancancan.rb
78
+ - lib/generators/cancan/ability/ability_generator.rb
79
+ - lib/generators/cancan/ability/templates/ability.rb
80
+ - lib/generators/cancan/ability/USAGE
81
+ - spec/cancan/ability_spec.rb
82
+ - spec/cancan/controller_additions_spec.rb
83
+ - spec/cancan/controller_resource_spec.rb
84
+ - spec/cancan/exceptions_spec.rb
85
+ - spec/cancan/inherited_resource_spec.rb
86
+ - spec/cancan/matchers_spec.rb
87
+ - spec/cancan/model_adapters/active_record_adapter_spec.rb
88
+ - spec/cancan/model_adapters/data_mapper_adapter_spec.rb
89
+ - spec/cancan/model_adapters/default_adapter_spec.rb
90
+ - spec/cancan/model_adapters/mongoid_adapter_spec.rb
91
+ - spec/cancan/rule_spec.rb
92
+ - spec/matchers.rb
93
+ - spec/README.rdoc
94
+ - spec/spec.opts
95
+ - spec/spec_helper.rb
96
+ - CHANGELOG.rdoc
97
+ - CONTRIBUTING.md
98
+ - Gemfile
99
+ - LICENSE
100
+ - Rakefile
101
+ - README.rdoc
102
+ - init.rb
103
+ homepage: http://github.com/bryanrite/cancancan
104
+ licenses: []
105
+ metadata: {}
106
+ post_install_message:
107
+ rdoc_options: []
108
+ require_paths:
109
+ - lib
110
+ required_ruby_version: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ! '>='
113
+ - !ruby/object:Gem::Version
114
+ version: '0'
115
+ required_rubygems_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ! '>='
118
+ - !ruby/object:Gem::Version
119
+ version: 1.3.4
120
+ requirements: []
121
+ rubyforge_project: cancancan
122
+ rubygems_version: 2.1.11
123
+ signing_key:
124
+ specification_version: 4
125
+ summary: Simple authorization solution for Rails.
126
+ test_files: []