Skip to content

Commit

Permalink
Use Rubocop version 1.69
Browse files Browse the repository at this point in the history
  • Loading branch information
kvokka committed Dec 21, 2024
1 parent 6e1cddb commit 16ea131
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .hound.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
rubocop:
config_file: .rubocop.yml
version: 0.71.0
version: 1.22.1
6 changes: 6 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Style/Documentation:
Enabled: false
Metrics/CyclomaticComplexity:
Max: 10
Metrics/BlockLength:
Exclude:
- 'test/**/*'
Lint/ConstantDefinitionInBlock:
Exclude:
- 'test/**/*'
AllCops:
Exclude:
- 'gemfiles/**/*'
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ group :local_development do
gem 'overcommit'
gem 'pry'
gem 'reek'
gem 'rubocop', '~> 0.71.0'
gem 'rubocop', '~> 1.69.0'
end
7 changes: 3 additions & 4 deletions lib/pp_sql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ module PpSql
# if you do not want to rewrite AR native method #to_sql
# you may switch this setting to false in initializer
class << self
attr_accessor :rewrite_to_sql_method
attr_accessor :add_rails_logger_formatting
attr_accessor :rewrite_to_sql_method, :add_rails_logger_formatting
end
self.rewrite_to_sql_method = true
self.add_rails_logger_formatting = true
Expand Down Expand Up @@ -63,8 +62,8 @@ def sql(event)
class Railtie < Rails::Railtie
initializer 'pp_sql.override_to_sql' do
ActiveSupport.on_load(:active_record) do
ActiveRecord::Relation.send(:prepend, ToSqlBeautify)
ActiveRecord::LogSubscriber.send(:prepend, LogSubscriberPrettyPrint)
ActiveRecord::Relation.prepend ToSqlBeautify
ActiveRecord::LogSubscriber.prepend LogSubscriberPrettyPrint
end
end
end
Expand Down
2 changes: 2 additions & 0 deletions pp_sql.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Gem::Specification.new do |s|

s.files = Dir['lib/**/*', 'MIT-LICENSE', 'Rakefile', 'README.md']

s.required_ruby_version = '>= 3.1.0'

s.add_dependency 'activerecord'
s.add_dependency 'anbt-sql-formatter', '~> 0.1.0', '~> 0.1.0'

Expand Down

0 comments on commit 16ea131

Please sign in to comment.