From 7f3be2afd3957cb1fc1e22ab20085c1bb38d2c7f Mon Sep 17 00:00:00 2001 From: Peter Schrammel Date: Sun, 26 Feb 2023 23:26:58 +0000 Subject: [PATCH 1/2] exist instead of exists --- features/support/setup_sandbox.rb | 2 +- lib/hiera/backend/eyaml/subcommands/edit.rb | 2 +- lib/hiera/backend/eyaml_backend.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/features/support/setup_sandbox.rb b/features/support/setup_sandbox.rb index d278ecae..6cfb2ced 100644 --- a/features/support/setup_sandbox.rb +++ b/features/support/setup_sandbox.rb @@ -12,7 +12,7 @@ def self.create_files test_files write_mode = "wb" if extension == "bin" File.open(test_file, write_mode) {|input_file| input_file.puts contents - } unless File.exists?( test_file ) + } unless File.exist?( test_file ) File.chmod(0755, test_file) if extension == "sh" end diff --git a/lib/hiera/backend/eyaml/subcommands/edit.rb b/lib/hiera/backend/eyaml/subcommands/edit.rb index ca25272b..149ffecc 100644 --- a/lib/hiera/backend/eyaml/subcommands/edit.rb +++ b/lib/hiera/backend/eyaml/subcommands/edit.rb @@ -59,7 +59,7 @@ def self.validate options Optimist::die "You must specify an eyaml file" if ARGV.empty? options[:source] = :eyaml options[:eyaml] = ARGV.shift - if File.exists? options[:eyaml] + if File.exist? options[:eyaml] begin options[:input_data] = File.read options[:eyaml] rescue diff --git a/lib/hiera/backend/eyaml_backend.rb b/lib/hiera/backend/eyaml_backend.rb index 658654a4..de950ddd 100644 --- a/lib/hiera/backend/eyaml_backend.rb +++ b/lib/hiera/backend/eyaml_backend.rb @@ -31,7 +31,7 @@ def lookup(key, scope, order_override, resolution_type) debug("Looking for data source #{source}") eyaml_file = Backend.datafile(:eyaml, scope, source, extension) || next - next unless File.exists?(eyaml_file) + next unless File.exist?(eyaml_file) data = @cache.read(eyaml_file, Hash) do |data| YAML.load(data) || {} From 97a4b0106e2102315acd5c58df04507e4f5086d0 Mon Sep 17 00:00:00 2001 From: Peter Schrammel Date: Sun, 26 Feb 2023 23:33:20 +0000 Subject: [PATCH 2/2] adding 3.2 tests --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f3e3131a..d3aa618c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,6 +19,7 @@ jobs: - "2.7" - "3.0" - "3.1" + - "3.2" puppet: - "~> 7.0" - "~> 6.29" @@ -29,6 +30,8 @@ jobs: - ruby: "2.5" puppet: "~> 7.0" + - ruby: "3.2" + puppet: "~> 6.29" - ruby: "3.1" puppet: "~> 6.29" - ruby: "3.0"