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 1
1
<?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
-
24
2
if (!defined ('PASSWORD_ARGON2I ' )) {
25
3
echo "FAIL: Constant PASSWORD_ARGON2I is not defined. \n" ;
26
4
exit (1 );
Original file line number Diff line number Diff line change @@ -13,9 +13,5 @@ cp Gemfile.lock Gemfile.lock.orig
13
13
BUNDLE_FROZEN=1 bundle install
14
14
diff -u Gemfile.lock.orig Gemfile.lock >&2
15
15
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
21
17
diff -u Gemfile.lock.orig Gemfile.lock >&2
Original file line number Diff line number Diff line change @@ -20,22 +20,11 @@ gems="$(ruby -e '
20
20
require "json"
21
21
require "open-uri"
22
22
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
-
34
23
for gem in gems
35
24
# ruby 2.2.2+: rack activesupport
36
25
# ruby 2.0+: mime-types
37
26
# (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"]
39
28
if Gem::Dependency.new("", gemRubyVersion).match?("", RUBY_VERSION)
40
29
puts gem
41
30
else
You can’t perform that action at this time.
0 commit comments