Skip to content

Commit

Permalink
chore: Upgrade rubocop linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jgraichen committed Apr 18, 2024
1 parent 5b44601 commit 4d9e3a7
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 17 deletions.
5 changes: 1 addition & 4 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#

inherit_gem:
my-rubocop: default.yml
rubocop-config: default.yml

AllCops:
TargetRubyVersion: 2.5
Expand All @@ -10,6 +10,3 @@ AllCops:
Naming/FileName:
Exclude:
- lib/paginate-responder.rb

RSpec/MultipleMemoizedHelpers:
Max: 10 # Defaults to 5 o_O
9 changes: 5 additions & 4 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# frozen_string_literal: true

appraise "rails-6-1" do
appraise 'rails-6-1' do
gem 'rails', '~> 6.1.0'
end

appraise "rails-7-0" do
appraise 'rails-7-0' do
gem 'rails', '~> 7.0.0'
end

appraise "rails-7-1" do
appraise 'rails-7-1' do
gem 'rails', '~> 7.1.0'
end

appraise "rails-head" do
appraise 'rails-head' do
gem 'rails', github: 'rails/rails'
end
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ gem 'sqlite3', '~> 1.4' # Rails does NOT accept 2.0
gem 'rspec'
gem 'rspec-rails'

gem 'my-rubocop', github: 'jgraichen/my-rubocop', ref: 'v3'
gem 'rubocop-config', github: 'jgraichen/rubocop-config', ref: 'v11'

group :development do
gem 'appraisal'
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_6_1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gem "activerecord", ">= 3.2.0"
gem "sqlite3", "~> 1.4"
gem "rspec"
gem "rspec-rails"
gem "my-rubocop", github: "jgraichen/my-rubocop", ref: "v3"
gem "rubocop-config", github: "jgraichen/rubocop-config", ref: "v11"
gem "rails", "~> 6.1.0"

group :development do
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_7_0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gem "activerecord", ">= 3.2.0"
gem "sqlite3", "~> 1.4"
gem "rspec"
gem "rspec-rails"
gem "my-rubocop", github: "jgraichen/my-rubocop", ref: "v3"
gem "rubocop-config", github: "jgraichen/rubocop-config", ref: "v11"
gem "rails", "~> 7.0.0"

group :development do
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_7_1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gem "activerecord", ">= 3.2.0"
gem "sqlite3", "~> 1.4"
gem "rspec"
gem "rspec-rails"
gem "my-rubocop", github: "jgraichen/my-rubocop", ref: "v3"
gem "rubocop-config", github: "jgraichen/rubocop-config", ref: "v11"
gem "rails", "~> 7.1.0"

group :development do
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_head.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gem "activerecord", ">= 3.2.0"
gem "sqlite3", "~> 1.4"
gem "rspec"
gem "rspec-rails"
gem "my-rubocop", github: "jgraichen/my-rubocop", ref: "v3"
gem "rubocop-config", github: "jgraichen/rubocop-config", ref: "v11"
gem "rails", github: "rails/rails"

group :development do
Expand Down
2 changes: 1 addition & 1 deletion lib/paginate-responder/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def per_page
if val < 1
1
else
val > max_per_page ? max_per_page : val
[val, max_per_page].min
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/paginate-responder/pagy_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module PaginateResponder
class PagyAdapter < Base
def paginate
self.pagy, self.pagy_resource = controller.send(self.class.pagy_method(resource), resource, page: page,
items: per_page,)
items: per_page,)
pagy_resource
end

Expand Down
2 changes: 1 addition & 1 deletion lib/paginate-responder/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module VERSION
STAGE = nil

def self.to_s
[MAJOR, MINOR, PATCH, STAGE].reject(&:nil?).join '.'
[MAJOR, MINOR, PATCH, STAGE].compact.join '.'
end
end
end
1 change: 0 additions & 1 deletion paginate-responder.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ 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.required_ruby_version = '>= 2.5.0'
Expand Down

0 comments on commit 4d9e3a7

Please sign in to comment.