Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/criteo-cookbooks-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.1
bundler-cache: true
- run: bundle exec rubocop --version
- run: bundle exec rubocop
Expand Down
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
# - submit the change in the code_generator

AllCops:
TargetRubyVersion: 2.7
TargetRubyVersion: 3.1
Exclude:
- bundle/**/*
- vendor/**/*


# This requires to alphabetically sort Gem's requirements
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'

group :unit_test do
gem 'chef', '= 14.7.17'
gem 'chef', '= 17.10.163'
gem 'chefspec', '>= 9.2.1'
gem 'fakefs', '>= 2.4.0'
gem 'webmock', '>= 3.13.0'
Expand All @@ -16,5 +16,5 @@ end

group :lint do
gem 'foodcritic', '>= 16.3.0'
gem 'rubocop', '= 0.80.1'
gem 'rubocop', '~> 1.77.0'
end
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
supports 'redhat', '>= 6.0'
supports 'centos', '>= 6.0'
supports 'ubuntu'
chef_version '>= 12.5' if respond_to?(:chef_version)
chef_version '>= 17.10' if respond_to?(:chef_version)
6 changes: 3 additions & 3 deletions resources/kernel_module.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ def reload_cmd

def modload_file
if node['platform_family'] == 'rhel' && node['platform_version'].to_i < 7
::File.join(node['kernel_modules']['modules_load.d'], new_resource.name + '.modules')
::File.join(node['kernel_modules']['modules_load.d'], "#{new_resource.name}.modules")
else
::File.join(node['kernel_modules']['modules_load.d'], new_resource.name + '.conf')
::File.join(node['kernel_modules']['modules_load.d'], "#{new_resource.name}.conf")
end
end

def modprobe_file
::File.join(node['kernel_modules']['modprobe.d'], new_resource.name + '.conf')
::File.join(node['kernel_modules']['modprobe.d'], "#{new_resource.name}.conf")
end

def whyrun_supported?
Expand Down
6 changes: 3 additions & 3 deletions test/integration/helpers/inspec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

def module_path(type, module_name)
raise "'module_path' not supported for this os_family '#{os[:family]}'" unless %w[centos redhat].include?(os[:family])
return ::File.join('/etc/modprobe.d', module_name + '.conf') if type.to_sym == :load
return ::File.join('/etc/modprobe.d', "#{module_name}.conf") if type.to_sym == :load

if os[:release].to_i == 6
::File.join('/etc/sysconfig/modules', module_name + '.modules')
::File.join('/etc/sysconfig/modules', "#{module_name}.modules")
else
::File.join('/etc/modules-load.d', module_name + '.conf')
::File.join('/etc/modules-load.d', "#{module_name}.conf")
end
end