Skip to content

Commit 26888d1

Browse files
committed
update rubocop to ruby 3.2
1 parent b474fba commit 26888d1

File tree

10 files changed

+21
-21
lines changed

10 files changed

+21
-21
lines changed

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins:
55
inherit_from: .rubocop_todo.yml
66

77
AllCops:
8-
TargetRubyVersion: 3.1
8+
TargetRubyVersion: 3.2
99
NewCops: enable
1010
Exclude:
1111
- 'gemfiles/Gemfile*.lock'

active_scaffold.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
2121
]
2222
s.license = 'MIT'
2323

24-
s.required_ruby_version = '>= 3.1'
24+
s.required_ruby_version = '>= 3.2'
2525

2626
s.add_dependency('dartsass-sprockets', '~> 3.2.0')
2727
s.add_dependency('ice_nine', '~> 0.11') # Deep Freeze Ruby Objects

lib/active_scaffold/config/base.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ def key?(key)
122122
@storage[@action].key? key.to_s if @action && @storage[@action]
123123
end
124124

125-
def method_missing(name, *args)
126-
proxy_to_conf?(name, true) ? @conf.send(name, *args) : super
125+
def method_missing(name, *)
126+
proxy_to_conf?(name, true) ? @conf.send(name, *) : super
127127
end
128128

129129
def respond_to_missing?(name, include_all = false)

lib/active_scaffold/configurable.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ def configure(&configuration_block)
1818
ret
1919
end
2020

21-
def method_missing(name, *args)
21+
def method_missing(name, *)
2222
if @configuration_binding&.respond_to?(name, true) # rubocop:disable Lint/RedundantSafeNavigation
23-
@configuration_binding.send(name, *args)
23+
@configuration_binding.send(name, *)
2424
else
2525
super
2626
end

lib/active_scaffold/data_structures/actions.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
class ActiveScaffold::DataStructures::Actions
44
include Enumerable
55

6-
def initialize(*args)
6+
def initialize(*)
77
@set = []
8-
add(*args)
8+
add(*)
99
end
1010

1111
def exclude(*args)

lib/active_scaffold/data_structures/columns.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ def _inheritable=(value)
2121
# This accessor is used by ActionColumns to create new Column objects without adding them to this set
2222
attr_reader :active_record_class
2323

24-
def initialize(active_record_class, *args)
24+
def initialize(active_record_class, *)
2525
@active_record_class = active_record_class
2626
@_inheritable = ::Set.new
2727
@set = {}
2828
@sorted = nil
2929

30-
add(*args)
30+
add(*)
3131
end
3232

3333
# the way to add columns to the set. this is primarily useful for virtual columns.

lib/active_scaffold/data_structures/set.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ class Set
55
include Enumerable
66
include ActiveScaffold::Configurable
77

8-
def initialize(*args)
9-
set_values(*args)
8+
def initialize(*)
9+
set_values(*)
1010
end
1111

1212
def initialize_dup(other)
1313
@set = other.set.dup
1414
end
1515

16-
def set_values(*args)
16+
def set_values(*)
1717
@set = []
18-
add(*args)
18+
add(*)
1919
end
2020

2121
# the way to add items to the set.

lib/active_scaffold/helpers/action_link_helpers.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ module ActionLinkHelpers
77
# params which mustn't be copying to nested links
88
NESTED_PARAMS = %i[eid embedded association parent_scaffold].freeze
99

10-
def skip_action_link?(link, *args)
11-
!link.ignore_method.nil? && controller.respond_to?(link.ignore_method, true) && controller.send(link.ignore_method, *args)
10+
def skip_action_link?(link, *)
11+
!link.ignore_method.nil? && controller.respond_to?(link.ignore_method, true) && controller.send(link.ignore_method, *)
1212
end
1313

1414
def action_link_authorized?(link, *args) # rubocop:disable Naming/PredicateMethod

lib/active_scaffold/tableless.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ class ActiveScaffold::Tableless < ActiveRecord::Base # rubocop:disable Rails/App
44
class Connection < ActiveRecord::ConnectionAdapters::AbstractAdapter
55
attr_reader :klass
66

7-
def initialize(klass, *args)
8-
super(nil, *args)
7+
def initialize(klass, *)
8+
super(nil, *)
99
@klass = klass
1010
end
1111

@@ -23,7 +23,7 @@ def quote_column_name(column_name)
2323
end
2424

2525
class Column < ActiveRecord::ConnectionAdapters::Column
26-
def initialize(name, default, type, null = true, *, **) # rubocop:disable Style/OptionalBooleanParameter
26+
def initialize(name, default, type, null = true, *, **) # rubocop:disable Style/OptionalBooleanParameter,Metrics/ParameterLists
2727
if Rails.version >= '8.1'
2828
if type.is_a?(Symbol)
2929
cast_type = ActiveRecord::Type.lookup(type)

test/company.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ def self.create_reflection(macro, name, scope, options, active_record)
5050
end
5151
end
5252
else
53-
def self.create_reflection(*args)
54-
ActiveRecord::Reflection.create(*args)
53+
def self.create_reflection(*)
54+
ActiveRecord::Reflection.create(*)
5555
end
5656
end
5757

0 commit comments

Comments
 (0)