-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop support for Ruby 2.0, 2.1, 2.2, 2.3, and 2.4 #549
base: master
Are you sure you want to change the base?
Conversation
058a1d9
to
574f64e
Compare
1a550e1
to
38b0960
Compare
@@ -77,7 +49,7 @@ jobs: | |||
runs-on: ubuntu-latest | |||
strategy: | |||
matrix: | |||
ruby: ["2.0", "ruby"] | |||
ruby: ["2.5", "ruby"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗒️ Run slow functional tests on the oldest Ruby we support (2.5) and the latest Ruby.
@@ -18,12 +18,12 @@ Style/ClassAndModuleChildren: | |||
Enabled: false | |||
Style/DoubleNegation: | |||
Enabled: false | |||
Style/FileName: | |||
Naming/FileName: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗒️ I had to upgrade the rubocop gem to support TargetRubyVersion: 2.5
. The new version migrated the names of some cops, hence the changes in these configs.
@@ -1,8 +1,3 @@ | |||
source 'https://rubygems.org' | |||
|
|||
gemspec | |||
|
|||
# public_suffix 3+ requires ruby 2.1+ | |||
if Gem::Requirement.new('< 2.1').satisfied_by?(Gem::Version.new(RUBY_VERSION)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗒️ No longer needed, since we no longer support Ruby < 2.1.
@@ -1,5 +1,4 @@ | |||
require "monitor" | |||
require "thread" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗒️ RuboCop flagged this as an unnecessary require
(the Thread
constant is always available without needing to require it.)
@@ -131,7 +131,7 @@ def test_execute_raises_on_non_zero_exit_status_and_captures_stdout_and_stderr | |||
|
|||
def test_test_does_not_raise_on_non_zero_exit_status | |||
Netssh.new(a_host) do |_host| | |||
test :false | |||
test :false # rubocop:disable Lint/BooleanSymbol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗒️ RuboCop thinks this is a typo, and that we mean false
and not :false
. However in this case :false
is the name of a command we are executing via SSH, not a boolean value.
Already, the latest version of the sshkit gem is no longer installable on Ruby 2.2 or older. See #548.
Rather than add workarounds to the sshkit code to restore compatibility with old versions of Ruby, we've decided to officially drop support for them.
This PR drops support for Ruby 2.0, 2.1, 2.2, 2.3, and 2.4. For reference, Ruby 2.4 was officially EOL'd 4 years and 9 months ago (31 Mar 2020), so it is not unreasonable for us to drop support in 2025.
If users wish to use the sshkit gem on an old version of Ruby, they can still do so by installing an older version. For example, 1.22.0 works on Ruby 2.2.