Skip to content

Commit

Permalink
Merge pull request #845 from eizengan/patch-1
Browse files Browse the repository at this point in the history
Link to changelog in gemspec
  • Loading branch information
Burgestrand authored Feb 25, 2025
2 parents d60d6f4 + 719d81f commit cbaa0ab
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 20 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
coverage-check:
permissions:
contents: read
checks: write
needs: test
runs-on: ubuntu-latest
Expand Down
20 changes: 12 additions & 8 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
inherit_from: .rubocop_ignore_git.yml

AllCops:
TargetRubyVersion: 3.1
Exclude:
- "lib/generators/**/templates/**/*"
<% `git status --ignored --porcelain`.lines.grep(/^!! /).each do |path| %>
- <%= path.sub(/^!! /, '').sub(/\/$/, '/**/*') %>
<% end %>
SuggestExtensions: false
NewCops: disable

Gemspec/DeprecatedAttributeAssignment:
Enabled: true

Gemspec/DevelopmentDependencies:
Enabled: true

Metrics/BlockLength:
Exclude:
- "**/*_spec.rb"
- pundit.gemspec

Metrics/MethodLength:
Max: 40
Expand All @@ -24,7 +28,7 @@ Layout/LineLength:
Max: 120

Gemspec/RequiredRubyVersion:
Enabled: false
Enabled: false

Layout/ParameterAlignment:
EnforcedStyle: with_fixed_indentation
Expand All @@ -47,8 +51,8 @@ Layout/EndAlignment:

Style/PercentLiteralDelimiters:
PreferredDelimiters:
'%w': "[]"
'%W': "[]"
"%w": "[]"
"%W": "[]"

Style/StringLiterals:
EnforcedStyle: double_quotes
Expand Down
7 changes: 7 additions & 0 deletions .rubocop_ignore_git.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This is here so we can keep YAML syntax highlight in the main file.
AllCops:
Exclude:
- "lib/generators/**/templates/**/*"
<% `git status --ignored --porcelain`.lines.grep(/^!! /).each do |path| %>
- <%= path.sub(/^!! /, '').sub(/\/$/, '/**/*') %>
<% end %>
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
## Added

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

## Changed

Expand Down
18 changes: 18 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ source "https://rubygems.org"

gemspec

# Rails-related - for testing purposes
gem "actionpack", ">= 3.0.0" # Used to test strong parameters
gem "activemodel", ">= 3.0.0" # Used to test ActiveModel::Naming
gem "railties", ">= 3.0.0" # Used to test generators

# Testing
gem "rspec", ">= 3.0.0"
gem "simplecov", ">= 0.17.0"

# Development tools
gem "bundler"
gem "rake"
gem "rubocop"
gem "rubocop-performance"
gem "rubocop-rspec"
gem "yard"
gem "zeitwerk"

# Affects us on JRuby 9.3.15.
#
# @see https://github.com/rails/rails/issues/54260
Expand Down
20 changes: 8 additions & 12 deletions pundit.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,16 @@ Gem::Specification.new do |gem|

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

gem.metadata = { "rubygems_mfa_required" => "true" }
gem.metadata = {
"rubygems_mfa_required" => "true",
"bug_tracker_uri" => "https://github.com/varvet/pundit/issues",
"changelog_uri" => "https://github.com/varvet/pundit/blob/main/CHANGELOG.md",
"documentation_uri" => "https://github.com/varvet/pundit/blob/main/README.md",
"homepage_uri" => "https://github.com/varvet/pundit",
"source_code_uri" => "https://github.com/varvet/pundit"
}

gem.add_dependency "activesupport", ">= 3.0.0"
gem.add_development_dependency "actionpack", ">= 3.0.0" # Used to test strong parameters.
gem.add_development_dependency "activemodel", ">= 3.0.0" # Used to test ActiveModel::Naming.
gem.add_development_dependency "bundler"
gem.add_development_dependency "railties", ">= 3.0.0" # Used to test generators.
gem.add_development_dependency "rake"
gem.add_development_dependency "rspec", ">= 3.0.0"
gem.add_development_dependency "rubocop"
gem.add_development_dependency "simplecov", ">= 0.17.0"
gem.add_development_dependency "yard"
gem.add_development_dependency "zeitwerk"
end

0 comments on commit cbaa0ab

Please sign in to comment.