Skip to content
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

Set 2.6 as minimum ruby version for Sinatra 3 #1699

Merged
merged 5 commits into from Oct 4, 2021

Conversation

epergo
Copy link
Member

@epergo epergo commented May 21, 2021

Now that we have an unstable branch I think we can start doing these kind of changes. Ruby 2.5 support was dropped last March so I think that for the release of Sinatra 3.0 we could set the required minimum ruby version to 2.6 which will have support until March 2022.

I have cleaned up the indifferent_hash implementation because we had a lot of conditionals to check if the hash implementation of the installed ruby version had certain methods or not.

WDYT?

@@ -1,11 +1,4 @@
# frozen_string_literal: true
$stderr.puts <<EOF if !Hash.method_defined?(:slice) && !$LOAD_PATH.grep(%r{gems/activesupport}).empty? && ENV['SINATRA_ACTIVESUPPORT_WARNING'] != 'false'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash#slice was added in Ruby 2.5 so this if is going to be false always.

@jkowens
Copy link
Member

jkowens commented May 30, 2021

I like this suggestion 👍

Copy link
Member

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A thorough and careful update! Thanks, @epergo!

(Any RuboCop configuration that could get an update, too.)

@olleolleolle
Copy link
Member

@namusyaka Do you feel ready to merge this?

@jkowens jkowens merged commit 72b3d63 into sinatra:unstable Oct 4, 2021
jkowens pushed a commit that referenced this pull request Oct 4, 2021
* Run tests for Ruby versions >= 2.6

* Remove not needed checks for methods defined

* Set required_ruby_version to >= 2.6

* Update READMEs with new Ruby versions
jkowens pushed a commit that referenced this pull request Oct 4, 2021
* Run tests for Ruby versions >= 2.6

* Remove not needed checks for methods defined

* Set required_ruby_version to >= 2.6

* Update READMEs with new Ruby versions
jkowens pushed a commit that referenced this pull request Oct 4, 2021
* Run tests for Ruby versions >= 2.6

* Remove not needed checks for methods defined

* Set required_ruby_version to >= 2.6

* Update READMEs with new Ruby versions
@epergo epergo deleted the ep/drop-rubies branch October 4, 2021 07:35
jkowens pushed a commit that referenced this pull request Feb 2, 2022
* Run tests for Ruby versions >= 2.6

* Remove not needed checks for methods defined

* Set required_ruby_version to >= 2.6

* Update READMEs with new Ruby versions
dentarg referenced this pull request in sinatra/mustermann Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants