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

Updating aruba version from 0.5 to 1.1 #1019

Merged
merged 1 commit into from
Jun 23, 2021
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 features/support/env.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "aruba"
require "aruba/cucumber"
require "aruba/in_process"
require "aruba/processes/in_process"

require "omnibus/cli"

Expand Down
19 changes: 12 additions & 7 deletions lib/omnibus/builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -373,11 +373,16 @@ def bundle(command, options = {})
# @param (see #command)
# @return (see #command)
#
def appbundle(software_name, lockdir: nil, gem: nil, without: nil, extra_bin_files: nil , **options)
def appbundle(software_name, 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 @@ -535,7 +540,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 @@ -557,7 +562,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 @@ -578,7 +583,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 @@ -629,7 +634,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 @@ -658,7 +663,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 @@ -690,7 +695,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
3 changes: 2 additions & 1 deletion omnibus.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ Gem::Specification.new do |gem|
gem.add_dependency "ruby-progressbar", "~> 1.7"
gem.add_dependency "thor", ">= 0.18", "< 2.0"
gem.add_dependency "license_scout", "~> 1.0"
gem.add_dependency "contracts", ">= 0.16.0", "< 0.17.0"

gem.add_dependency "mixlib-versioning"
gem.add_dependency "pedump"

gem.add_development_dependency "artifactory", "~> 3.0"
gem.add_development_dependency "aruba", "~> 0.5"
gem.add_development_dependency "aruba", "~> 1.1"
gem.add_development_dependency "chefstyle", "= 1.7.5"
gem.add_development_dependency "fauxhai-ng", ">= 7.5"
gem.add_development_dependency "rspec", "~> 3.0"
Expand Down
15 changes: 3 additions & 12 deletions spec/functional/fetchers/net_fetcher_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,8 @@ def stub_ohai(options = {}, &block); end
end
end

context "when the source has read-only files" do
let(:source_url) { "http://dl.bintray.com/oneclick/OpenKnapsack/x86/openssl-1.0.0q-x86-windows.tar.lzma" }
let(:source_md5) { "577dbe528415c6f178a9431fd0554df4" }

it "extracts the asset without crashing" do
subject.clean
expect(extracted).to_not be_a_file
subject.clean
expect(extracted).to_not be_a_file
end
end
# we need to find a new test fixture because this one no longer exists
# context "when the source has read-only files"

context "when the source has broken symlinks" do
let(:source_url) { "http://www.openssl.org/source/openssl-1.0.1q.tar.gz" }
Expand Down Expand Up @@ -255,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) { "369efc3a19b9118cdf51c7e87a34f266" }
let(:source_md5) { "012a2c4e2a8edb86b2c072f02eea9f40" }

it "downloads the file" do
fetch!
Expand Down