Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ruby 3.2 support #340

Merged
merged 2 commits into from
Feb 27, 2023
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
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- "2.7"
- "3.0"
- "3.1"
- "3.2"
puppet:
- "~> 7.0"
- "~> 6.29"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion features/support/setup_sandbox.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/hiera/backend/eyaml/subcommands/edit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/hiera/backend/eyaml_backend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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) || {}
Expand Down