better_errors 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of better_errors might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/LICENSE.txt +1 -1
- data/lib/better_errors/raised_exception.rb +1 -1
- data/lib/better_errors/version.rb +1 -1
- data/spec/better_errors/raised_exception_spec.rb +20 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ae01bfc76b45f6af1df26c7268229088f8de251
|
4
|
+
data.tar.gz: f95f617f84e01f1641bf193d735d45d85360b768
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4881b5a147d85c9c7ed116a8838e45745bd95958df71dea8934e0b5601fd32cde2a016bbc419a855f9e29dd8e6bab322fcae8d676a78ede120d134809dac29b7
|
7
|
+
data.tar.gz: 6fb75468216fc264250e8f6726d47689025352441701cb83b2c125b541ac389c491da6ba8b3eeded2759b99be47f5c0cd103b54315122d7a33905261d02d4cca
|
data/.travis.yml
CHANGED
data/LICENSE.txt
CHANGED
@@ -51,7 +51,7 @@ module BetterErrors
|
|
51
51
|
|
52
52
|
def massage_syntax_error
|
53
53
|
case exception.class.to_s
|
54
|
-
when "Haml::SyntaxError"
|
54
|
+
when "Haml::SyntaxError", "Sprockets::Coffeelint::Error"
|
55
55
|
if /\A(.+?):(\d+)/ =~ exception.backtrace.first
|
56
56
|
backtrace.unshift(StackFrame.new($1, $2.to_i, ""))
|
57
57
|
end
|
@@ -48,5 +48,25 @@ module BetterErrors
|
|
48
48
|
subject.backtrace.first.line.should == 123
|
49
49
|
end
|
50
50
|
end
|
51
|
+
|
52
|
+
context "when the exception is a Coffeelint syntax error" do
|
53
|
+
before do
|
54
|
+
stub_const("Sprockets::Coffeelint::Error", Class.new(SyntaxError))
|
55
|
+
end
|
56
|
+
|
57
|
+
let(:exception) {
|
58
|
+
Sprockets::Coffeelint::Error.new("[stdin]:11:88: error: unexpected=").tap do |ex|
|
59
|
+
ex.set_backtrace(["app/assets/javascripts/files/index.coffee:11", "sprockets/coffeelint.rb:3"])
|
60
|
+
end
|
61
|
+
}
|
62
|
+
|
63
|
+
its(:message) { should == "[stdin]:11:88: error: unexpected=" }
|
64
|
+
its(:type) { should == Sprockets::Coffeelint::Error }
|
65
|
+
|
66
|
+
it "has the right filename and line number in the backtrace" do
|
67
|
+
subject.backtrace.first.filename.should == "app/assets/javascripts/files/index.coffee"
|
68
|
+
subject.backtrace.first.line.should == 11
|
69
|
+
end
|
70
|
+
end
|
51
71
|
end
|
52
72
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: better_errors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charlie Somerville
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: erubis
|