From 7f2adaaacd2389f3b735c4ef623ceea8da8f3aed Mon Sep 17 00:00:00 2001 From: MSP-Greg Date: Thu, 2 Apr 2020 16:37:23 -0500 Subject: [PATCH 1/2] gem install bundler - add '--conservative' use --conservative to avoid unnecessary bundler installs, especially on master --- dist/index.js | 4 ++-- index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 0e1c852cb..8e1b0b4b9 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1107,7 +1107,7 @@ async function installBundler(platform, rubyPrefix, engine, rubyVersion) { } else if (/^\d+/.test(bundlerVersion)) { versionArray = ['-v', `~> ${bundlerVersion}`] } else if (bundlerVersion === 'latest') { - versionArray = [] + versionArray = ['-v', '>= 2.1'] } else { throw new Error(`Cannot parse bundler input: ${bundlerVersion}`) } @@ -1117,7 +1117,7 @@ async function installBundler(platform, rubyPrefix, engine, rubyVersion) { } else if (bundlerVersion === '1' && engine === 'truffleruby') { console.log(`Using the Bundler version shipped with ${engine}`) } else { - await exec.exec(path.join(rubyPrefix, 'bin', 'gem'), ['install', 'bundler', ...versionArray, '--no-document']) + await exec.exec(path.join(rubyPrefix, 'bin', 'gem'), ['install', 'bundler', ...versionArray, '--no-document', '--conservative']) } } diff --git a/index.js b/index.js index ac8cb7fae..5c198feb7 100644 --- a/index.js +++ b/index.js @@ -149,7 +149,7 @@ async function installBundler(platform, rubyPrefix, engine, rubyVersion) { } else if (/^\d+/.test(bundlerVersion)) { versionArray = ['-v', `~> ${bundlerVersion}`] } else if (bundlerVersion === 'latest') { - versionArray = [] + versionArray = ['-v', '>= 2.1'] } else { throw new Error(`Cannot parse bundler input: ${bundlerVersion}`) } @@ -159,7 +159,7 @@ async function installBundler(platform, rubyPrefix, engine, rubyVersion) { } else if (bundlerVersion === '1' && engine === 'truffleruby') { console.log(`Using the Bundler version shipped with ${engine}`) } else { - await exec.exec(path.join(rubyPrefix, 'bin', 'gem'), ['install', 'bundler', ...versionArray, '--no-document']) + await exec.exec(path.join(rubyPrefix, 'bin', 'gem'), ['install', 'bundler', ...versionArray, '--no-document', '--conservative']) } } From 36269a774f174a3b4690773d692e56bcdc366a76 Mon Sep 17 00:00:00 2001 From: MSP-Greg Date: Thu, 2 Apr 2020 21:22:59 -0500 Subject: [PATCH 2/2] README.md - remove reference to MSP-Greg/actions-ruby Preferred repo is now MSP-Greg/setup-ruby-pkgs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5bae43f2a..c673e4576 100644 --- a/README.md +++ b/README.md @@ -163,5 +163,5 @@ Please [update](https://github.com/ruby/setup-ruby/releases/tag/v1.13.0) if you ## Credits The current maintainer of this action is @eregon. -Most of the Windows logic is from https://github.com/MSP-Greg/actions-ruby by MSP-Greg. +Most of the Windows logic is based on work by MSP-Greg. Many thanks to MSP-Greg and Lars Kanis for the help with Ruby Installer.