Skip to content

Commit f422c05

Browse files
committed
Add support for Ruby 2.2
* Use Ruby 2.2.6 from RubyInstaller on Windows since there is no more recent release of Ruby 2.2.
1 parent a01ba37 commit f422c05

File tree

7 files changed

+14
-8
lines changed

7 files changed

+14
-8
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
matrix:
1515
os: [ ubuntu-16.04, ubuntu-18.04, macos-latest, windows-latest ]
1616
# Use various version syntaxes here for testing
17-
ruby: [ .ruby-version, 2.3, 2.7.0, ruby-head, jruby, truffleruby, truffleruby-head, rubinius ]
17+
ruby: [ .ruby-version, 2.2, 2.3, 2.7.0, ruby-head, jruby, truffleruby, truffleruby-head, rubinius ]
1818
exclude:
1919
- os: windows-latest
2020
ruby: truffleruby
@@ -34,7 +34,7 @@ jobs:
3434
ruby-version: ${{ matrix.ruby }}
3535
- run: ruby --version
3636
- run: ridk version
37-
if: matrix.os == 'windows-latest' && !startsWith(matrix.ruby, '2.3')
37+
if: matrix.os == 'windows-latest' && !startsWith(matrix.ruby, '2.3') && !startsWith(matrix.ruby, '2.2')
3838
- name: Subprocess test
3939
run: ruby test_subprocess.rb
4040
- name: OpenSSL version

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ This action currently supports these versions of MRI, JRuby and TruffleRuby:
1616

1717
| Interpreter | Versions |
1818
| ----------- | -------- |
19-
| 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 |
19+
| 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 |
2020
| JRuby | 9.2.9.0 |
2121
| TruffleRuby | 19.3.0, 19.3.1, head |
2222
| Rubinius | 4.14 |
2323

24-
Note that Ruby 2.3 and the OpenSSL version it needs (1.0.2) are both end-of-life,
25-
which means Ruby 2.3 is unmaintained and considered insecure.
24+
Note that Ruby 2.3 and the OpenSSL version it needs (1.0.2) are both end-of-life,
25+
which means Ruby 2.3 is unmaintained and considered insecure.
2626
On Windows, Ruby 2.4 uses OpenSSL 1.0.2, which is no longer maintained.
27+
Ruby 2.2 resolves to 2.2.6 on Windows (last build from RubyInstaller) and 2.2.10 otherwise.
2728

2829
### Supported Platforms
2930

dist/index.js

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generate-windows-versions.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
require 'yaml'
33
require 'json'
44

5+
min_version = '2.2.6'
56
url = 'https://raw.githubusercontent.com/oneclick/rubyinstaller.org-website/master/_data/downloads.yaml'
67
entries = YAML.load(Net::HTTP.get(URI(url)), symbolize_names: true)
78

@@ -18,7 +19,7 @@
1819
}.sort_by { |version, entry|
1920
version
2021
}.select { |version, entry|
21-
version >= "2.3"
22+
Gem::Version.new(version) >= Gem::Version.new(min_version)
2223
}.map { |version, entry|
2324
[version, entry[:href]]
2425
}.to_h

ruby-builder-versions.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export function getVersions(platform) {
22
const versions = {
33
"ruby": [
4+
"2.2.10",
45
"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",
56
"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",
67
"2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.5.4", "2.5.5", "2.5.6", "2.5.7",

windows-versions.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export const versions = {
2+
"2.2.6": "https://dl.bintray.com/oneclick/rubyinstaller/ruby-2.2.6-x64-mingw32.7z",
23
"2.3.0": "https://dl.bintray.com/oneclick/rubyinstaller/ruby-2.3.0-x64-mingw32.7z",
34
"2.3.1": "https://dl.bintray.com/oneclick/rubyinstaller/ruby-2.3.1-x64-mingw32.7z",
45
"2.3.3": "https://dl.bintray.com/oneclick/rubyinstaller/ruby-2.3.3-x64-mingw32.7z",

windows.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export async function install(platform, ruby) {
3636
const newPath = setupPath(msys2, rubyPrefix)
3737
core.exportVariable('PATH', newPath)
3838

39-
if (version.startsWith('2.3')) {
39+
if (version.startsWith('2.2') || version.startsWith('2.3')) {
4040
core.exportVariable('SSL_CERT_FILE', `${hostedRuby}\\ssl\\cert.pem`)
4141
}
4242

0 commit comments

Comments
 (0)