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

[Hanami Issue 921] Support for Ruby version 2.4 #487

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

iagus
Copy link

@iagus iagus commented May 25, 2018

Hello!

Just started with Hanami and I thought this issue would be a good opportunity for a first dive-in! And the JRuby version 9.2.0.0 was just released! 💃

I also made this PR for the Devtools repo, so I could check the tests with the rubocop unstable's TargetRubyVersion changed.

To provide as much information as possible:

  • To check the tests with the new TargetRubyVersion I modified (not committed) the inherit_form in Devtools' .rubocop-unstable.yml.
  • Run the tests! However, got 1 offense:
.....................C..................................................................................................................

Offenses:

lib/hanami/model/migrator/mysql_adapter.rb:26:24: C: Performance/RegexpMatch: Use match? instead of match when MatchData is not used.
          message = if e.message.match(/database exists/) # rubocop:disable Performance/RedundantMatch
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hanami/model/migrator/mysql_adapter.rb:40:24: C: Performance/RegexpMatch: Use match? instead of match when MatchData is not used.
          message = if e.message.match(/doesn\'t exist/) # rubocop:disable Performance/RedundantMatch
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  • I made the changes requested and re-run the tests:
.....................W..................................................................................................................

Offenses:

lib/hanami/model/migrator/mysql_adapter.rb:26:60: W: Lint/UnneededCopDisableDirective: Unnecessary disabling of Performance/RedundantMatch.
          message = if e.message.match?(/database exists/) # rubocop:disable Performance/RedundantMatch
                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hanami/model/migrator/mysql_adapter.rb:40:59: W: Lint/UnneededCopDisableDirective: Unnecessary disabling of Performance/RedundantMatch.
          message = if e.message.match?(/doesn\'t exist/) # rubocop:disable Performance/RedundantMatch
                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I did as Rubocop commands and removed the directive!

The next tests run looked fine! 🍻 So I understand the last two changes make sense but let me know.

Thank you! 🌷

@jodosha
Copy link
Member

jodosha commented Jun 14, 2018

@iagus Hi and thanks for this first stab. We can't merge your PRs yet, until Travis won't make JRuby 9.2.0.0 available.

@AlfonsoUceda
Copy link
Contributor

@iagus FYI hanami/devtools#2 has been merged

@jodosha
Copy link
Member

jodosha commented Aug 6, 2018

@iagus @AlfonsoUceda Please hold on with this. We need first to reach JRuby 9.2 compat for JRuby and then we'll be able to proceed.

@jodosha jodosha changed the base branch from unstable to main June 15, 2021 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants