textmate_fcsh 0.4.3 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.3
1
+ 0.5.0
data/lib/fcsh/fcsh.rb CHANGED
@@ -86,7 +86,7 @@ class Fcsh
86
86
  end
87
87
 
88
88
  loop do
89
- if (!last_line_captured.nil? && Time.now - last_line_captured > 1)
89
+ if (!last_line_captured.nil? && Time.now - last_line_captured > 3)
90
90
  break
91
91
  end
92
92
  end
@@ -4,7 +4,7 @@ require File.join(File.dirname(__FILE__), 'mxmlc_error')
4
4
  # Formats the mxmlc to errors
5
5
  class MxmlcOutputReader
6
6
  attr_reader :errors
7
- ERROR_LINE = /^((\/([\w\.]+))+)(\((\d+)\))?:\s*(col: (\d+))?:?\s*(Error|Warning+): (.+)$/
7
+ ERROR_LINE = /^((\/([\w\.]+))+)(\((-?\d+)\))?:\s*(col: (\d+))?:?\s*(Error|Warning+): (.+)$/
8
8
 
9
9
  def initialize(output)
10
10
  @output = output
@@ -63,7 +63,24 @@ EOD
63
63
  error.level.should == "Error"
64
64
 
65
65
  error.column.should == "3"
66
-
66
+ end
67
+
68
+
69
+ it "should process negative line" do
70
+ out = <<EOD
71
+ /Users/japetheape/Projects/worldlogger/flash/src/com/worldlogger/air/view/GridTabView.mxml(-1): Error: Type was not found or was not a compile-time constant: CategoryAxis.
72
+
73
+ asd
74
+
75
+ EOD
76
+ reader = MxmlcOutputReader.new(out)
77
+ reader.errors.size.should be 1
78
+ error = reader.errors.first
79
+ error.line.should == "-1"
80
+ error.level.should == "Error"
81
+
82
+
83
+
67
84
 
68
85
  end
69
86
 
@@ -37,16 +37,34 @@
37
37
 
38
38
  <div class='container'>
39
39
 
40
+ <%
41
+ errors = []
42
+ warnings = []
43
+ @errors.each do |e|
44
+ errors << e if e.level == "Error"
45
+ warnings << e if e.level == "Warning"
46
+ end
47
+
48
+ %>
49
+
50
+
51
+
40
52
  <% if @errors.empty? %>
41
53
  <h1>No errors</h1>
42
54
  <% else %>
43
- <h1><%=@errors.select {|e| e.level == "Error" }.size %> errors, <%=@errors.select {|e| e.level == "Warning" }.size %> warnings </h1>
55
+ <h1><%=errors.size %> errors, <%=warnings.size %> warnings </h1>
44
56
  <table>
45
57
  <tr>
46
58
  <th class='level'>Level</th><th class='file'>File</th><th class='Notice'>Notice</th>
47
59
  </tr>
60
+ <% errors.each do |error| %>
61
+ <tr class="<%=error.level %>">
62
+ <td><%=error.level %></td><td><a href="txmt://open/?url=file://<%=error.filename %>&line=<%=error.line %>&column=<%=error.column %>"><%=error.filename %>:<%=error.line %></a></td><td><%=error.message %></td>
63
+ </tr>
64
+ <% end %>
65
+
48
66
 
49
- <% @errors.each do |error| %>
67
+ <% warnings.each do |error| %>
50
68
  <tr class="<%=error.level %>">
51
69
  <td><%=error.level %></td><td><a href="txmt://open/?url=file://<%=error.filename %>&line=<%=error.line %>&column=<%=error.column %>"><%=error.filename %>:<%=error.line %></a></td><td><%=error.message %></td>
52
70
  </tr>
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{textmate_fcsh}
8
- s.version = "0.4.3"
8
+ s.version = "0.5.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jaap van der Meer"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: textmate_fcsh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaap van der Meer