pundit 2.0.1 → 2.3.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.
data/spec/pundit_spec.rb CHANGED
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "spec_helper"
2
4
 
3
- describe Pundit do
5
+ RSpec.describe Pundit do
4
6
  let(:user) { double }
5
7
  let(:post) { Post.new(user) }
6
8
  let(:customer_post) { Customer::Post.new(user) }
@@ -8,25 +10,48 @@ describe Pundit do
8
10
  let(:comment) { Comment.new }
9
11
  let(:comment_four_five_six) { CommentFourFiveSix.new }
10
12
  let(:article) { Article.new }
11
- let(:controller) { Controller.new(user, "update", {}) }
12
13
  let(:artificial_blog) { ArtificialBlog.new }
13
14
  let(:article_tag) { ArticleTag.new }
14
- let(:comments_relation) { CommentsRelation.new }
15
- let(:empty_comments_relation) { CommentsRelation.new(true) }
15
+ let(:comments_relation) { CommentsRelation.new(empty: false) }
16
+ let(:empty_comments_relation) { CommentsRelation.new(empty: true) }
16
17
  let(:tag_four_five_six) { ProjectOneTwoThree::TagFourFiveSix.new(user) }
17
18
  let(:avatar_four_five_six) { ProjectOneTwoThree::AvatarFourFiveSix.new }
18
19
  let(:wiki) { Wiki.new }
19
- let(:thread) { Thread.new }
20
20
 
21
21
  describe ".authorize" do
22
22
  it "infers the policy and authorizes based on it" do
23
23
  expect(Pundit.authorize(user, post, :update?)).to be_truthy
24
24
  end
25
25
 
26
+ it "returns the record on successful authorization" do
27
+ expect(Pundit.authorize(user, post, :update?)).to eq(post)
28
+ end
29
+
30
+ it "returns the record when passed record with namespace " do
31
+ expect(Pundit.authorize(user, [:project, comment], :update?)).to eq(comment)
32
+ end
33
+
34
+ it "returns the record when passed record with nested namespace " do
35
+ expect(Pundit.authorize(user, [:project, :admin, comment], :update?)).to eq(comment)
36
+ end
37
+
38
+ it "returns the policy name symbol when passed record with headless policy" do
39
+ expect(Pundit.authorize(user, :publication, :create?)).to eq(:publication)
40
+ end
41
+
42
+ it "returns the class when passed record not a particular instance" do
43
+ expect(Pundit.authorize(user, Post, :show?)).to eq(Post)
44
+ end
45
+
26
46
  it "can be given a different policy class" do
27
47
  expect(Pundit.authorize(user, post, :create?, policy_class: PublicationPolicy)).to be_truthy
28
48
  end
29
49
 
50
+ it "can be given a different policy class using namespaces" do
51
+ expect(PublicationPolicy).to receive(:new).with(user, comment).and_call_original
52
+ expect(Pundit.authorize(user, [:project, comment], :create?, policy_class: PublicationPolicy)).to be_truthy
53
+ end
54
+
30
55
  it "works with anonymous class policies" do
31
56
  expect(Pundit.authorize(user, article_tag, :show?)).to be_truthy
32
57
  expect { Pundit.authorize(user, article_tag, :destroy?) }.to raise_error(Pundit::NotAuthorizedError)
@@ -36,7 +61,7 @@ describe Pundit do
36
61
  # rubocop:disable Style/MultilineBlockChain
37
62
  expect do
38
63
  Pundit.authorize(user, post, :destroy?)
39
- end.to raise_error(Pundit::NotAuthorizedError, "not allowed to destroy? this #<Post>") do |error|
64
+ end.to raise_error(Pundit::NotAuthorizedError, "not allowed to destroy? this Post") do |error|
40
65
  expect(error.query).to eq :destroy?
41
66
  expect(error.record).to eq post
42
67
  expect(error.policy).to eq Pundit.policy(user, post)
@@ -44,6 +69,18 @@ describe Pundit do
44
69
  # rubocop:enable Style/MultilineBlockChain
45
70
  end
46
71
 
72
+ it "raises an error with a the record, query and action when the record is namespaced" do
73
+ # rubocop:disable Style/MultilineBlockChain
74
+ expect do
75
+ Pundit.authorize(user, [:project, :admin, comment], :destroy?)
76
+ end.to raise_error(Pundit::NotAuthorizedError, "not allowed to destroy? this Comment") do |error|
77
+ expect(error.query).to eq :destroy?
78
+ expect(error.record).to eq comment
79
+ expect(error.policy).to eq Pundit.policy(user, [:project, :admin, comment])
80
+ end
81
+ # rubocop:enable Style/MultilineBlockChain
82
+ end
83
+
47
84
  it "raises an error with a invalid policy constructor" do
48
85
  expect do
49
86
  Pundit.authorize(user, wiki, :update?)
@@ -358,223 +395,26 @@ describe Pundit do
358
395
  end
359
396
  end
360
397
 
361
- describe "#verify_authorized" do
362
- it "does nothing when authorized" do
363
- controller.authorize(post)
364
- controller.verify_authorized
365
- end
366
-
367
- it "raises an exception when not authorized" do
368
- expect { controller.verify_authorized }.to raise_error(Pundit::AuthorizationNotPerformedError)
369
- end
370
- end
371
-
372
- describe "#verify_policy_scoped" do
373
- it "does nothing when policy_scope is used" do
374
- controller.policy_scope(Post)
375
- controller.verify_policy_scoped
376
- end
377
-
378
- it "raises an exception when policy_scope is not used" do
379
- expect { controller.verify_policy_scoped }.to raise_error(Pundit::PolicyScopingNotPerformedError)
380
- end
381
- end
382
-
383
- describe "#pundit_policy_authorized?" do
384
- it "is true when authorized" do
385
- controller.authorize(post)
386
- expect(controller.pundit_policy_authorized?).to be true
387
- end
388
-
389
- it "is false when not authorized" do
390
- expect(controller.pundit_policy_authorized?).to be false
391
- end
392
- end
393
-
394
- describe "#pundit_policy_scoped?" do
395
- it "is true when policy_scope is used" do
396
- controller.policy_scope(Post)
397
- expect(controller.pundit_policy_scoped?).to be true
398
- end
399
-
400
- it "is false when policy scope is not used" do
401
- expect(controller.pundit_policy_scoped?).to be false
402
- end
403
- end
404
-
405
- describe "#authorize" do
406
- it "infers the policy name and authorizes based on it" do
407
- expect(controller.authorize(post)).to be_truthy
408
- end
409
-
410
- it "returns the record on successful authorization" do
411
- expect(controller.authorize(post)).to be(post)
412
- end
413
-
414
- it "can be given a different permission to check" do
415
- expect(controller.authorize(post, :show?)).to be_truthy
416
- expect { controller.authorize(post, :destroy?) }.to raise_error(Pundit::NotAuthorizedError)
417
- end
418
-
419
- it "can be given a different policy class" do
420
- expect(controller.authorize(post, :create?, policy_class: PublicationPolicy)).to be_truthy
421
- end
422
-
423
- it "works with anonymous class policies" do
424
- expect(controller.authorize(article_tag, :show?)).to be_truthy
425
- expect { controller.authorize(article_tag, :destroy?) }.to raise_error(Pundit::NotAuthorizedError)
426
- end
427
-
428
- it "throws an exception when the permission check fails" do
429
- expect { controller.authorize(Post.new) }.to raise_error(Pundit::NotAuthorizedError)
430
- end
431
-
432
- it "throws an exception when a policy cannot be found" do
433
- expect { controller.authorize(Article) }.to raise_error(Pundit::NotDefinedError)
434
- end
435
-
436
- it "caches the policy" do
437
- expect(controller.policies[post]).to be_nil
438
- controller.authorize(post)
439
- expect(controller.policies[post]).not_to be_nil
440
- end
441
-
442
- it "raises an error when the given record is nil" do
443
- expect { controller.authorize(nil, :destroy?) }.to raise_error(Pundit::NotAuthorizedError)
444
- end
445
-
446
- it "raises an error with a invalid policy constructor" do
447
- expect { controller.authorize(wiki, :destroy?) }.to raise_error(Pundit::InvalidConstructorError)
448
- end
449
- end
450
-
451
- describe "#skip_authorization" do
452
- it "disables authorization verification" do
453
- controller.skip_authorization
454
- expect { controller.verify_authorized }.not_to raise_error
455
- end
456
- end
457
-
458
- describe "#skip_policy_scope" do
459
- it "disables policy scope verification" do
460
- controller.skip_policy_scope
461
- expect { controller.verify_policy_scoped }.not_to raise_error
462
- end
463
- end
464
-
465
- describe "#pundit_user" do
466
- it "returns the same thing as current_user" do
467
- expect(controller.pundit_user).to eq controller.current_user
468
- end
469
- end
470
-
471
- describe "#policy" do
472
- it "returns an instantiated policy" do
473
- policy = controller.policy(post)
474
- expect(policy.user).to eq user
475
- expect(policy.post).to eq post
476
- end
477
-
478
- it "throws an exception if the given policy can't be found" do
479
- expect { controller.policy(article) }.to raise_error(Pundit::NotDefinedError)
480
- end
481
-
482
- it "raises an error with a invalid policy constructor" do
483
- expect { controller.policy(wiki) }.to raise_error(Pundit::InvalidConstructorError)
484
- end
485
-
486
- it "allows policy to be injected" do
487
- new_policy = OpenStruct.new
488
- controller.policies[post] = new_policy
489
-
490
- expect(controller.policy(post)).to eq new_policy
491
- end
492
- end
493
-
494
- describe "#policy_scope" do
495
- it "returns an instantiated policy scope" do
496
- expect(controller.policy_scope(Post)).to eq :published
497
- end
498
-
499
- it "allows policy scope class to be overriden" do
500
- expect(controller.policy_scope(Post, policy_scope_class: PublicationPolicy::Scope)).to eq :published
501
- end
502
-
503
- it "throws an exception if the given policy can't be found" do
504
- expect { controller.policy_scope(Article) }.to raise_error(Pundit::NotDefinedError)
505
- end
398
+ describe ".included" do
399
+ it "includes Authorization module" do
400
+ klass = Class.new
506
401
 
507
- it "raises an error with a invalid policy scope constructor" do
508
- expect { controller.policy_scope(Wiki) }.to raise_error(Pundit::InvalidConstructorError)
509
- end
510
-
511
- it "allows policy_scope to be injected" do
512
- new_scope = OpenStruct.new
513
- controller.policy_scopes[Post] = new_scope
514
-
515
- expect(controller.policy_scope(Post)).to eq new_scope
516
- end
517
- end
518
-
519
- describe "#permitted_attributes" do
520
- it "checks policy for permitted attributes" do
521
- params = ActionController::Parameters.new(post: {
522
- title: "Hello",
523
- votes: 5,
524
- admin: true
525
- })
526
-
527
- action = "update"
402
+ ActiveSupport::Deprecation.silence do
403
+ klass.include Pundit
404
+ end
528
405
 
529
- expect(Controller.new(user, action, params).permitted_attributes(post).to_h).to eq(
530
- "title" => "Hello",
531
- "votes" => 5
532
- )
533
- expect(Controller.new(double, action, params).permitted_attributes(post).to_h).to eq("votes" => 5)
406
+ expect(klass).to include Pundit::Authorization
534
407
  end
535
408
 
536
- it "checks policy for permitted attributes for record of a ActiveModel type" do
537
- params = ActionController::Parameters.new(customer_post: {
538
- title: "Hello",
539
- votes: 5,
540
- admin: true
541
- })
542
-
543
- action = "update"
409
+ it "warns about deprecation" do
410
+ klass = Class.new
411
+ allow(ActiveSupport::Deprecation).to receive(:warn)
544
412
 
545
- expect(Controller.new(user, action, params).permitted_attributes(customer_post).to_h).to eq(
546
- "title" => "Hello",
547
- "votes" => 5
548
- )
549
- expect(Controller.new(double, action, params).permitted_attributes(customer_post).to_h).to eq(
550
- "votes" => 5
551
- )
552
- end
553
- end
413
+ ActiveSupport::Deprecation.silence do
414
+ klass.include Pundit
415
+ end
554
416
 
555
- describe "#permitted_attributes_for_action" do
556
- it "is checked if it is defined in the policy" do
557
- params = ActionController::Parameters.new(post: {
558
- title: "Hello",
559
- body: "blah",
560
- votes: 5,
561
- admin: true
562
- })
563
-
564
- action = "revise"
565
- expect(Controller.new(user, action, params).permitted_attributes(post).to_h).to eq("body" => "blah")
566
- end
567
-
568
- it "can be explicitly set" do
569
- params = ActionController::Parameters.new(post: {
570
- title: "Hello",
571
- body: "blah",
572
- votes: 5,
573
- admin: true
574
- })
575
-
576
- action = "update"
577
- expect(Controller.new(user, action, params).permitted_attributes(post, :revise).to_h).to eq("body" => "blah")
417
+ expect(ActiveSupport::Deprecation).to have_received(:warn).with start_with("'include Pundit' is deprecated")
578
418
  end
579
419
  end
580
420
 
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "simplecov"
4
+ SimpleCov.start do
5
+ add_filter "/spec/"
6
+ end
7
+
1
8
  require "pundit"
2
9
  require "pundit/rspec"
3
10
 
@@ -9,22 +16,6 @@ require "active_support/core_ext"
9
16
  require "active_model/naming"
10
17
  require "action_controller/metal/strong_parameters"
11
18
 
12
- I18n.enforce_available_locales = false
13
-
14
- module PunditSpecHelper
15
- extend RSpec::Matchers::DSL
16
-
17
- matcher :be_truthy do
18
- match do |actual|
19
- actual
20
- end
21
- end
22
- end
23
-
24
- RSpec.configure do |config|
25
- config.include PunditSpecHelper
26
- end
27
-
28
19
  class PostPolicy < Struct.new(:user, :post)
29
20
  class Scope < Struct.new(:user, :scope)
30
21
  def resolve
@@ -84,15 +75,12 @@ module Customer
84
75
  def self.policy_class
85
76
  PostPolicy
86
77
  end
87
-
88
- def policy_class
89
- self.class.policy_class
90
- end
91
78
  end
92
79
  end
93
80
 
94
81
  class CommentScope
95
82
  attr_reader :original_object
83
+
96
84
  def initialize(original_object)
97
85
  @original_object = original_object
98
86
  end
@@ -127,7 +115,7 @@ class Comment
127
115
  end
128
116
 
129
117
  class CommentsRelation
130
- def initialize(empty = false)
118
+ def initialize(empty: false)
131
119
  @empty = empty
132
120
  end
133
121
 
@@ -135,7 +123,7 @@ class CommentsRelation
135
123
  @empty
136
124
  end
137
125
 
138
- def model_name
126
+ def self.model_name
139
127
  Comment.model_name
140
128
  end
141
129
  end
@@ -172,6 +160,10 @@ class CriteriaPolicy < Struct.new(:user, :criteria); end
172
160
 
173
161
  module Project
174
162
  class CommentPolicy < Struct.new(:user, :comment)
163
+ def update?
164
+ true
165
+ end
166
+
175
167
  class Scope < Struct.new(:user, :scope)
176
168
  def resolve
177
169
  scope
@@ -188,6 +180,18 @@ module Project
188
180
  end
189
181
  end
190
182
  end
183
+
184
+ module Admin
185
+ class CommentPolicy < Struct.new(:user, :comment)
186
+ def update?
187
+ true
188
+ end
189
+
190
+ def destroy?
191
+ false
192
+ end
193
+ end
194
+ end
191
195
  end
192
196
 
193
197
  class DenierPolicy < Struct.new(:user, :record)
@@ -197,11 +201,11 @@ class DenierPolicy < Struct.new(:user, :record)
197
201
  end
198
202
 
199
203
  class Controller
200
- include Pundit
204
+ include Pundit::Authorization
201
205
  # Mark protected methods public so they may be called in test
202
- # rubocop:disable Layout/AccessModifierIndentation, Style/AccessModifierDeclarations
203
- public(*Pundit.protected_instance_methods)
204
- # rubocop:enable Layout/AccessModifierIndentation, Style/AccessModifierDeclarations
206
+ # rubocop:disable Style/AccessModifierDeclarations
207
+ public(*Pundit::Authorization.protected_instance_methods)
208
+ # rubocop:enable Style/AccessModifierDeclarations
205
209
 
206
210
  attr_reader :current_user, :action_name, :params
207
211
 
@@ -229,6 +233,7 @@ class NilClassPolicy < Struct.new(:user, :record)
229
233
  end
230
234
 
231
235
  class Wiki; end
236
+
232
237
  class WikiPolicy
233
238
  class Scope
234
239
  # deliberate typo method
@@ -239,6 +244,7 @@ end
239
244
  class Thread
240
245
  def self.all; end
241
246
  end
247
+
242
248
  class ThreadPolicy < Struct.new(:user, :thread)
243
249
  class Scope < Struct.new(:user, :scope)
244
250
  def resolve
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pundit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Nicklas
8
8
  - Varvet AB
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-01-18 00:00:00.000000000 Z
12
+ date: 2022-12-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -25,6 +25,146 @@ dependencies:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: 3.0.0
28
+ - !ruby/object:Gem::Dependency
29
+ name: actionpack
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: 3.0.0
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.0
42
+ - !ruby/object:Gem::Dependency
43
+ name: activemodel
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: 3.0.0
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 3.0.0
56
+ - !ruby/object:Gem::Dependency
57
+ name: bundler
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: pry
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: railties
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: 3.0.0
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: 3.0.0
98
+ - !ruby/object:Gem::Dependency
99
+ name: rake
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: rspec
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: 3.0.0
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: 3.0.0
126
+ - !ruby/object:Gem::Dependency
127
+ name: rubocop
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - '='
131
+ - !ruby/object:Gem::Version
132
+ version: 1.24.0
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - '='
138
+ - !ruby/object:Gem::Version
139
+ version: 1.24.0
140
+ - !ruby/object:Gem::Dependency
141
+ name: simplecov
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ version: 0.17.0
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: 0.17.0
154
+ - !ruby/object:Gem::Dependency
155
+ name: yard
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ">="
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
28
168
  description: Object oriented authorization for Rails applications
29
169
  email:
30
170
  - jonas.nicklas@gmail.com
@@ -44,6 +184,7 @@ files:
44
184
  - LICENSE.txt
45
185
  - README.md
46
186
  - Rakefile
187
+ - config/rubocop-rspec.yml
47
188
  - lib/generators/pundit/install/USAGE
48
189
  - lib/generators/pundit/install/install_generator.rb
49
190
  - lib/generators/pundit/install/templates/application_policy.rb
@@ -55,10 +196,13 @@ files:
55
196
  - lib/generators/test_unit/policy_generator.rb
56
197
  - lib/generators/test_unit/templates/policy_test.rb
57
198
  - lib/pundit.rb
199
+ - lib/pundit/authorization.rb
58
200
  - lib/pundit/policy_finder.rb
59
201
  - lib/pundit/rspec.rb
60
202
  - lib/pundit/version.rb
61
203
  - pundit.gemspec
204
+ - spec/authorization_spec.rb
205
+ - spec/generators_spec.rb
62
206
  - spec/policies/post_policy_spec.rb
63
207
  - spec/policy_finder_spec.rb
64
208
  - spec/pundit_spec.rb
@@ -67,7 +211,7 @@ homepage: https://github.com/varvet/pundit
67
211
  licenses:
68
212
  - MIT
69
213
  metadata: {}
70
- post_install_message:
214
+ post_install_message:
71
215
  rdoc_options: []
72
216
  require_paths:
73
217
  - lib
@@ -82,12 +226,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
226
  - !ruby/object:Gem::Version
83
227
  version: '0'
84
228
  requirements: []
85
- rubyforge_project:
86
- rubygems_version: 2.5.2
87
- signing_key:
229
+ rubygems_version: 3.3.7
230
+ signing_key:
88
231
  specification_version: 4
89
232
  summary: OO authorization for Rails
90
233
  test_files:
234
+ - spec/authorization_spec.rb
235
+ - spec/generators_spec.rb
91
236
  - spec/policies/post_policy_spec.rb
92
237
  - spec/policy_finder_spec.rb
93
238
  - spec/pundit_spec.rb