From 35514aabf4eb9a4f6614333c7e24a50ccac3ce9f Mon Sep 17 00:00:00 2001 From: Matijs van Zuijlen Date: Thu, 6 Aug 2020 08:29:58 +0200 Subject: [PATCH 1/4] Tighten rubocop dependencies This avoids unexpected RuboCop failures. --- aruba.gemspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aruba.gemspec b/aruba.gemspec index 0e938c9b1..50690ab43 100644 --- a/aruba.gemspec +++ b/aruba.gemspec @@ -37,10 +37,10 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry-doc', '~> 1.0' spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec', '~> 3.6' - spec.add_development_dependency 'rubocop', '~> 0.85' + spec.add_development_dependency 'rubocop', '~> 0.88.0' spec.add_development_dependency 'rubocop-packaging', '~> 0.1.1' - spec.add_development_dependency 'rubocop-performance', '~> 1.5' - spec.add_development_dependency 'rubocop-rspec', '~> 1.39' + spec.add_development_dependency 'rubocop-performance', '~> 1.7.1' + spec.add_development_dependency 'rubocop-rspec', '~> 1.42.0' spec.add_development_dependency 'simplecov', '~> 0.18.0' spec.add_development_dependency 'yard-junk', '~> 0.0.7' From 33c88c567817d3ee10757ef0bbd478c84ae93606 Mon Sep 17 00:00:00 2001 From: Matijs van Zuijlen Date: Wed, 19 Aug 2020 21:23:37 +0200 Subject: [PATCH 2/4] Use manifest file to specify files to include in gem --- Manifest.txt | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++ Rakefile | 9 ++++ aruba.gemspec | 9 ++-- 3 files changed, 140 insertions(+), 6 deletions(-) create mode 100644 Manifest.txt diff --git a/Manifest.txt b/Manifest.txt new file mode 100644 index 000000000..44f4ab611 --- /dev/null +++ b/Manifest.txt @@ -0,0 +1,128 @@ +lib/aruba +lib/aruba.rb +lib/aruba/api +lib/aruba/api.rb +lib/aruba/api/bundler.rb +lib/aruba/api/commands.rb +lib/aruba/api/core.rb +lib/aruba/api/environment.rb +lib/aruba/api/filesystem.rb +lib/aruba/api/text.rb +lib/aruba/aruba_path.rb +lib/aruba/basic_configuration +lib/aruba/basic_configuration.rb +lib/aruba/basic_configuration/option.rb +lib/aruba/cli.rb +lib/aruba/colorizer.rb +lib/aruba/command.rb +lib/aruba/config +lib/aruba/config/jruby.rb +lib/aruba/config_wrapper.rb +lib/aruba/configuration.rb +lib/aruba/console +lib/aruba/console.rb +lib/aruba/console/help.rb +lib/aruba/contracts +lib/aruba/contracts/absolute_path.rb +lib/aruba/contracts/enum.rb +lib/aruba/contracts/is_power_of_two.rb +lib/aruba/contracts/relative_path.rb +lib/aruba/cucumber +lib/aruba/cucumber.rb +lib/aruba/cucumber/command.rb +lib/aruba/cucumber/environment.rb +lib/aruba/cucumber/file.rb +lib/aruba/cucumber/hooks.rb +lib/aruba/cucumber/testing_frameworks.rb +lib/aruba/errors.rb +lib/aruba/event_bus +lib/aruba/event_bus.rb +lib/aruba/event_bus/name_resolver.rb +lib/aruba/events.rb +lib/aruba/extensions +lib/aruba/extensions/string +lib/aruba/extensions/string/strip.rb +lib/aruba/file_size.rb +lib/aruba/generators +lib/aruba/generators/script_file.rb +lib/aruba/hooks.rb +lib/aruba/in_config_wrapper.rb +lib/aruba/initializer.rb +lib/aruba/matchers +lib/aruba/matchers/base +lib/aruba/matchers/base/base_matcher.rb +lib/aruba/matchers/base/message_indenter.rb +lib/aruba/matchers/base/object_formatter.rb +lib/aruba/matchers/collection +lib/aruba/matchers/collection.rb +lib/aruba/matchers/collection/all.rb +lib/aruba/matchers/collection/include_an_object.rb +lib/aruba/matchers/command +lib/aruba/matchers/command.rb +lib/aruba/matchers/command/be_successfully_executed.rb +lib/aruba/matchers/command/have_exit_status.rb +lib/aruba/matchers/command/have_finished_in_time.rb +lib/aruba/matchers/command/have_output.rb +lib/aruba/matchers/command/have_output_on_stderr.rb +lib/aruba/matchers/command/have_output_on_stdout.rb +lib/aruba/matchers/command/have_output_size.rb +lib/aruba/matchers/directory +lib/aruba/matchers/directory.rb +lib/aruba/matchers/directory/be_an_existing_directory.rb +lib/aruba/matchers/directory/have_sub_directory.rb +lib/aruba/matchers/environment.rb +lib/aruba/matchers/file +lib/aruba/matchers/file.rb +lib/aruba/matchers/file/be_a_command_found_in_path.rb +lib/aruba/matchers/file/be_an_existing_executable.rb +lib/aruba/matchers/file/be_an_existing_file.rb +lib/aruba/matchers/file/have_file_content.rb +lib/aruba/matchers/file/have_file_size.rb +lib/aruba/matchers/file/have_same_file_content.rb +lib/aruba/matchers/path +lib/aruba/matchers/path.rb +lib/aruba/matchers/path/a_path_matching_pattern.rb +lib/aruba/matchers/path/be_an_absolute_path.rb +lib/aruba/matchers/path/be_an_existing_path.rb +lib/aruba/matchers/path/have_permissions.rb +lib/aruba/matchers/string +lib/aruba/matchers/string.rb +lib/aruba/matchers/string/include_output_string.rb +lib/aruba/matchers/string/match_output_string.rb +lib/aruba/matchers/string/output_string_eq.rb +lib/aruba/platform.rb +lib/aruba/platforms +lib/aruba/platforms/announcer.rb +lib/aruba/platforms/aruba_file_creator.rb +lib/aruba/platforms/aruba_fixed_size_file_creator.rb +lib/aruba/platforms/aruba_logger.rb +lib/aruba/platforms/command_monitor.rb +lib/aruba/platforms/determine_disk_usage.rb +lib/aruba/platforms/determine_file_size.rb +lib/aruba/platforms/filesystem_status.rb +lib/aruba/platforms/local_environment.rb +lib/aruba/platforms/simple_table.rb +lib/aruba/platforms/unix_command_string.rb +lib/aruba/platforms/unix_environment_variables.rb +lib/aruba/platforms/unix_platform.rb +lib/aruba/platforms/unix_which.rb +lib/aruba/platforms/windows_command_string.rb +lib/aruba/platforms/windows_environment_variables.rb +lib/aruba/platforms/windows_platform.rb +lib/aruba/platforms/windows_which.rb +lib/aruba/processes +lib/aruba/processes/basic_process.rb +lib/aruba/processes/debug_process.rb +lib/aruba/processes/in_process.rb +lib/aruba/processes/spawn_process.rb +lib/aruba/rspec.rb +lib/aruba/runtime.rb +lib/aruba/setup.rb +lib/aruba/tasks +lib/aruba/tasks/docker_helpers.rb +lib/aruba/version.rb +exe/aruba +CHANGELOG.md +CONTRIBUTING.md +LICENSE +README.md diff --git a/Rakefile b/Rakefile index fc56da43c..56480873a 100644 --- a/Rakefile +++ b/Rakefile @@ -47,6 +47,15 @@ end Bundler::GemHelper.install_tasks +require 'rake/manifest/task' + +Rake::Manifest::Task.new do |t| + t.patterns = ['lib/**/*', 'exe/*', 'CHANGELOG.md', 'CONTRIBUTING.md', + 'LICENSE', 'README.md'] +end + +task build: 'manifest:check' + namespace :docker do desc 'Build docker image' task :build, :cache, :version do |_, args| diff --git a/aruba.gemspec b/aruba.gemspec index 50690ab43..2090cd2e3 100644 --- a/aruba.gemspec +++ b/aruba.gemspec @@ -1,7 +1,4 @@ -lib = ::File.expand_path('lib', __dir__) -$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require 'aruba/version' -require 'rake/file_list' +require_relative 'lib/aruba/version' Gem::Specification.new do |spec| spec.name = 'aruba' @@ -36,6 +33,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.10' spec.add_development_dependency 'pry-doc', '~> 1.0' spec.add_development_dependency 'rake', '~> 13.0' + spec.add_development_dependency 'rake-manifest', '~> 0.1.0' spec.add_development_dependency 'rspec', '~> 3.6' spec.add_development_dependency 'rubocop', '~> 0.88.0' spec.add_development_dependency 'rubocop-packaging', '~> 0.1.1' @@ -47,8 +45,7 @@ Gem::Specification.new do |spec| spec.rubygems_version = '>= 1.6.1' spec.required_ruby_version = '>= 2.4' - spec.files = Rake::FileList['{docs,fixtures,lib}/**/*', 'CHANGELOG.md', \ - 'LICENSE', 'README.md'].exclude(*File.read('.gitignore').split) + spec.files = File.read('Manifest.txt').split spec.executables = ['aruba'] spec.rdoc_options = ['--charset', 'UTF-8', '--main', 'README.md'] From a2e835906fe3ee8042dbdfb3abce2bf9ee71510e Mon Sep 17 00:00:00 2001 From: Matijs van Zuijlen Date: Thu, 20 Aug 2020 19:11:00 +0200 Subject: [PATCH 3/4] Use nicer method to read manifest --- aruba.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aruba.gemspec b/aruba.gemspec index 2090cd2e3..e10ebc7e3 100644 --- a/aruba.gemspec +++ b/aruba.gemspec @@ -45,7 +45,7 @@ Gem::Specification.new do |spec| spec.rubygems_version = '>= 1.6.1' spec.required_ruby_version = '>= 2.4' - spec.files = File.read('Manifest.txt').split + spec.files = File.readlines('Manifest.txt', chomp: true) spec.executables = ['aruba'] spec.rdoc_options = ['--charset', 'UTF-8', '--main', 'README.md'] From 1edf91ab01e7bb158dd27ae45c8a8faf9616e2cb Mon Sep 17 00:00:00 2001 From: Matijs van Zuijlen Date: Thu, 20 Aug 2020 19:28:36 +0200 Subject: [PATCH 4/4] Override Travis' JRUBY_OPTS settings to avoid warnings Travis adds --client to JRUBY_OPTS which causes a warning. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index a901530bd..c842d5100 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,6 +49,7 @@ branches: env: global: - secure: l8uznA5K4K9mZ1krmP3lTMD8WcJ32qGxFOR3jubKHcOBSLB4xSzU2aIqjyJdO+rLzebkwamhJc8pGSIWOUDQYvFiX7splK+uEkbBJ5huAhXtLF4Qgl86bCWbEXYzN7rvn0DQfpJAovyFMNRMnfo70XhwqWzFsaYa7Z0YbqYsJE4= + - JRUBY_OPTS="--dev" - JAVA_OPTS=" --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED