textmate_fcsh 0.4.3 → 0.5.0
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.
- data/VERSION +1 -1
- data/lib/fcsh/fcsh.rb +1 -1
- data/lib/mxmlc_output/mxmlc_output_reader.rb +1 -1
- data/spec/mxmlc_output_reader_spec.rb +18 -1
- data/templates/standard.html.erb +20 -2
- data/textmate_fcsh.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.5.0
|
data/lib/fcsh/fcsh.rb
CHANGED
@@ -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\.]+))+)(\((
|
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
|
|
data/templates/standard.html.erb
CHANGED
@@ -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
|
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
|
-
<%
|
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>
|
data/textmate_fcsh.gemspec
CHANGED