diff --git a/bundler/helpers/v1/spec/functions/file_parser_spec.rb b/bundler/helpers/v1/spec/functions/file_parser_spec.rb index 586e4e9ab8..edd47436f4 100644 --- a/bundler/helpers/v1/spec/functions/file_parser_spec.rb +++ b/bundler/helpers/v1/spec/functions/file_parser_spec.rb @@ -12,9 +12,9 @@ ) end - let(:project_name) { "gemfile" } - describe "#parsed_gemfile" do + let(:project_name) { "gemfile" } + subject(:parsed_gemfile) do in_tmp_folder do dependency_source.parsed_gemfile(gemfile_name: "Gemfile") @@ -43,14 +43,11 @@ end describe "#parsed_gemspec" do - let!(:gemspec_fixture) do - fixture("ruby", "gemspecs", "exact") - end + let(:project_name) { "gemfile_exact" } subject(:parsed_gemspec) do - in_tmp_folder do |tmp_path| - File.write(File.join(tmp_path, "test.gemspec"), gemspec_fixture) - dependency_source.parsed_gemspec(gemspec_name: "test.gemspec") + in_tmp_folder do |_tmp_path| + dependency_source.parsed_gemspec(gemspec_name: "example.gemspec") end end diff --git a/bundler/helpers/v2/spec/functions/file_parser_spec.rb b/bundler/helpers/v2/spec/functions/file_parser_spec.rb index 08778ca2a5..63373f404f 100644 --- a/bundler/helpers/v2/spec/functions/file_parser_spec.rb +++ b/bundler/helpers/v2/spec/functions/file_parser_spec.rb @@ -12,9 +12,9 @@ ) end - let(:project_name) { "gemfile" } - describe "#parsed_gemfile" do + let(:project_name) { "gemfile" } + subject(:parsed_gemfile) do in_tmp_folder do dependency_source.parsed_gemfile(gemfile_name: "Gemfile") @@ -108,14 +108,11 @@ end describe "#parsed_gemspec" do - let!(:gemspec_fixture) do - fixture("ruby", "gemspecs", "exact") - end + let(:project_name) { "gemfile_exact" } subject(:parsed_gemspec) do - in_tmp_folder do |tmp_path| - File.write(File.join(tmp_path, "test.gemspec"), gemspec_fixture) - dependency_source.parsed_gemspec(gemspec_name: "test.gemspec") + in_tmp_folder do |_tmp_path| + dependency_source.parsed_gemspec(gemspec_name: "example.gemspec") end end diff --git a/bundler/script/ci-test b/bundler/script/ci-test index ce4f8d5763..11ff34ae9e 100755 --- a/bundler/script/ci-test +++ b/bundler/script/ci-test @@ -1,19 +1,21 @@ -#!/bin/sh -e +#!/bin/bash + +set -e bundle install bundle exec rubocop . bundle exec rspec spec -if [ "$SUITE_NAME" == "bundler1" ]; then - cd helpers/v1 && \ - BUNDLER_VERSION=1 bundle install && \ - BUNDLER_VERSION=1 bundle exec rspec spec &&\ - cd - +if [[ "$SUITE_NAME" == "bundler1" ]]; then + cd helpers/v1 \ + && BUNDLER_VERSION=1 bundle install \ + && BUNDLER_VERSION=1 bundle exec rspec spec\ + && cd - fi -if [ "$SUITE_NAME" == "bundler2" ]; then - cd helpers/v2 && \ - BUNDLER_VERSION=2 bundle install && \ - BUNDLER_VERSION=2 bundle exec rspec spec &&\ - cd - +if [[ "$SUITE_NAME" == "bundler2" ]]; then + cd helpers/v2 \ + && BUNDLER_VERSION=2 bundle install \ + && BUNDLER_VERSION=2 bundle exec rspec spec \ + && cd - fi diff --git a/cargo/script/ci-test b/cargo/script/ci-test index bb430be88d..c29bd83bf2 100755 --- a/cargo/script/ci-test +++ b/cargo/script/ci-test @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/bin/bash + +set -e bundle install bundle exec rubocop . diff --git a/common/script/ci-test b/common/script/ci-test index bb430be88d..c29bd83bf2 100755 --- a/common/script/ci-test +++ b/common/script/ci-test @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/bin/bash + +set -e bundle install bundle exec rubocop . diff --git a/common/spec/helpers/test/error_bash b/common/spec/helpers/test/error_bash index 2bb8d868bd..340672e371 100755 --- a/common/spec/helpers/test/error_bash +++ b/common/spec/helpers/test/error_bash @@ -1,3 +1,5 @@ -#!/bin/sh +#!/bin/bash + +set -e exit 1 diff --git a/common/spec/helpers/test/run_bash b/common/spec/helpers/test/run_bash index 86fa5e54ba..73c0846b33 100755 --- a/common/spec/helpers/test/run_bash +++ b/common/spec/helpers/test/run_bash @@ -1,3 +1,5 @@ -#!/bin/sh +#!/bin/bash + +set -e echo "$@" diff --git a/composer/script/ci-test b/composer/script/ci-test index bb430be88d..c29bd83bf2 100755 --- a/composer/script/ci-test +++ b/composer/script/ci-test @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/bin/bash + +set -e bundle install bundle exec rubocop . diff --git a/dep/script/ci-test b/dep/script/ci-test index bb430be88d..c29bd83bf2 100755 --- a/dep/script/ci-test +++ b/dep/script/ci-test @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/bin/bash + +set -e bundle install bundle exec rubocop . diff --git a/docker/script/ci-test b/docker/script/ci-test index bb430be88d..c29bd83bf2 100755 --- a/docker/script/ci-test +++ b/docker/script/ci-test @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/bin/bash + +set -e bundle install bundle exec rubocop . diff --git a/elm/script/ci-test b/elm/script/ci-test index bb430be88d..c29bd83bf2 100755 --- a/elm/script/ci-test +++ b/elm/script/ci-test @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/bin/bash + +set -e bundle install bundle exec rubocop . diff --git a/git_submodules/script/ci-test b/git_submodules/script/ci-test index bb430be88d..c29bd83bf2 100755 --- a/git_submodules/script/ci-test +++ b/git_submodules/script/ci-test @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/bin/bash + +set -e bundle install bundle exec rubocop . diff --git a/github_actions/script/ci-test b/github_actions/script/ci-test index 64621ed561..c29bd83bf2 100755 --- a/github_actions/script/ci-test +++ b/github_actions/script/ci-test @@ -1,4 +1,6 @@ -#!/bin/sh +#!/bin/bash + +set -e bundle install bundle exec rubocop . diff --git a/go_modules/script/ci-test b/go_modules/script/ci-test index bb430be88d..c29bd83bf2 100755 --- a/go_modules/script/ci-test +++ b/go_modules/script/ci-test @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/bin/bash + +set -e bundle install bundle exec rubocop . diff --git a/gradle/script/ci-test b/gradle/script/ci-test index bb430be88d..c29bd83bf2 100755 --- a/gradle/script/ci-test +++ b/gradle/script/ci-test @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/bin/bash + +set -e bundle install bundle exec rubocop . diff --git a/hex/script/ci-test b/hex/script/ci-test index bb430be88d..c29bd83bf2 100755 --- a/hex/script/ci-test +++ b/hex/script/ci-test @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/bin/bash + +set -e bundle install bundle exec rubocop . diff --git a/maven/script/ci-test b/maven/script/ci-test index bb430be88d..c29bd83bf2 100755 --- a/maven/script/ci-test +++ b/maven/script/ci-test @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/bin/bash + +set -e bundle install bundle exec rubocop . diff --git a/npm_and_yarn/script/ci-test b/npm_and_yarn/script/ci-test index feaeb6f82d..95a7b32d19 100755 --- a/npm_and_yarn/script/ci-test +++ b/npm_and_yarn/script/ci-test @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/bin/bash + +set -e bundle install bundle exec rubocop . diff --git a/nuget/script/ci-test b/nuget/script/ci-test index bb430be88d..c29bd83bf2 100755 --- a/nuget/script/ci-test +++ b/nuget/script/ci-test @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/bin/bash + +set -e bundle install bundle exec rubocop . diff --git a/omnibus/script/ci-test b/omnibus/script/ci-test index ef4db8eb25..52635af18e 100755 --- a/omnibus/script/ci-test +++ b/omnibus/script/ci-test @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/bin/bash + +set -e bundle install bundle exec rubocop . diff --git a/python/script/ci-test b/python/script/ci-test index 058f9d58a9..e3aed6004b 100755 --- a/python/script/ci-test +++ b/python/script/ci-test @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/bin/bash + +set -e bundle install pyenv exec flake8 helpers/. --count --exclude=./.*,./python/spec/fixtures --show-source --statistics diff --git a/terraform/script/ci-test b/terraform/script/ci-test index bb430be88d..c29bd83bf2 100755 --- a/terraform/script/ci-test +++ b/terraform/script/ci-test @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/bin/bash + +set -e bundle install bundle exec rubocop .