Skip to content

Commit

Permalink
Merge pull request #14 from rubygems/add-old-ruby-warning
Browse files Browse the repository at this point in the history
Add warnings for unmaintained Ruby versions
  • Loading branch information
duckinator authored Feb 10, 2023
2 parents eab2d8c + 353c4ce commit 472640b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu, macos, windows ]
ruby: [ 2.2, 2.7, head ]
ruby: [ 2.7, 3.0, 3.1, 3.2, head ]
include:
- { os: windows , ruby: mingw }
exclude:
- { os: windows , ruby: head }

steps:
- name: repo checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: load ruby
uses: ruby/setup-ruby@v1
Expand Down
7 changes: 7 additions & 0 deletions check.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#!/usr/bin/env ruby
# Encoding: utf-8

if RUBY_VERSION < "2.7"
warn "!!! WARNING !!!",
"Ruby #{RUBY_VERSION} has reached end-of-life, and is unsupported.",
"This script may not work.",
""
end

if ARGV.include?("-h") || ARGV.include?("--help")
puts "USAGE: check.rb [HOSTNAME] [TLS_VERSION] [VERIFY]"
puts " default: check.rb rubygems.org auto VERIFY_PEER"
Expand Down

0 comments on commit 472640b

Please sign in to comment.