-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clearer deprecation message on error
- Loading branch information
1 parent
9b3593e
commit 3e5d56c
Showing
6 changed files
with
24 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
warning_signs (0.6.0) | ||
warning_signs (0.6.1) | ||
awesome_print | ||
railties (<= 7.1.0) | ||
|
||
|
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,9 @@ | ||
module WarningSigns | ||
class UnhandledDeprecationError < StandardError | ||
MESSAGE = "This error was raised by the Warning Signs gem in response to a deprecation warning in Ruby or Rails. If this warning is not causing problems, you can add it to the exceptions list in .warning_signs.yml." | ||
|
||
def message | ||
super + "\n\n" + MESSAGE | ||
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 WarningSigns | ||
VERSION = "0.6.0" | ||
VERSION = "0.6.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module WarningSigns | ||
RSpec.describe UnhandledDeprecationError do | ||
it "handles warnings" do | ||
exe = UnhandledDeprecationError.new("Feature x is going away") | ||
expect(exe.message.ends_with?("exceptions list in .warning_signs.yml.")).to be_truthy | ||
end | ||
end | ||
end |