Open
Description
Is your feature request related to a problem? Please describe.
As part of my local development workflow, I would like to make some code changes to this repo, and quickly run the generator on another gem for testing it out.
I tried this command locally (note the cwd
is outside the forked repo):
magne@C02ZV1LNMD6W af_json_api % /Users/magne/github/magneland/github-changelog-generator/bin/github_changelog_generator --base CHANGELOG.md --token TOKEN --user USER --project af_json_api
Traceback (most recent call last):
4: from /Users/magne/github/magneland/github-changelog-generator/bin/github_changelog_generator:4:in `<main>'
3: from /Users/magne/github/magneland/github-changelog-generator/bin/github_changelog_generator:4:in `require_relative'
2: from /Users/magne/github/magneland/github-changelog-generator/lib/github_changelog_generator.rb:13:in `<top (required)>'
1: from /Users/magne/.rvm/rubies/ruby-2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:155:in `require'
/Users/magne/.rvm/rubies/ruby-2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:155:in `require': cannot load such file -- github_changelog_generator/helper (LoadError)
The error happens because files in lib/
use the "require" directive to include other files in lib/
.
Incidentally, bin/github_changelog_generator
already makes use of require_relative
so that is already a pattern.
Describe the solution you'd like
Use require_relative
instead of require
.
Describe alternatives you've considered
Not sure if there's a better way or a workaround?
Additional context
See: rubocop/rubocop#8748
Metadata
Metadata
Assignees
Labels
No labels