authorizable 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +33 -0
  3. data/.travis.yml +14 -0
  4. data/Gemfile +6 -0
  5. data/Gemfile.lock +178 -0
  6. data/LICENSE +22 -0
  7. data/README.md +80 -0
  8. data/Rakefile +1 -0
  9. data/authorizable.gemspec +40 -0
  10. data/config/locales/en.yml +6 -0
  11. data/lib/authorizable.rb +31 -0
  12. data/lib/authorizable/controller.rb +156 -0
  13. data/lib/authorizable/model.rb +162 -0
  14. data/lib/authorizable/permission_utilities.rb +89 -0
  15. data/lib/authorizable/permissions.rb +112 -0
  16. data/lib/authorizable/version.rb +5 -0
  17. data/spec/integration/controller_spec.rb +127 -0
  18. data/spec/integration/model_spec.rb +169 -0
  19. data/spec/rails_helper.rb +14 -0
  20. data/spec/spec_helper.rb +48 -0
  21. data/spec/support/definitions.rb +16 -0
  22. data/spec/support/factories.rb +17 -0
  23. data/spec/support/factory_girl.rb +7 -0
  24. data/spec/support/rails_app/Rakefile +6 -0
  25. data/spec/support/rails_app/app/assets/images/.keep +0 -0
  26. data/spec/support/rails_app/app/assets/javascripts/application.js +16 -0
  27. data/spec/support/rails_app/app/assets/javascripts/some_resources.js +2 -0
  28. data/spec/support/rails_app/app/assets/javascripts/users.js +2 -0
  29. data/spec/support/rails_app/app/assets/stylesheets/application.css +15 -0
  30. data/spec/support/rails_app/app/assets/stylesheets/scaffold.css +56 -0
  31. data/spec/support/rails_app/app/assets/stylesheets/some_resources.css +4 -0
  32. data/spec/support/rails_app/app/assets/stylesheets/users.css +4 -0
  33. data/spec/support/rails_app/app/controllers/application_controller.rb +14 -0
  34. data/spec/support/rails_app/app/controllers/events_controller.rb +58 -0
  35. data/spec/support/rails_app/app/controllers/users_controller.rb +58 -0
  36. data/spec/support/rails_app/app/helpers/application_helper.rb +2 -0
  37. data/spec/support/rails_app/app/helpers/events_helper.rb +2 -0
  38. data/spec/support/rails_app/app/helpers/users_helper.rb +2 -0
  39. data/spec/support/rails_app/app/mailers/.keep +0 -0
  40. data/spec/support/rails_app/app/models/collaboration.rb +16 -0
  41. data/spec/support/rails_app/app/models/concerns/.keep +0 -0
  42. data/spec/support/rails_app/app/models/discount.rb +3 -0
  43. data/spec/support/rails_app/app/models/event.rb +5 -0
  44. data/spec/support/rails_app/app/models/user.rb +9 -0
  45. data/spec/support/rails_app/app/views/events/_form.html.erb +17 -0
  46. data/spec/support/rails_app/app/views/events/edit.html.erb +6 -0
  47. data/spec/support/rails_app/app/views/events/index.html.erb +25 -0
  48. data/spec/support/rails_app/app/views/events/new.html.erb +5 -0
  49. data/spec/support/rails_app/app/views/events/show.html.erb +4 -0
  50. data/spec/support/rails_app/app/views/layouts/application.html.erb +14 -0
  51. data/spec/support/rails_app/app/views/users/_form.html.erb +17 -0
  52. data/spec/support/rails_app/app/views/users/edit.html.erb +6 -0
  53. data/spec/support/rails_app/app/views/users/index.html.erb +25 -0
  54. data/spec/support/rails_app/app/views/users/new.html.erb +5 -0
  55. data/spec/support/rails_app/app/views/users/show.html.erb +4 -0
  56. data/spec/support/rails_app/bin/bundle +3 -0
  57. data/spec/support/rails_app/bin/rails +8 -0
  58. data/spec/support/rails_app/bin/rake +4 -0
  59. data/spec/support/rails_app/config.ru +0 -0
  60. data/spec/support/rails_app/config/application.rb +29 -0
  61. data/spec/support/rails_app/config/boot.rb +3 -0
  62. data/spec/support/rails_app/config/database.yml +25 -0
  63. data/spec/support/rails_app/config/environment.rb +5 -0
  64. data/spec/support/rails_app/config/environments/development.rb +41 -0
  65. data/spec/support/rails_app/config/environments/production.rb +79 -0
  66. data/spec/support/rails_app/config/environments/test.rb +42 -0
  67. data/spec/support/rails_app/config/initializers/assets.rb +11 -0
  68. data/spec/support/rails_app/config/initializers/backtrace_silencers.rb +7 -0
  69. data/spec/support/rails_app/config/initializers/cookies_serializer.rb +3 -0
  70. data/spec/support/rails_app/config/initializers/filter_parameter_logging.rb +4 -0
  71. data/spec/support/rails_app/config/initializers/inflections.rb +16 -0
  72. data/spec/support/rails_app/config/initializers/mime_types.rb +4 -0
  73. data/spec/support/rails_app/config/initializers/session_store.rb +3 -0
  74. data/spec/support/rails_app/config/initializers/wrap_parameters.rb +14 -0
  75. data/spec/support/rails_app/config/locales/en.yml +23 -0
  76. data/spec/support/rails_app/config/routes.rb +60 -0
  77. data/spec/support/rails_app/config/secrets.yml +22 -0
  78. data/spec/support/rails_app/db/development.sqlite3 +0 -0
  79. data/spec/support/rails_app/db/migrate/20141231134904_create_users.rb +8 -0
  80. data/spec/support/rails_app/db/migrate/20150102221633_create_collaborations.rb +13 -0
  81. data/spec/support/rails_app/db/migrate/20150102225507_create_events.rb +9 -0
  82. data/spec/support/rails_app/db/migrate/20150104171110_create_discounts.rb +11 -0
  83. data/spec/support/rails_app/db/schema.rb +45 -0
  84. data/spec/support/rails_app/db/seeds.rb +7 -0
  85. data/spec/support/rails_app/db/test.sqlite3 +0 -0
  86. data/spec/support/rails_app/log/development.log +26296 -0
  87. data/spec/support/rails_app/public/404.html +67 -0
  88. data/spec/support/rails_app/public/422.html +67 -0
  89. data/spec/support/rails_app/public/500.html +66 -0
  90. data/spec/support/rails_app/public/favicon.ico +0 -0
  91. data/spec/support/rails_app/public/robots.txt +5 -0
  92. data/spec/unit/permission_utilities_spec.rb +157 -0
  93. data/spec/unit/permissions_spec.rb +65 -0
  94. metadata +352 -0
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/404.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The page you were looking for doesn't exist.</h1>
62
+ <p>You may have mistyped the address or the page may have moved.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/422.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The change you wanted was rejected.</h1>
62
+ <p>Maybe you tried to change something you didn't have access to.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-agent: *
5
+ # Disallow: /
@@ -0,0 +1,157 @@
1
+ require 'spec_helper'
2
+
3
+ describe Authorizable::PermissionUtilities do
4
+ let(:util){ Authorizable::PermissionUtilities }
5
+
6
+ describe 'permissions' do
7
+ it 'mirrors the source definitions' do
8
+ Authorizable::Permissions.definitions = 'test'
9
+ expect(util.permissions).to eq(Authorizable::Permissions.definitions)
10
+ end
11
+ end
12
+
13
+ describe 'set_for_role' do
14
+ before(:each) do
15
+ Authorizable::Permissions.definitions = {
16
+ one: [1, true],
17
+ two: [2, [true, false]],
18
+ three: [1, [true, true]]
19
+ }
20
+ end
21
+
22
+ it 'generates a hash for a particular role' do
23
+ set = util.set_for_role(1)
24
+
25
+ expect(set[:one]).to eq true
26
+ expect(set[:two]).to eq false
27
+ expect(set[:three]).to eq true
28
+ end
29
+
30
+ it 'generates a hash for the default role' do
31
+ set = util.set_for_role(0)
32
+
33
+ expect(set[:one]).to eq true
34
+ expect(set[:two]).to eq true
35
+ expect(set[:three]).to eq true
36
+ end
37
+ end
38
+
39
+ describe 'has_procs?' do
40
+ before(:each) do
41
+ Authorizable::Permissions.definitions = {
42
+ procs: [0, true, "", nil, ->{ 'here is a proc' }],
43
+ no_procs: [0, true, "", nil]
44
+ }
45
+ end
46
+
47
+ it 'has procs' do
48
+ result = util.has_procs?(:procs)
49
+ expect(result).to_not eq false
50
+ expect(result).to be_kind_of Proc
51
+ end
52
+
53
+ it 'does not have procs' do
54
+ result = util.has_procs?(:no_procs)
55
+ expect(result).to eq false
56
+ end
57
+ end
58
+
59
+ describe 'has_visibility_procs?' do
60
+ before(:each) do
61
+ Authorizable::Permissions.definitions = {
62
+ procs: [0, true, "", ->{ 'here is a proc' }],
63
+ no_procs: [0, true, ""]
64
+ }
65
+ end
66
+
67
+ it 'has procs' do
68
+ result = util.has_visibility_procs?(:procs)
69
+ expect(result).to_not eq false
70
+ expect(result).to be_kind_of Proc
71
+ end
72
+
73
+ it 'does not have procs' do
74
+ result = util.has_visibility_procs?(:no_procs)
75
+ expect(result).to eq false
76
+ end
77
+ end
78
+
79
+ describe 'should_render?' do
80
+ before(:each) do
81
+ Authorizable::Permissions.definitions = {
82
+ dont_show: [0, true, "", ->{ false }],
83
+ show: [0, true, ""]
84
+ }
85
+ end
86
+
87
+ it 'should render' do
88
+ result = util.should_render?(:show)
89
+ expect(result).to eq true
90
+ end
91
+
92
+ it 'should not render' do
93
+ result = util.should_render?(:dont_show)
94
+ expect(result).to eq false
95
+ end
96
+ end
97
+
98
+ context 'quick info' do
99
+ before(:each) do
100
+ Authorizable::Permissions.definitions = {
101
+ access: [Authorizable::Permissions::ACCESS, true, "Is Access", ->{ false }],
102
+ object: [Authorizable::Permissions::OBJECT, [false, true], ""]
103
+ }
104
+ end
105
+
106
+ describe 'description_for' do
107
+ it 'has a description' do
108
+ expect(util.description_for(:access)).to eq "Is Access"
109
+ end
110
+
111
+ it 'does not have a descirption' do
112
+ expect(util.description_for(:object)).to eq "Object"
113
+ end
114
+ end
115
+
116
+ describe 'value_for' do
117
+ it 'has a role' do
118
+ expect(util.value_for(:object, 1)).to eq true
119
+ end
120
+
121
+ it 'does not have a role' do
122
+ expect(util.value_for(:access)).to eq true
123
+ end
124
+ end
125
+
126
+ describe 'has_key?' do
127
+ it 'exists' do
128
+ expect(util.has_key?(:object)).to eq true
129
+ end
130
+
131
+ it 'non exists' do
132
+ expect(util.has_key?(:non_existant)).to eq false
133
+ end
134
+ end
135
+
136
+ describe 'is_access?' do
137
+ it 'is access' do
138
+ expect(util.is_access?(:access)).to eq true
139
+ end
140
+
141
+ it 'is not access' do
142
+ expect(util.is_access?(:object)).to eq false
143
+ end
144
+ end
145
+
146
+ describe 'is_object?' do
147
+ it 'is object' do
148
+ expect(util.is_object?(:object)).to eq true
149
+ end
150
+
151
+ it 'is not object' do
152
+ expect(util.is_object?(:access)).to eq false
153
+ end
154
+ end
155
+
156
+ end
157
+ end
@@ -0,0 +1,65 @@
1
+ require 'spec_helper'
2
+
3
+ describe Authorizable::Permissions do
4
+
5
+ describe 'set' do
6
+ it 'sets class attribute' do
7
+ Authorizable::Permissions.set(
8
+ edit_event: [Authorizable::OBJECT, true],
9
+ delete_event: [Authorizable::OBJECT, true, nil, ->(e, user){ e.hosted_by == user }, ->(e, user){ e.hosted_by == user }],
10
+ create_event: [Authorizable::ACCESS, true],
11
+ )
12
+
13
+ keys = Authorizable::Permissions.definitions.keys
14
+ expect(keys.count).to eq 3
15
+ expect(keys).to include(:edit_event)
16
+ expect(keys).to include(:delete_event)
17
+ expect(keys).to include(:create_event)
18
+ end
19
+
20
+ it 'expands crud' do
21
+ Authorizable::Permissions.definitions = {}
22
+ before_count = Authorizable::Permissions.definitions.keys.count
23
+ Authorizable::Permissions.set(
24
+ crud: [
25
+ event: [true, false, false]
26
+ ]
27
+ )
28
+
29
+ after_count = Authorizable::Permissions.definitions.keys.count
30
+ expect(after_count - before_count).to eq 4
31
+ end
32
+
33
+ it 'crud adds permissions' do
34
+ Authorizable::Permissions.set(
35
+ crud: [
36
+ event: [true, false, false]
37
+ ]
38
+ )
39
+
40
+ definitions = Authorizable::Permissions.definitions
41
+ keys = definitions.keys
42
+ expect(keys).to include(:edit_event)
43
+ expect(keys).to include(:delete_event)
44
+ expect(keys).to include(:create_event)
45
+ expect(keys).to include(:view_events)
46
+ end
47
+ end
48
+
49
+ describe 'can' do
50
+ it 'adds a permission to the definitions list' do
51
+ Authorizable::Permissions.module_eval do
52
+ can(:some_permission)
53
+ end
54
+ expect(Authorizable::Permissions.definitions.keys).to include(:some_permission)
55
+ end
56
+ end
57
+
58
+ describe 'add' do
59
+ it 'adds an entry' do
60
+ Authorizable::Permissions.add(:wat, [0, true])
61
+ expect(Authorizable::Permissions.definitions.keys).to include(:wat)
62
+ end
63
+ end
64
+
65
+ end
metadata ADDED
@@ -0,0 +1,352 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: authorizable
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.0
5
+ platform: ruby
6
+ authors:
7
+ - L. Preston Sego III
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-01-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 3.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 3.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: i18n
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rails
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '4'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '4'
69
+ - !ruby/object:Gem::Dependency
70
+ name: factory_girl_rails
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '4.4'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '4.4'
83
+ - !ruby/object:Gem::Dependency
84
+ name: awesome_print
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rspec-rails
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: sqlite3
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: pry-byebug
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ description: A gem for rails giving vast flexibility in authorization management.
154
+ email: LPSego3+dev@gmail.com
155
+ executables: []
156
+ extensions: []
157
+ extra_rdoc_files: []
158
+ files:
159
+ - ".gitignore"
160
+ - ".travis.yml"
161
+ - Gemfile
162
+ - Gemfile.lock
163
+ - LICENSE
164
+ - README.md
165
+ - Rakefile
166
+ - authorizable.gemspec
167
+ - config/locales/en.yml
168
+ - lib/authorizable.rb
169
+ - lib/authorizable/controller.rb
170
+ - lib/authorizable/model.rb
171
+ - lib/authorizable/permission_utilities.rb
172
+ - lib/authorizable/permissions.rb
173
+ - lib/authorizable/version.rb
174
+ - spec/integration/controller_spec.rb
175
+ - spec/integration/model_spec.rb
176
+ - spec/rails_helper.rb
177
+ - spec/spec_helper.rb
178
+ - spec/support/definitions.rb
179
+ - spec/support/factories.rb
180
+ - spec/support/factory_girl.rb
181
+ - spec/support/rails_app/Rakefile
182
+ - spec/support/rails_app/app/assets/images/.keep
183
+ - spec/support/rails_app/app/assets/javascripts/application.js
184
+ - spec/support/rails_app/app/assets/javascripts/some_resources.js
185
+ - spec/support/rails_app/app/assets/javascripts/users.js
186
+ - spec/support/rails_app/app/assets/stylesheets/application.css
187
+ - spec/support/rails_app/app/assets/stylesheets/scaffold.css
188
+ - spec/support/rails_app/app/assets/stylesheets/some_resources.css
189
+ - spec/support/rails_app/app/assets/stylesheets/users.css
190
+ - spec/support/rails_app/app/controllers/application_controller.rb
191
+ - spec/support/rails_app/app/controllers/events_controller.rb
192
+ - spec/support/rails_app/app/controllers/users_controller.rb
193
+ - spec/support/rails_app/app/helpers/application_helper.rb
194
+ - spec/support/rails_app/app/helpers/events_helper.rb
195
+ - spec/support/rails_app/app/helpers/users_helper.rb
196
+ - spec/support/rails_app/app/mailers/.keep
197
+ - spec/support/rails_app/app/models/collaboration.rb
198
+ - spec/support/rails_app/app/models/concerns/.keep
199
+ - spec/support/rails_app/app/models/discount.rb
200
+ - spec/support/rails_app/app/models/event.rb
201
+ - spec/support/rails_app/app/models/user.rb
202
+ - spec/support/rails_app/app/views/events/_form.html.erb
203
+ - spec/support/rails_app/app/views/events/edit.html.erb
204
+ - spec/support/rails_app/app/views/events/index.html.erb
205
+ - spec/support/rails_app/app/views/events/new.html.erb
206
+ - spec/support/rails_app/app/views/events/show.html.erb
207
+ - spec/support/rails_app/app/views/layouts/application.html.erb
208
+ - spec/support/rails_app/app/views/users/_form.html.erb
209
+ - spec/support/rails_app/app/views/users/edit.html.erb
210
+ - spec/support/rails_app/app/views/users/index.html.erb
211
+ - spec/support/rails_app/app/views/users/new.html.erb
212
+ - spec/support/rails_app/app/views/users/show.html.erb
213
+ - spec/support/rails_app/bin/bundle
214
+ - spec/support/rails_app/bin/rails
215
+ - spec/support/rails_app/bin/rake
216
+ - spec/support/rails_app/config.ru
217
+ - spec/support/rails_app/config/application.rb
218
+ - spec/support/rails_app/config/boot.rb
219
+ - spec/support/rails_app/config/database.yml
220
+ - spec/support/rails_app/config/environment.rb
221
+ - spec/support/rails_app/config/environments/development.rb
222
+ - spec/support/rails_app/config/environments/production.rb
223
+ - spec/support/rails_app/config/environments/test.rb
224
+ - spec/support/rails_app/config/initializers/assets.rb
225
+ - spec/support/rails_app/config/initializers/backtrace_silencers.rb
226
+ - spec/support/rails_app/config/initializers/cookies_serializer.rb
227
+ - spec/support/rails_app/config/initializers/filter_parameter_logging.rb
228
+ - spec/support/rails_app/config/initializers/inflections.rb
229
+ - spec/support/rails_app/config/initializers/mime_types.rb
230
+ - spec/support/rails_app/config/initializers/session_store.rb
231
+ - spec/support/rails_app/config/initializers/wrap_parameters.rb
232
+ - spec/support/rails_app/config/locales/en.yml
233
+ - spec/support/rails_app/config/routes.rb
234
+ - spec/support/rails_app/config/secrets.yml
235
+ - spec/support/rails_app/db/development.sqlite3
236
+ - spec/support/rails_app/db/migrate/20141231134904_create_users.rb
237
+ - spec/support/rails_app/db/migrate/20150102221633_create_collaborations.rb
238
+ - spec/support/rails_app/db/migrate/20150102225507_create_events.rb
239
+ - spec/support/rails_app/db/migrate/20150104171110_create_discounts.rb
240
+ - spec/support/rails_app/db/schema.rb
241
+ - spec/support/rails_app/db/seeds.rb
242
+ - spec/support/rails_app/db/test.sqlite3
243
+ - spec/support/rails_app/log/development.log
244
+ - spec/support/rails_app/public/404.html
245
+ - spec/support/rails_app/public/422.html
246
+ - spec/support/rails_app/public/500.html
247
+ - spec/support/rails_app/public/favicon.ico
248
+ - spec/support/rails_app/public/robots.txt
249
+ - spec/unit/permission_utilities_spec.rb
250
+ - spec/unit/permissions_spec.rb
251
+ homepage: https://github.com/NullVoxPopuli/authorizable
252
+ licenses:
253
+ - MIT
254
+ metadata: {}
255
+ post_install_message:
256
+ rdoc_options: []
257
+ require_paths:
258
+ - lib
259
+ required_ruby_version: !ruby/object:Gem::Requirement
260
+ requirements:
261
+ - - ">="
262
+ - !ruby/object:Gem::Version
263
+ version: '0'
264
+ required_rubygems_version: !ruby/object:Gem::Requirement
265
+ requirements:
266
+ - - ">="
267
+ - !ruby/object:Gem::Version
268
+ version: '0'
269
+ requirements: []
270
+ rubyforge_project:
271
+ rubygems_version: 2.4.3
272
+ signing_key:
273
+ specification_version: 4
274
+ summary: Authorizable-0.9.0
275
+ test_files:
276
+ - spec/integration/controller_spec.rb
277
+ - spec/integration/model_spec.rb
278
+ - spec/rails_helper.rb
279
+ - spec/spec_helper.rb
280
+ - spec/support/definitions.rb
281
+ - spec/support/factories.rb
282
+ - spec/support/factory_girl.rb
283
+ - spec/support/rails_app/Rakefile
284
+ - spec/support/rails_app/app/assets/images/.keep
285
+ - spec/support/rails_app/app/assets/javascripts/application.js
286
+ - spec/support/rails_app/app/assets/javascripts/some_resources.js
287
+ - spec/support/rails_app/app/assets/javascripts/users.js
288
+ - spec/support/rails_app/app/assets/stylesheets/application.css
289
+ - spec/support/rails_app/app/assets/stylesheets/scaffold.css
290
+ - spec/support/rails_app/app/assets/stylesheets/some_resources.css
291
+ - spec/support/rails_app/app/assets/stylesheets/users.css
292
+ - spec/support/rails_app/app/controllers/application_controller.rb
293
+ - spec/support/rails_app/app/controllers/events_controller.rb
294
+ - spec/support/rails_app/app/controllers/users_controller.rb
295
+ - spec/support/rails_app/app/helpers/application_helper.rb
296
+ - spec/support/rails_app/app/helpers/events_helper.rb
297
+ - spec/support/rails_app/app/helpers/users_helper.rb
298
+ - spec/support/rails_app/app/mailers/.keep
299
+ - spec/support/rails_app/app/models/collaboration.rb
300
+ - spec/support/rails_app/app/models/concerns/.keep
301
+ - spec/support/rails_app/app/models/discount.rb
302
+ - spec/support/rails_app/app/models/event.rb
303
+ - spec/support/rails_app/app/models/user.rb
304
+ - spec/support/rails_app/app/views/events/_form.html.erb
305
+ - spec/support/rails_app/app/views/events/edit.html.erb
306
+ - spec/support/rails_app/app/views/events/index.html.erb
307
+ - spec/support/rails_app/app/views/events/new.html.erb
308
+ - spec/support/rails_app/app/views/events/show.html.erb
309
+ - spec/support/rails_app/app/views/layouts/application.html.erb
310
+ - spec/support/rails_app/app/views/users/_form.html.erb
311
+ - spec/support/rails_app/app/views/users/edit.html.erb
312
+ - spec/support/rails_app/app/views/users/index.html.erb
313
+ - spec/support/rails_app/app/views/users/new.html.erb
314
+ - spec/support/rails_app/app/views/users/show.html.erb
315
+ - spec/support/rails_app/bin/bundle
316
+ - spec/support/rails_app/bin/rails
317
+ - spec/support/rails_app/bin/rake
318
+ - spec/support/rails_app/config.ru
319
+ - spec/support/rails_app/config/application.rb
320
+ - spec/support/rails_app/config/boot.rb
321
+ - spec/support/rails_app/config/database.yml
322
+ - spec/support/rails_app/config/environment.rb
323
+ - spec/support/rails_app/config/environments/development.rb
324
+ - spec/support/rails_app/config/environments/production.rb
325
+ - spec/support/rails_app/config/environments/test.rb
326
+ - spec/support/rails_app/config/initializers/assets.rb
327
+ - spec/support/rails_app/config/initializers/backtrace_silencers.rb
328
+ - spec/support/rails_app/config/initializers/cookies_serializer.rb
329
+ - spec/support/rails_app/config/initializers/filter_parameter_logging.rb
330
+ - spec/support/rails_app/config/initializers/inflections.rb
331
+ - spec/support/rails_app/config/initializers/mime_types.rb
332
+ - spec/support/rails_app/config/initializers/session_store.rb
333
+ - spec/support/rails_app/config/initializers/wrap_parameters.rb
334
+ - spec/support/rails_app/config/locales/en.yml
335
+ - spec/support/rails_app/config/routes.rb
336
+ - spec/support/rails_app/config/secrets.yml
337
+ - spec/support/rails_app/db/development.sqlite3
338
+ - spec/support/rails_app/db/migrate/20141231134904_create_users.rb
339
+ - spec/support/rails_app/db/migrate/20150102221633_create_collaborations.rb
340
+ - spec/support/rails_app/db/migrate/20150102225507_create_events.rb
341
+ - spec/support/rails_app/db/migrate/20150104171110_create_discounts.rb
342
+ - spec/support/rails_app/db/schema.rb
343
+ - spec/support/rails_app/db/seeds.rb
344
+ - spec/support/rails_app/db/test.sqlite3
345
+ - spec/support/rails_app/log/development.log
346
+ - spec/support/rails_app/public/404.html
347
+ - spec/support/rails_app/public/422.html
348
+ - spec/support/rails_app/public/500.html
349
+ - spec/support/rails_app/public/favicon.ico
350
+ - spec/support/rails_app/public/robots.txt
351
+ - spec/unit/permission_utilities_spec.rb
352
+ - spec/unit/permissions_spec.rb