Skip to content

Add NextRails.current? method#174

Merged
etagwerker merged 1 commit intomainfrom
feature/current-method
Apr 1, 2026
Merged

Add NextRails.current? method#174
etagwerker merged 1 commit intomainfrom
feature/current-method

Conversation

@JuanVqz
Copy link
Copy Markdown
Member

@JuanVqz JuanVqz commented Apr 1, 2026

Closes #173.

Description

Adds NextRails.current? as a convenience method that returns !NextRails.next?.
This makes conditional logic in dual-boot setups more readable when targeting
the current dependencies.

Motivation and Context

Requested in #173 — having the inverse of NextRails.next? avoids negation
in application code and improves readability.

How Has This Been Tested?

  • Added RSpec tests for NextRails.current? covering: BUNDLE_GEMFILE unset,
    set to Gemfile.next, and set to something else
  • All 8 specs pass: bundle exec rspec spec/next_rails_spec.rb

I will abide by the code of conduct

@JuanVqz JuanVqz force-pushed the feature/current-method branch from bb675df to 0d160bc Compare April 1, 2026 20:43
Inverse of NextRails.next?, returns true when the
application is running with the current set of
dependencies.

Closes #173.
@JuanVqz JuanVqz force-pushed the feature/current-method branch from 0d160bc to d495dc4 Compare April 1, 2026 20:43
@JuanVqz JuanVqz marked this pull request as ready for review April 1, 2026 20:44
@JuanVqz JuanVqz self-assigned this Apr 1, 2026
Copy link
Copy Markdown
Member

@etagwerker etagwerker left a comment

Choose a reason for hiding this comment

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

@JuanVqz Looks good, thanks!

@etagwerker etagwerker merged commit caf5add into main Apr 1, 2026
10 checks passed
@etagwerker etagwerker deleted the feature/current-method branch April 1, 2026 21:27
@JuanVqz JuanVqz mentioned this pull request Apr 2, 2026
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.

[REQUEST] Support for NextRails.current?

2 participants