-
Notifications
You must be signed in to change notification settings - Fork 106
Use require_relative instead of require #312
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
Conversation
|
Hmm. Could you remove Let's work on it as a separated PR. |
Yes, I'll remove Oh, I didn't know that
Sure! |
GitHub: test-unitGH-311 This patch will reduce dependency on `$LOAD_PATH`. It replaces `require` with `require_relative` for internal library files. This change is applied only when the replacement can be done statically and simply. More advanced replacements are out of scope for this patch, such as: * Using `autoload` * Changes under `test/` Co-authored-by: Sutou Kouhei <kou@clear-code.com>
e564ff0 to
54ea7f5
Compare
|
The remaining $ git grep --line-number --word-regexp require -- :^doc/ :^sample/ :^test/External libraries
More advanced replacements
Just comments
No change neededThese are
|
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
GitHub: fix test-unitGH-311 This is a follow-up to test-unitGH-312 and the final patch to fix test-unitGH-311. This patch will reduce dependency on `$LOAD_PATH`. It replaces `require` with `require_relative` for internal library files in `test/`. If you want to run tests against the installed `test-unit`, you can still use the `test/` directory like this: This example runs tests against the installed `test-unit` version 3.6.8. ```console $ ruby -I $(gem env home)/gems/test-unit-3.6.8/lib test-unit test ```
GitHub: fix test-unitGH-311 This is a follow-up to test-unitGH-312 and the final patch to fix test-unitGH-311. This patch will reduce dependency on `$LOAD_PATH`. It replaces `require` with `require_relative` for internal library files in `test/`. If you want to run tests against the installed `test-unit`, you can still use the `test/` directory like this: This example runs tests against the installed `test-unit` version 3.6.8. ```console $ ruby -I $(gem env home)/gems/test-unit-3.6.8/lib bin/test-unit test ```
GitHub: fix GH-311 This is a follow-up to GH-312 and the final patch to fix GH-311. This patch will reduce dependency on `$LOAD_PATH`. It replaces `require` with `require_relative` for internal library files in `test/`. If you want to run tests against the installed `test-unit`, you can still use the `test/` directory like this: This example runs tests against the installed `test-unit` version 3.6.8. ```console $ ruby -I $(gem env home)/gems/test-unit-3.6.8/lib bin/test-unit test ```
GitHub: GH-311
This patch will reduce dependency on
$LOAD_PATH.It replaces
requirewithrequire_relativefor internal libraryfiles. This change is applied only when the replacement can be done
statically and simply.
More advanced replacements are out of scope for this patch, such as:
autoloadtest/