Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

The version number is not accessible from code

Open Beginner friendly
#346 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
ruby
Domain
tooling

Research direction

The version currently lives in a top-level file in the repository, which Ruby code cannot require. Create lib/cucumber/core/version.rb defining Cucumber::Core::VERSION with the same value, then point the existing version reference at the new constant. Done when require 'cucumber/core/version' works and Cucumber::Core::VERSION returns the released version string. Confirm the gem still builds with the same version.

Written by the indexing model from the issue text.

Description

:bank: debt
🤔 What's the problem you've observed?

In supporting Cucumber 11 and 12 together in Aruba, I noticed that Cucumber::Core's version is not available from inside Ruby code since it is stored in a top-level file in the repository. Now, instead of doing something like:

if Cucumber::Core::VERSION >= "19.0.0"
  # [...]
end

I have to resort to:

if defined? Cucumber::Core::Event::Base
  # [...]
end
✨ Do you have a proposal for making it better?

Move the version to a file lib/cucumber/core/version.rb and store it in a constant Cucumber::Core::VERSION.

📚 Any additional context?

No response

Dominant language
Ruby
Stars
36
Forks
48
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cucumber/cucumber-ruby-core

All issues in cucumber/cucumber-ruby-core

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.