This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2k
fix bug that causes "run rake false
" to appear in README.md
#3881
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a great patch, thanks! 😁 If you're interested in contributing more to Bundler in the future, drop me an email, and I'll invite you to the Bundler Slack! |
@homu r+ |
📌 Commit ed59ad7 has been approved by |
homu
added a commit
that referenced
this pull request
Jul 27, 2015
fix bug that causes "run `rake false`" to appear in README.md If `BUNDLE_GEM__TEST: false` or `BUNDLE_GEM__TEST: "false"` are in `~/.bundle/config`, the README.md that is generated when creating a new gem includes instructions under the Development heading that say "Then, run \`rake false\` to run the tests." The logic on line 29 of README.md.tt (`if config[:test]`) fails because `config[:test]` returns the string "false" instead of the boolean. As a patch, I changed the logic of `Bundler::Settings#[]` to convert the string "false" to a boolean. It seems that the root of the issue is that `Bundler::Settings::BOOL_KEYS` does not include "gem.test", and it can't because it is only sometimes a boolean (when it is not 'rspec' or 'minitest'). A future fix for this could be to have two separate options, a boolean for whether or not the gem has tests and another for the type of test framework.
💔 Test failed - status |
when !value.nil? && is_bool(name) | ||
when value.nil? | ||
nil | ||
when is_bool(name) || value == "false" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing whitespace here
bc94ea0 fixes the whitespace issue - should be ok now! |
@homu r+ |
📌 Commit bc94ea0 has been approved by |
homu
added a commit
that referenced
this pull request
Jul 27, 2015
fix bug that causes "run `rake false`" to appear in README.md If `BUNDLE_GEM__TEST: false` or `BUNDLE_GEM__TEST: "false"` are in `~/.bundle/config`, the README.md that is generated when creating a new gem includes instructions under the Development heading that say "Then, run \`rake false\` to run the tests." The logic on line 29 of README.md.tt (`if config[:test]`) fails because `config[:test]` returns the string "false" instead of the boolean. As a patch, I changed the logic of `Bundler::Settings#[]` to convert the string "false" to a boolean. It seems that the root of the issue is that `Bundler::Settings::BOOL_KEYS` does not include "gem.test", and it can't because it is only sometimes a boolean (when it is not 'rspec' or 'minitest'). A future fix for this could be to have two separate options, a boolean for whether or not the gem has tests and another for the type of test framework.
💔 Test failed - status |
@homu retry |
homu
added a commit
that referenced
this pull request
Jul 27, 2015
fix bug that causes "run `rake false`" to appear in README.md If `BUNDLE_GEM__TEST: false` or `BUNDLE_GEM__TEST: "false"` are in `~/.bundle/config`, the README.md that is generated when creating a new gem includes instructions under the Development heading that say "Then, run \`rake false\` to run the tests." The logic on line 29 of README.md.tt (`if config[:test]`) fails because `config[:test]` returns the string "false" instead of the boolean. As a patch, I changed the logic of `Bundler::Settings#[]` to convert the string "false" to a boolean. It seems that the root of the issue is that `Bundler::Settings::BOOL_KEYS` does not include "gem.test", and it can't because it is only sometimes a boolean (when it is not 'rspec' or 'minitest'). A future fix for this could be to have two separate options, a boolean for whether or not the gem has tests and another for the type of test framework.
💔 Test failed - status |
Okay, I'm tired of non-deterministic failures. Merging! Thanks again for the fix. |
indirect
added a commit
that referenced
this pull request
Jul 27, 2015
fix bug that causes "run `rake false`" to appear in README.md
Thanks for merging, happy to contribute! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If
BUNDLE_GEM__TEST: false
orBUNDLE_GEM__TEST: "false"
are in~/.bundle/config
, the README.md that is generated when creating a new gem includes instructions under the Development heading that say "Then, runrake false
to run the tests."The logic on line 29 of README.md.tt (
if config[:test]
) fails becauseconfig[:test]
returns the string "false" instead of the boolean.As a patch, I changed the logic of
Bundler::Settings#[]
to convert the string "false" to a boolean.It seems that the root of the issue is that
Bundler::Settings::BOOL_KEYS
does not include "gem.test", and it can't because it is only sometimes a boolean (when it is not 'rspec' or 'minitest'). A future fix for this could be to have two separate options, a boolean for whether or not the gem has tests and another for the type of test framework.