better_errors 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of better_errors might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f7d7bc114aeb551e440f8da17f54695d2e577c0
4
- data.tar.gz: 98a63563c768d1dc39cfde6b480f08ef57a4d8ba
3
+ metadata.gz: 5ae01bfc76b45f6af1df26c7268229088f8de251
4
+ data.tar.gz: f95f617f84e01f1641bf193d735d45d85360b768
5
5
  SHA512:
6
- metadata.gz: 39f582d75f4f5036509eba3c3c97b99f6ee7f695ff3c6913a860ad3d20fb6e22be3d79cc27daa9cb1328b597c83e40c08ffc608497f3213ac738fc56b11670f2
7
- data.tar.gz: ba38267fddb50b97ff7fb9ddb27489d03526521d0a479859fe90c6095cc03f37d9f103110879650c76efe9ea1de1f9a1726aadf1ce4ed6e567b9b9317ecf963b
6
+ metadata.gz: 4881b5a147d85c9c7ed116a8838e45745bd95958df71dea8934e0b5601fd32cde2a016bbc419a855f9e29dd8e6bab322fcae8d676a78ede120d134809dac29b7
7
+ data.tar.gz: 6fb75468216fc264250e8f6726d47689025352441701cb83b2c125b541ac389c491da6ba8b3eeded2759b99be47f5c0cd103b54315122d7a33905261d02d4cca
@@ -1,4 +1,6 @@
1
+ sudo: false
1
2
  language: ruby
3
+ cache: bundler
2
4
  rvm:
3
5
  - 2.1.0
4
6
  - 2.0.0
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 Charlie Somerville
1
+ Copyright (c) 2012-2015 Charlie Somerville
2
2
 
3
3
  MIT License
4
4
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module BetterErrors
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  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.0
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: 2014-12-23 00:00:00.000000000 Z
11
+ date: 2015-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: erubis