Browse Source

Merge pull request #7188 from deivid-rodriguez/add_test_for_bundler_deployment_flag

Add `--deployment` flag check to ruby-bundler test
Tianon Gravi 5 years ago
parent
commit
834823b1e7
1 changed files with 7 additions and 0 deletions
  1. 7 0
      test/tests/ruby-bundler/container.sh

+ 7 - 0
test/tests/ruby-bundler/container.sh

@@ -12,3 +12,10 @@ BUNDLE_FROZEN=0 bundle install
 cp Gemfile.lock Gemfile.lock.orig
 BUNDLE_FROZEN=1 bundle install
 diff -u Gemfile.lock.orig Gemfile.lock >&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
+diff -u Gemfile.lock.orig Gemfile.lock >&2