diff --git a/test/tests/php-argon2/container.php b/test/tests/php-argon2/container.php index 018552a7da..6fa22f575f 100644 --- a/test/tests/php-argon2/container.php +++ b/test/tests/php-argon2/container.php @@ -1,26 +1,4 @@ &2 -if ruby -rbundler -e 'exit Gem::Version.new(Bundler::VERSION) >= Gem::Version.new("2.1") ? 0 : 1'; then - BUNDLE_DEPLOYMENT=1 bundle install -else - bundle install --deployment -fi +bundle install --deployment diff -u Gemfile.lock.orig Gemfile.lock >&2 diff --git a/test/tests/ruby-gems/container.sh b/test/tests/ruby-gems/container.sh index e71260699e..7f5d061724 100644 --- a/test/tests/ruby-gems/container.sh +++ b/test/tests/ruby-gems/container.sh @@ -20,22 +20,11 @@ gems="$(ruby -e ' require "json" require "open-uri" - # https://github.com/ruby/ruby/commit/05aac90a1bcfeb180f5e78ea8b00a4d1b04d5eed - # https://bugs.ruby-lang.org/issues/15893 - # for Ruby 2.5+, we should use "URI.open", but for Ruby 2.4 we still need to use "open(...)" directly - def openURI(uri) - if Gem::Version.create(RUBY_VERSION) >= Gem::Version.create("2.5") - URI.open(uri) - else - open(uri) - end - end - for gem in gems # ruby 2.2.2+: rack activesupport # ruby 2.0+: mime-types # (jruby 1.7 is ruby 1.9) - gemRubyVersion = JSON.load(openURI("https://rubygems.org/api/v1/versions/#{ gem }.json"))[0]["ruby_version"] + gemRubyVersion = JSON.load(URI.open("https://rubygems.org/api/v1/versions/#{ gem }.json"))[0]["ruby_version"] if Gem::Dependency.new("", gemRubyVersion).match?("", RUBY_VERSION) puts gem else