From b75d65b46c590792edb87870e9d24ef16b959553 Mon Sep 17 00:00:00 2001 From: Dominik Gedon Date: Tue, 10 Jan 2023 15:00:05 +0100 Subject: [PATCH] CI: Update aruba dependency Signed-off-by: Dominik Gedon --- Gemfile.lock | 11 ++++++----- lib/tetra/facades/bash.rb | 2 +- spec/lib/coarse/dry_run_subcommand_spec.rb | 4 ++-- spec/lib/coarse/generate_all_subcommand_spec.rb | 8 ++++---- spec/lib/coarse/generate_spec_subcommand_spec.rb | 2 +- spec/lib/coarse/init_subcommand_spec.rb | 16 ++++++++++------ spec/spec_helper.rb | 5 +---- tetra.gemspec | 2 +- 8 files changed, 26 insertions(+), 24 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9c432d23..bab5638b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -13,10 +13,11 @@ PATH GEM remote: https://rubygems.org/ specs: - aruba (0.6.2) - childprocess (>= 0.3.6) - cucumber (>= 1.1.1) - rspec-expectations (>= 2.7.0) + aruba (0.8.0) + childprocess (~> 0.5.6) + contracts (~> 0.9) + cucumber (>= 1.3.19) + rspec-expectations (>= 2.99) ast (2.4.2) bigdecimal (3.1.8) builder (3.3.0) @@ -138,7 +139,7 @@ PLATFORMS x86_64-linux-musl DEPENDENCIES - aruba (~> 0.6.2) + aruba (~> 0.8.0) rake (~> 13.2.0) rspec (~> 3.13.0) rubocop (~> 1.69.1) diff --git a/lib/tetra/facades/bash.rb b/lib/tetra/facades/bash.rb index b437ff50..e19c6544 100644 --- a/lib/tetra/facades/bash.rb +++ b/lib/tetra/facades/bash.rb @@ -38,7 +38,7 @@ def bash(command = nil) run("bash --rcfile #{bashrc_file.path} -i -c '#{command}'") [command] else - run_interactive("bash --rcfile #{bashrc_file.path} -i") + run("bash --rcfile #{bashrc_file.path} -i") history = File.read(history_file) log.debug "history contents:" log.debug history diff --git a/spec/lib/coarse/dry_run_subcommand_spec.rb b/spec/lib/coarse/dry_run_subcommand_spec.rb index 1fba6c1d..1eb878ce 100644 --- a/spec/lib/coarse/dry_run_subcommand_spec.rb +++ b/spec/lib/coarse/dry_run_subcommand_spec.rb @@ -11,7 +11,7 @@ run_simple("tetra init --no-archive mypackage") cd("mypackage") - run_interactive("tetra dry-run") + run("tetra dry-run") type("echo ciao") type("echo ciao > ciao.jar") type("\u{0004}") # ^D (Ctrl+D), terminates bash with exit status 0 @@ -34,7 +34,7 @@ run_simple("tetra init --no-archive mypackage") cd("mypackage") - run_interactive("tetra dry-run -s 'echo ciao > ciao.jar'") + run("tetra dry-run -s 'echo ciao > ciao.jar'") expect(all_output).to include("Scripted dry-run started") diff --git a/spec/lib/coarse/generate_all_subcommand_spec.rb b/spec/lib/coarse/generate_all_subcommand_spec.rb index 0d0fbcc9..fe2a10e8 100644 --- a/spec/lib/coarse/generate_all_subcommand_spec.rb +++ b/spec/lib/coarse/generate_all_subcommand_spec.rb @@ -11,7 +11,7 @@ # first dry-run, all normal @aruba_timeout_seconds = 240 - run_interactive("tetra dry-run --very-very-verbose") + run("tetra dry-run --very-very-verbose") type("mvn package -DskipTests") type("\u{0004}") # ^D (Ctrl+D), terminates bash with exit status 0 @@ -38,7 +38,7 @@ run_simple("tetra patch") # third dry-run succeeds with patch - run_interactive("tetra dry-run") + run("tetra dry-run") type("mvn package -DskipTests") type("\u{0004}") # ^D (Ctrl+D), terminates bash with exit status 0 @@ -81,7 +81,7 @@ # second dry-run, all normal cd(File.join("src", Tetra::CCOLLECTIONS)) @aruba_timeout_seconds = 240 - run_interactive("tetra dry-run") + run("tetra dry-run") type("mvn package -DskipTests") type("\u{0004}") # ^D (Ctrl+D), terminates bash with exit status 0 @@ -107,7 +107,7 @@ run_simple("tetra patch") # third dry-run succeeds with patch - run_interactive("tetra dry-run") + run("tetra dry-run") type("mvn package -DskipTests") type("\u{0004}") # ^D (Ctrl+D), terminates bash with exit status 0 expect(all_output).to include("[INFO] BUILD SUCCESS") diff --git a/spec/lib/coarse/generate_spec_subcommand_spec.rb b/spec/lib/coarse/generate_spec_subcommand_spec.rb index a44b0d1e..869fc442 100644 --- a/spec/lib/coarse/generate_spec_subcommand_spec.rb +++ b/spec/lib/coarse/generate_spec_subcommand_spec.rb @@ -16,7 +16,7 @@ expect(output_from("tetra change-sources --no-archive")).to include("New sources committed") @aruba_timeout_seconds = 300 - run_interactive("tetra dry-run") + run("tetra dry-run") type("mvn package -DskipTests") type("\u{0004}") # ^D (Ctrl+D), terminates bash with exit status 0 diff --git a/spec/lib/coarse/init_subcommand_spec.rb b/spec/lib/coarse/init_subcommand_spec.rb index 97850ba3..618e8fd0 100644 --- a/spec/lib/coarse/init_subcommand_spec.rb +++ b/spec/lib/coarse/init_subcommand_spec.rb @@ -48,10 +48,12 @@ cd("commons-collections") check_directory_presence([".git", "kit", "src", "packages"], true) - check_directory_presence([File.join("src", Tetra::CCOLLECTIONS)], true) - check_file_presence([File.join("src", Tetra::CCOLLECTIONS, "pom.xml")], true) + check_directory_presence([File.join("src", Tetra::CCOLLECTIONS))], true) + # check_file_presence([File.join("src", Tetra::CCOLLECTIONS), "pom.xml")], true) + expect([File.join("src", Tetra::CCOLLECTIONS), "pom.xml")]).to be_an_existing_file - check_file_presence([File.join("packages", "commons-collections", "commons-collections.zip")], true) + # check_file_presence([File.join("packages", "commons-collections", "commons-collections.zip")], true) + expect([File.join("packages", "commons-collections", "commons-collections.zip")]).to be_an_existing_file run_simple("git rev-list --format=%B --max-count=1 HEAD") expect(stdout_from("git rev-list --format=%B --max-count=1 HEAD")).to include("Inital sources added from archive") @@ -74,10 +76,12 @@ cd("commons-collections") check_directory_presence([".git", "kit", "src", "packages"], true) - check_directory_presence([File.join("src", Tetra::CCOLLECTIONS)], true) - check_file_presence([File.join("src", Tetra::CCOLLECTIONS, "pom.xml")], true) + check_directory_presence([File.join("src", Tetra::CCOLLECTIONS))], true) + # check_file_presence([File.join("src", Tetra::CCOLLECTIONS), "pom.xml")], true) - check_file_presence([File.join("packages", "commons-collections", "commons-collections.tar.gz")], true) + # check_file_presence([File.join("packages", "commons-collections", "commons-collections.tar.gz")], true) + expect([File.join("src", Tetra::CCOLLECTIONS), "pom.xml")]).to be_an_existing_file + expect([File.join("packages", "commons-collections", "commons-collections.tar.gz")]).to be_an_existing_file run_simple("git rev-list --format=%B --max-count=1 HEAD") expect(stdout_from("git rev-list --format=%B --max-count=1 HEAD")).to include("Inital sources added from archive") diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index ee82f6f5..2f0ba018 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -18,10 +18,7 @@ end # set up aruba API - config.before(:each) do - restore_env - clean_current_dir - end + config.before(:each) { setup_aruba } end module Tetra diff --git a/tetra.gemspec b/tetra.gemspec index cb417a83..219531f1 100644 --- a/tetra.gemspec +++ b/tetra.gemspec @@ -26,7 +26,7 @@ Gem::Specification.new do |s| s.required_ruby_version = '>= 3.1.0' - s.add_development_dependency "aruba", "~> 0.6.2" + s.add_development_dependency "aruba", "~> 0.8.0" s.add_development_dependency "simplecov", "~> 0.22.0" s.add_development_dependency "rake", "~> 13.2.0" s.add_development_dependency "rspec", "~> 3.13.0"