Skip to content

Commit cbaa0ab

Browse files
authored
Merge pull request #845 from eizengan/patch-1
Link to changelog in gemspec
2 parents d60d6f4 + 719d81f commit cbaa0ab

File tree

6 files changed

+47
-20
lines changed

6 files changed

+47
-20
lines changed

.github/workflows/main.yml

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ jobs:
8686
8787
coverage-check:
8888
permissions:
89+
contents: read
8990
checks: write
9091
needs: test
9192
runs-on: ubuntu-latest

.rubocop.yml

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1+
inherit_from: .rubocop_ignore_git.yml
2+
13
AllCops:
24
TargetRubyVersion: 3.1
3-
Exclude:
4-
- "lib/generators/**/templates/**/*"
5-
<% `git status --ignored --porcelain`.lines.grep(/^!! /).each do |path| %>
6-
- <%= path.sub(/^!! /, '').sub(/\/$/, '/**/*') %>
7-
<% end %>
85
SuggestExtensions: false
96
NewCops: disable
107

8+
Gemspec/DeprecatedAttributeAssignment:
9+
Enabled: true
10+
11+
Gemspec/DevelopmentDependencies:
12+
Enabled: true
13+
1114
Metrics/BlockLength:
1215
Exclude:
1316
- "**/*_spec.rb"
17+
- pundit.gemspec
1418

1519
Metrics/MethodLength:
1620
Max: 40
@@ -24,7 +28,7 @@ Layout/LineLength:
2428
Max: 120
2529

2630
Gemspec/RequiredRubyVersion:
27-
Enabled: false
31+
Enabled: false
2832

2933
Layout/ParameterAlignment:
3034
EnforcedStyle: with_fixed_indentation
@@ -47,8 +51,8 @@ Layout/EndAlignment:
4751

4852
Style/PercentLiteralDelimiters:
4953
PreferredDelimiters:
50-
'%w': "[]"
51-
'%W': "[]"
54+
"%w": "[]"
55+
"%W": "[]"
5256

5357
Style/StringLiterals:
5458
EnforcedStyle: double_quotes

.rubocop_ignore_git.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This is here so we can keep YAML syntax highlight in the main file.
2+
AllCops:
3+
Exclude:
4+
- "lib/generators/**/templates/**/*"
5+
<% `git status --ignored --porcelain`.lines.grep(/^!! /).each do |path| %>
6+
- <%= path.sub(/^!! /, '').sub(/\/$/, '/**/*') %>
7+
<% end %>

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
## Added
66

77
- Add `Pundit::Authorization#pundit_reset!` hook to reset the policy and policy scope cache. (#830)
8+
- Add links to gemspec. (#845)
89

910
## Changed
1011

Gemfile

+18
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ source "https://rubygems.org"
44

55
gemspec
66

7+
# Rails-related - for testing purposes
8+
gem "actionpack", ">= 3.0.0" # Used to test strong parameters
9+
gem "activemodel", ">= 3.0.0" # Used to test ActiveModel::Naming
10+
gem "railties", ">= 3.0.0" # Used to test generators
11+
12+
# Testing
13+
gem "rspec", ">= 3.0.0"
14+
gem "simplecov", ">= 0.17.0"
15+
16+
# Development tools
17+
gem "bundler"
18+
gem "rake"
19+
gem "rubocop"
20+
gem "rubocop-performance"
21+
gem "rubocop-rspec"
22+
gem "yard"
23+
gem "zeitwerk"
24+
725
# Affects us on JRuby 9.3.15.
826
#
927
# @see https://github.com/rails/rails/issues/54260

pundit.gemspec

+8-12
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,16 @@ Gem::Specification.new do |gem|
1616

1717
gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
1818
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
19-
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
2019
gem.require_paths = ["lib"]
2120

22-
gem.metadata = { "rubygems_mfa_required" => "true" }
21+
gem.metadata = {
22+
"rubygems_mfa_required" => "true",
23+
"bug_tracker_uri" => "https://github.com/varvet/pundit/issues",
24+
"changelog_uri" => "https://github.com/varvet/pundit/blob/main/CHANGELOG.md",
25+
"documentation_uri" => "https://github.com/varvet/pundit/blob/main/README.md",
26+
"homepage_uri" => "https://github.com/varvet/pundit",
27+
"source_code_uri" => "https://github.com/varvet/pundit"
28+
}
2329

2430
gem.add_dependency "activesupport", ">= 3.0.0"
25-
gem.add_development_dependency "actionpack", ">= 3.0.0" # Used to test strong parameters.
26-
gem.add_development_dependency "activemodel", ">= 3.0.0" # Used to test ActiveModel::Naming.
27-
gem.add_development_dependency "bundler"
28-
gem.add_development_dependency "railties", ">= 3.0.0" # Used to test generators.
29-
gem.add_development_dependency "rake"
30-
gem.add_development_dependency "rspec", ">= 3.0.0"
31-
gem.add_development_dependency "rubocop"
32-
gem.add_development_dependency "simplecov", ">= 0.17.0"
33-
gem.add_development_dependency "yard"
34-
gem.add_development_dependency "zeitwerk"
3531
end

0 commit comments

Comments
 (0)