diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1d4a72..c0d5a06 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,16 +18,18 @@ jobs: fail-fast: false matrix: ruby_version: - - "2.7" + - "3.3" - "3.2" - include: - - ruby-version: '2.7' - puppet_gem_version: '~> 7.0' - - ruby_version: '3.2' - puppet_gem_version: '~> 8.0' # puppet8' + - "3.1" + puppet_gem_version: + - '~> 8.0' runs_on: - "ubuntu-latest" - "windows-latest" + include: + - ruby_version: '3.1' + puppet_gem_version: '~> 7.0' + runs_on: 'ubuntu-latest' name: "spec (${{ matrix.runs_on }} ruby ${{ matrix.ruby_version }} | puppet ${{matrix.puppet_gem_version}})" uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main" secrets: "inherit" @@ -42,16 +44,19 @@ jobs: strategy: matrix: ruby_version: - - "2.7" + - "3.3" - "3.2" - include: - - ruby-version: '2.7' - puppet_gem_version: '~> 7.0' - - ruby_version: '3.2' - puppet_gem_version: 'https://github.com/puppetlabs/puppet' # puppet8' + - "3.1" + puppet_gem_version: + - '~> 8.0' + - 'https://github.com/puppetlabs/puppet' runs_on: - "ubuntu-latest" - "windows-latest" + include: + - ruby_version: '3.1' + puppet_gem_version: '~> 7.0' + runs_on: 'ubuntu-latest' name: "acceptance (${{ matrix.runs_on }} ruby ${{ matrix.ruby_version }} | puppet ${{matrix.puppet_gem_version}})" uses: "puppetlabs/cat-github-actions/.github/workflows/gem_acceptance.yml@main" secrets: "inherit" diff --git a/.rubocop.yml b/.rubocop.yml index 54ef1db..39cd9ef 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -7,3 +7,6 @@ inherit_gem: # Disabled Style/ClassAndModuleChildren: Enabled: false + +AllCops: + TargetRubyVersion: '3.1' diff --git a/lib/puppet/modulebuilder/builder.rb b/lib/puppet/modulebuilder/builder.rb index f893830..b54d5e6 100644 --- a/lib/puppet/modulebuilder/builder.rb +++ b/lib/puppet/modulebuilder/builder.rb @@ -202,7 +202,7 @@ def validate_path_encoding!(path) return unless /[^\x00-\x7F]/.match?(path) raise ArgumentError, format("'%s' can only include ASCII characters in its path or " \ - 'filename in order to be compatible with a wide range of hosts.', path: path) + 'filename in order to be compatible with a wide range of hosts.', path:) end # Creates a gzip compressed tarball of the build directory. @@ -235,7 +235,7 @@ def build_package entry_meta[:mode] = orig_mode | min_mode if entry_meta[:mode] != orig_mode - logger.debug(format('Updated permissions of packaged \'%s\' to %s', entry: entry, + logger.debug(format('Updated permissions of packaged \'%s\' to %s', entry:, new_mode: (entry_meta[:mode] & 0o7777).to_s(8))) end @@ -355,7 +355,7 @@ def release_name # # @return [nil] def validate_ustar_path!(path) - raise ArgumentError, format("The path '%s' is longer than 256 bytes.", path: path) if path.bytesize > 256 + raise ArgumentError, format("The path '%s' is longer than 256 bytes.", path:) if path.bytesize > 256 if path.bytesize <= 100 prefix = '' @@ -380,7 +380,7 @@ def validate_ustar_path!(path) raise ArgumentError, \ format("'%s' could not be split at a directory separator into two " \ 'parts, the first having a maximum length of 155 bytes and the ' \ - 'second having a maximum length of 100 bytes.', path: path) + 'second having a maximum length of 100 bytes.', path:) end private diff --git a/puppet-modulebuilder.gemspec b/puppet-modulebuilder.gemspec index a8c933d..026b0d0 100644 --- a/puppet-modulebuilder.gemspec +++ b/puppet-modulebuilder.gemspec @@ -25,9 +25,8 @@ Gem::Specification.new do |spec| spec.require_paths = ['lib'] # minitar and pathspec is required for building Puppet modules spec.add_runtime_dependency 'minitar', '~> 0.9' - spec.add_runtime_dependency 'pathspec', '>= 0.2.1', '< 3.0.0' + spec.add_runtime_dependency 'pathspec', '~> 2.1' spec.add_development_dependency 'voxpupuli-rubocop', '~> 2.8.0' - - spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0') + spec.required_ruby_version = '>= 3.1' end