File tree Expand file tree Collapse file tree 3 files changed +2
-39
lines changed Expand file tree Collapse file tree 3 files changed +2
-39
lines changed Original file line number Diff line number Diff line change 11<?php
2- if (file_exists ('/etc/alpine-release ' )) {
3- if (version_compare (file_get_contents ('/etc/alpine-release ' ), '3.8.0 ' ) < 0 ) {
4- echo "Skipping test; Alpine < 3.8 " ;
5- exit (0 );
6- }
7- }
8- else if (file_exists ('/etc/debian_version ' )) {
9- if (version_compare (file_get_contents ('/etc/debian_version ' ), '9.0 ' ) < 0 ) {
10- echo "Skipping test; Debian < 9.0 " ;
11- exit (0 );
12- }
13- }
14- else {
15- echo "FAIL: Unknown base image (neither /etc/alpine-release nor /etc/debian_version exists). \n" ;
16- exit (1 );
17- }
18-
19- if (version_compare (PHP_VERSION , '7.2.0 ' ) < 0 ) {
20- echo "Skipping test; PHP < 7.2 " ;
21- exit (0 );
22- }
23-
242if (!defined ('PASSWORD_ARGON2I ' )) {
253 echo "FAIL: Constant PASSWORD_ARGON2I is not defined. \n" ;
264 exit (1 );
Original file line number Diff line number Diff line change @@ -13,9 +13,5 @@ cp Gemfile.lock Gemfile.lock.orig
1313BUNDLE_FROZEN=1 bundle install
1414diff -u Gemfile.lock.orig Gemfile.lock >&2
1515
16- if ruby -rbundler -e ' exit Gem::Version.new(Bundler::VERSION) >= Gem::Version.new("2.1") ? 0 : 1' ; then
17- BUNDLE_DEPLOYMENT=1 bundle install
18- else
19- bundle install --deployment
20- fi
16+ bundle install --deployment
2117diff -u Gemfile.lock.orig Gemfile.lock >&2
Original file line number Diff line number Diff line change @@ -20,22 +20,11 @@ gems="$(ruby -e '
2020 require "json"
2121 require "open-uri"
2222
23- # https://github.com/ruby/ruby/commit/05aac90a1bcfeb180f5e78ea8b00a4d1b04d5eed
24- # https://bugs.ruby-lang.org/issues/15893
25- # for Ruby 2.5+, we should use "URI.open", but for Ruby 2.4 we still need to use "open(...)" directly
26- def openURI(uri)
27- if Gem::Version.create(RUBY_VERSION) >= Gem::Version.create("2.5")
28- URI.open(uri)
29- else
30- open(uri)
31- end
32- end
33-
3423 for gem in gems
3524 # ruby 2.2.2+: rack activesupport
3625 # ruby 2.0+: mime-types
3726 # (jruby 1.7 is ruby 1.9)
38- gemRubyVersion = JSON.load(openURI ("https://rubygems.org/api/v1/versions/#{ gem }.json"))[0]["ruby_version"]
27+ gemRubyVersion = JSON.load(URI.open ("https://rubygems.org/api/v1/versions/#{ gem }.json"))[0]["ruby_version"]
3928 if Gem::Dependency.new("", gemRubyVersion).match?("", RUBY_VERSION)
4029 puts gem
4130 else
You can’t perform that action at this time.
0 commit comments