-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a placeholder version of the gem to warn against the unbounded…
… Rubocop dependency of <=0.0.36 This defines a v0.0.36.1 which we will tag and publish so that when future users add `standard` to a Gemfile that resolves a newer version of rubocop (directly or indirectly), it will at least warn them at postinstall and on each CLI invocation of what's going on. Decided to exit instead of run the CLI, because it's easy to lose the message in all the warnings that will be printed by the (way too new) version of RuboCop that will likely be loaded by the configuration builder
- Loading branch information
Showing
6 changed files
with
76 additions
and
26 deletions.
There are no files selected for viewing
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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
module Standard | ||
class PrintsBigHairyVersionWarning | ||
WARNING = <<~MSG.gsub(/^ {6}/, "") | ||
============================================================================ | ||
= WARNING: You do not want to run this very, very old version of Standard! = | ||
============================================================================ | ||
What's going on here? | ||
--------------------- | ||
Versions of Standard prior to 0.0.37 depended on `>= 0.63' of RuboCop, which | ||
means that Bundler continues to resolve to those (now ancient) versions | ||
whenever `gem "standard"' is added to a Gemfile that has already locked | ||
to a newer version of RuboCop than standard currently depends on. | ||
"How do I fix this?", you might be asking. | ||
How to fix this | ||
--------------- | ||
If you add a version specifier pinning `standard' to a version newer | ||
than 0.0.36.1, Bundler will resolve appropriate versions of `standard', | ||
`rubocop', and any other rubocop-dependent gems you may have installed. | ||
1. Update your Gemfile to pin standard to be at least one such version: | ||
gem "standard", ">= 1.0" | ||
2. Run `bundle`, which will install and lock more appropriate versions | ||
Example output: | ||
Using rubocop 1.48.1 (was 1.49.0) | ||
Using rubocop-performance 1.16.0 | ||
Using standard 1.26.0 (was 0.0.36) | ||
This version (0.0.36.1) is an inoperative placeholder gem that exists | ||
solely to print this message. | ||
We're very sorry for this inconvenience! | ||
============================================================================ | ||
= END OF BIG SCARY WARNING = | ||
============================================================================ | ||
MSG | ||
|
||
def call | ||
warn WARNING | ||
end | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module Standard | ||
VERSION = Gem::Version.new("0.0.36") | ||
VERSION = Gem::Version.new("0.0.36.1") | ||
end |
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