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

Revert "argument changes to support ruby 3", again #1023

Closed
wants to merge 2 commits into from
Closed
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
19 changes: 7 additions & 12 deletions lib/omnibus/builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -373,16 +373,11 @@ def bundle(command, options = {})
# @param (see #command)
# @return (see #command)
#
def appbundle(software_name, options = {})
def appbundle(software_name, lockdir: nil, gem: nil, without: nil, extra_bin_files: nil , **options)
build_commands << BuildCommand.new("appbundle `#{software_name}'") do
bin_dir = "#{install_dir}/bin"
appbundler_bin = embedded_bin("appbundler")

lockdir = options[:lockdir]
gem = options[:gem]
without = options[:without]
extra_bin_files = options[:extra_bin_files]

lockdir ||=
begin
app_software = project.softwares.find do |p|
Expand Down Expand Up @@ -540,7 +535,7 @@ def erb(options = {})
def mkdir(directory, options = {})
build_commands << BuildCommand.new("mkdir `#{directory}'") do
Dir.chdir(software.project_dir) do
FileUtils.mkdir_p(directory, **options)
FileUtils.mkdir_p(directory, options)
end
end
end
Expand All @@ -562,7 +557,7 @@ def touch(file, options = {})
parent = File.dirname(file)
FileUtils.mkdir_p(parent) unless File.directory?(parent)

FileUtils.touch(file, **options)
FileUtils.touch(file, options)
end
end
end
Expand All @@ -583,7 +578,7 @@ def delete(path, options = {})
build_commands << BuildCommand.new("delete `#{path}'") do
Dir.chdir(software.project_dir) do
FileSyncer.glob(path).each do |file|
FileUtils.rm_rf(file, **options)
FileUtils.rm_rf(file, options)
end
end
end
Expand Down Expand Up @@ -634,7 +629,7 @@ def copy(source, destination, options = {})
log.warn(log_key) { "no matched files for glob #{command}" }
else
files.each do |file|
FileUtils.cp_r(file, destination, **options)
FileUtils.cp_r(file, destination, options)
end
end
end
Expand Down Expand Up @@ -663,7 +658,7 @@ def move(source, destination, options = {})
log.warn(log_key) { "no matched files for glob #{command}" }
else
files.each do |file|
FileUtils.mv(file, destination, **options)
FileUtils.mv(file, destination, options)
end
end
end
Expand Down Expand Up @@ -695,7 +690,7 @@ def link(source, destination, options = {})
log.warn(log_key) { "no matched files for glob #{command}" }
else
files.each do |file|
FileUtils.ln_s(file, destination, **options)
FileUtils.ln_s(file, destination, options)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/functional/fetchers/net_fetcher_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def stub_ohai(options = {}, &block); end

context "when the file is less than 10240 bytes" do
let(:source_url) { "https://downloads.chef.io/packages-chef-io-public.key" }
let(:source_md5) { "012a2c4e2a8edb86b2c072f02eea9f40" }
let(:source_md5) { "369efc3a19b9118cdf51c7e87a34f266" }

it "downloads the file" do
fetch!
Expand Down