diff --git a/lib/facter/framework/cli/cli.rb b/lib/facter/framework/cli/cli.rb index eb8f98aa6..55d9c13c1 100755 --- a/lib/facter/framework/cli/cli.rb +++ b/lib/facter/framework/cli/cli.rb @@ -201,11 +201,11 @@ def add_commands_to_help Cli.commands.values .select { |command_class| command_class.instance_of?(Thor::Command) } .each do |command| - help_command_options << build_option( - command['name'], - [command['usage'].split(',')[1]], - command['description'] - ) + help_command_options << build_option( + command['name'], + [command['usage'].split(',')[1]], + command['description'] + ) end help_command_options diff --git a/lib/facter/resolvers/aix/ffi/ffi_helper.rb b/lib/facter/resolvers/aix/ffi/ffi_helper.rb index c1c6535e7..5573f559e 100644 --- a/lib/facter/resolvers/aix/ffi/ffi_helper.rb +++ b/lib/facter/resolvers/aix/ffi/ffi_helper.rb @@ -33,7 +33,7 @@ def self.read_load_averages return if Libc.getkerninfo(KINFO_READ | KINFO_GET_AVENRUN, averages, averages_size, 0).negative? - averages.read_array_of_long_long(3).map { |x| (x / 65_536.0) } + averages.read_array_of_long_long(3).map { |x| x / 65_536.0 } end def self.read_interfaces diff --git a/lib/facter/resolvers/aix/networking.rb b/lib/facter/resolvers/aix/networking.rb index 154222ca0..4cbd105a8 100644 --- a/lib/facter/resolvers/aix/networking.rb +++ b/lib/facter/resolvers/aix/networking.rb @@ -16,7 +16,7 @@ def post_resolve(fact_name, _options) def read_netstat(fact_name) @fact_list[:interfaces] = {} output = Facter::Core::Execution.execute('netstat -rn', logger: log) - output = output.each_line.select { |line| (line =~ /\s\s[0-9]+.[0-9]+.[0-9]+.[0-9]+|\s\s.*:[0-9a-f]+/) } + output = output.each_line.select { |line| line =~ /\s\s[0-9]+.[0-9]+.[0-9]+.[0-9]+|\s\s.*:[0-9a-f]+/ } @fact_list[:interfaces] = load_interfaces populate_with_mtu_and_mac!(@fact_list[:interfaces]) diff --git a/lib/facter/resolvers/linux/processors.rb b/lib/facter/resolvers/linux/processors.rb index 93a087fb6..d54bbb7b7 100644 --- a/lib/facter/resolvers/linux/processors.rb +++ b/lib/facter/resolvers/linux/processors.rb @@ -70,7 +70,7 @@ def physical_devices_count .select { |dir| dir =~ /cpu[0-9]+$/ } .select { |dir| File.exist?("/sys/devices/system/cpu/#{dir}/topology/physical_package_id") } .map do |dir| - Facter::Util::FileHelper.safe_read("/sys/devices/system/cpu/#{dir}/topology/physical_package_id").strip + Facter::Util::FileHelper.safe_read("/sys/devices/system/cpu/#{dir}/topology/physical_package_id").strip end .uniq.count end diff --git a/openfact.gemspec b/openfact.gemspec index 71928337f..3ba5eb01c 100644 --- a/openfact.gemspec +++ b/openfact.gemspec @@ -38,7 +38,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'ffi', '>= 1.15.5', '< 1.18.0', '!= 1.16.0', '!= 1.16.1', '!= 1.16.2' spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6' spec.add_development_dependency 'rspec', '~> 3.0' - spec.add_development_dependency 'rubocop', '~> 1.28', '< 1.85' + spec.add_development_dependency 'rubocop', '~> 1.86.1' spec.add_development_dependency 'rubocop-performance', '~> 1.5' spec.add_development_dependency 'rubocop-rake', '< 1' spec.add_development_dependency 'rubocop-rspec', '>= 2.10', '< 4'