diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dfe4b08..0328a1f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: matrix: os: [ ubuntu-16.04, ubuntu-18.04, macos-latest, windows-latest ] # Use various version syntaxes here for testing - ruby: [ .ruby-version, 2.3, 2.7.0, ruby-head, jruby, truffleruby, truffleruby-head, rubinius ] + ruby: [ .ruby-version, 2.2, 2.3, 2.7.0, ruby-head, jruby, truffleruby, truffleruby-head, rubinius ] exclude: - os: windows-latest ruby: truffleruby @@ -34,7 +34,7 @@ jobs: ruby-version: ${{ matrix.ruby }} - run: ruby --version - run: ridk version - if: matrix.os == 'windows-latest' && !startsWith(matrix.ruby, '2.3') + if: matrix.os == 'windows-latest' && !startsWith(matrix.ruby, '2.3') && !startsWith(matrix.ruby, '2.2') - name: Subprocess test run: ruby test_subprocess.rb - name: OpenSSL version diff --git a/README.md b/README.md index f47777e..7d59cbd 100644 --- a/README.md +++ b/README.md @@ -16,14 +16,15 @@ This action currently supports these versions of MRI, JRuby and TruffleRuby: | Interpreter | Versions | | ----------- | -------- | -| Ruby | 2.3.0 - 2.3.8, 2.4.0 - 2.4.9, 2.5.0 - 2.5.7, 2.6.0 - 2.6.5, 2.7.0, head | +| Ruby | 2.2, 2.3.0 - 2.3.8, 2.4.0 - 2.4.9, 2.5.0 - 2.5.7, 2.6.0 - 2.6.5, 2.7.0, head | | JRuby | 9.2.9.0 | | TruffleRuby | 19.3.0, 19.3.1, head | | Rubinius | 4.14 | -Note that Ruby 2.3 and the OpenSSL version it needs (1.0.2) are both end-of-life, -which means Ruby 2.3 is unmaintained and considered insecure. +Note that Ruby ≤ 2.3 and the OpenSSL version it needs (1.0.2) are both end-of-life, +which means Ruby ≤ 2.3 is unmaintained and considered insecure. On Windows, Ruby 2.4 uses OpenSSL 1.0.2, which is no longer maintained. +Ruby 2.2 resolves to 2.2.6 on Windows (last build from RubyInstaller) and 2.2.10 otherwise. ### Supported Platforms diff --git a/dist/index.js b/dist/index.js index 9dc5c75..8d53d1e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2145,6 +2145,7 @@ __webpack_require__.r(__webpack_exports__); function getVersions(platform) { const versions = { "ruby": [ + "2.2.10", "2.3.0", "2.3.1", "2.3.2", "2.3.3", "2.3.4", "2.3.5", "2.3.6", "2.3.7", "2.3.8", "2.4.0", "2.4.1", "2.4.2", "2.4.3", "2.4.4", "2.4.5", "2.4.6", "2.4.7", "2.4.9", "2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.5.4", "2.5.5", "2.5.6", "2.5.7", @@ -5103,6 +5104,7 @@ exports.getState = getState; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "versions", function() { return versions; }); const versions = { + "2.2.6": "https://dl.bintray.com/oneclick/rubyinstaller/ruby-2.2.6-x64-mingw32.7z", "2.3.0": "https://dl.bintray.com/oneclick/rubyinstaller/ruby-2.3.0-x64-mingw32.7z", "2.3.1": "https://dl.bintray.com/oneclick/rubyinstaller/ruby-2.3.1-x64-mingw32.7z", "2.3.3": "https://dl.bintray.com/oneclick/rubyinstaller/ruby-2.3.3-x64-mingw32.7z", @@ -7896,7 +7898,7 @@ async function install(platform, ruby) { const newPath = setupPath(msys2, rubyPrefix) core.exportVariable('PATH', newPath) - if (version.startsWith('2.3')) { + if (version.startsWith('2.2') || version.startsWith('2.3')) { core.exportVariable('SSL_CERT_FILE', `${hostedRuby}\\ssl\\cert.pem`) } diff --git a/generate-windows-versions.rb b/generate-windows-versions.rb index 223fab9..f0da5c0 100644 --- a/generate-windows-versions.rb +++ b/generate-windows-versions.rb @@ -2,6 +2,7 @@ require 'net/http' require 'yaml' require 'json' +min_version = '2.2.6' url = 'https://raw.githubusercontent.com/oneclick/rubyinstaller.org-website/master/_data/downloads.yaml' entries = YAML.load(Net::HTTP.get(URI(url)), symbolize_names: true) @@ -18,7 +19,7 @@ versions = entries.select { |entry| }.sort_by { |version, entry| version }.select { |version, entry| - version >= "2.3" + Gem::Version.new(version) >= Gem::Version.new(min_version) }.map { |version, entry| [version, entry[:href]] }.to_h diff --git a/ruby-builder-versions.js b/ruby-builder-versions.js index fed14d0..d704beb 100644 --- a/ruby-builder-versions.js +++ b/ruby-builder-versions.js @@ -1,6 +1,7 @@ export function getVersions(platform) { const versions = { "ruby": [ + "2.2.10", "2.3.0", "2.3.1", "2.3.2", "2.3.3", "2.3.4", "2.3.5", "2.3.6", "2.3.7", "2.3.8", "2.4.0", "2.4.1", "2.4.2", "2.4.3", "2.4.4", "2.4.5", "2.4.6", "2.4.7", "2.4.9", "2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.5.4", "2.5.5", "2.5.6", "2.5.7", diff --git a/windows-versions.js b/windows-versions.js index 485412a..cbec165 100644 --- a/windows-versions.js +++ b/windows-versions.js @@ -1,4 +1,5 @@ export const versions = { + "2.2.6": "https://dl.bintray.com/oneclick/rubyinstaller/ruby-2.2.6-x64-mingw32.7z", "2.3.0": "https://dl.bintray.com/oneclick/rubyinstaller/ruby-2.3.0-x64-mingw32.7z", "2.3.1": "https://dl.bintray.com/oneclick/rubyinstaller/ruby-2.3.1-x64-mingw32.7z", "2.3.3": "https://dl.bintray.com/oneclick/rubyinstaller/ruby-2.3.3-x64-mingw32.7z", diff --git a/windows.js b/windows.js index 373a18d..09b1ac9 100644 --- a/windows.js +++ b/windows.js @@ -36,7 +36,7 @@ export async function install(platform, ruby) { const newPath = setupPath(msys2, rubyPrefix) core.exportVariable('PATH', newPath) - if (version.startsWith('2.3')) { + if (version.startsWith('2.2') || version.startsWith('2.3')) { core.exportVariable('SSL_CERT_FILE', `${hostedRuby}\\ssl\\cert.pem`) }