textmate_fcsh 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/mxmlc_output/mxmlc_output_reader.rb +4 -2
- data/spec/fixtures/mxmlc_output.txt +5 -0
- data/spec/mxmlc_output_reader_spec.rb +28 -2
- data/textmate_fcsh.gemspec +2 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
@@ -4,6 +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+)\): (col: (\d+))? (\w+): (.+)$/
|
7
8
|
|
8
9
|
def initialize(output)
|
9
10
|
@output = output
|
@@ -15,9 +16,10 @@ class MxmlcOutputReader
|
|
15
16
|
# example: /Users/japetheape/Projects/tunedustry/editor/src/com/tunedustry/editor/view/Controls.as(43): col: 32 Warning: return value for function 'setPositions' has no type declaration.
|
16
17
|
def parse!
|
17
18
|
@output.each_line do |l|
|
18
|
-
matches =
|
19
|
+
matches = ERROR_LINE.match(l)
|
19
20
|
if !matches.nil?
|
20
|
-
|
21
|
+
|
22
|
+
@errors << MxmlcError.new(matches[1], matches[4], matches[5], matches[7], matches[8])
|
21
23
|
elsif !@errors.empty?
|
22
24
|
@errors.last.content << l
|
23
25
|
end
|
@@ -256,3 +256,8 @@
|
|
256
256
|
/Users/japetheape/Projects/tunedustry/editor/src/com/tunedustry/editor/view/MainView.mxml(40): Error: Access of undefined property fControls.
|
257
257
|
|
258
258
|
this.controlHolder.addChild(fControls);
|
259
|
+
|
260
|
+
/Users/japetheape/Projects/tunedustry/editor/src/editor.mxml(19): Error: Incorrect number of arguments. Expected no more than 0.
|
261
|
+
|
262
|
+
fMainController = new MainController(this.holder);
|
263
|
+
|
@@ -2,14 +2,40 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
|
2
2
|
|
3
3
|
describe "MxmlcOutputReader" do
|
4
4
|
before(:each) do
|
5
|
+
|
6
|
+
end
|
7
|
+
|
8
|
+
|
9
|
+
it "should contain errors" do
|
5
10
|
mxmlc_output_file = File.join(File.dirname(__FILE__), 'fixtures', 'mxmlc_output.txt')
|
6
11
|
@output = ''
|
7
12
|
File.open(mxmlc_output_file).each_line { |l| @output << l }
|
8
13
|
@mxmlc_output_reader = MxmlcOutputReader.new(@output)
|
14
|
+
@mxmlc_output_reader.errors.length.should be 52
|
9
15
|
end
|
16
|
+
|
17
|
+
|
18
|
+
it "should catch an error" do
|
19
|
+
out = "/Users/japetheape/Projects/tunedustry/editor/src/editor.mxml(19): Error: Incorrect number of arguments. Expected no more than 0."
|
20
|
+
MxmlcOutputReader::ERROR_LINE.match(out).should_not be nil
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
it "should also process this line" do
|
25
|
+
out = <<EOD
|
26
|
+
/Users/japetheape/Projects/tunedustry/editor/src/com/tunedustry/editor/view/MainView.mxml(45): Error: Access of undefined property fControls.
|
27
|
+
|
28
|
+
adsad
|
29
|
+
|
30
|
+
/Users/japetheape/Projects/tunedustry/editor/src/com/tunedustry/editor/controller/ProgressController.as(4): col: 49 Warning: Definition editor_core.com.tunedustry.general.model:SoundProject could not be found.
|
31
|
+
|
32
|
+
import editor_core.com.tunedustry.general.model.SoundProject;
|
33
|
+
EOD
|
10
34
|
|
35
|
+
reader = MxmlcOutputReader.new(out)
|
36
|
+
reader.errors.size.should be 2
|
37
|
+
reader.errors.first.level.should be == "Error"
|
38
|
+
reader.errors.last.level.should be == "Warning"
|
11
39
|
|
12
|
-
it "should contain errors" do
|
13
|
-
@mxmlc_output_reader.errors.length.should be 51
|
14
40
|
end
|
15
41
|
end
|
data/textmate_fcsh.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{textmate_fcsh}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.1"
|
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"]
|
12
|
-
s.date = %q{2010-03-
|
12
|
+
s.date = %q{2010-03-03}
|
13
13
|
s.default_executable = %q{textmate_fcsh}
|
14
14
|
s.description = %q{Compile Flex in Textmate using FCSH. Advanced error reporting.}
|
15
15
|
s.email = %q{jaapvandermeer@gmail.com}
|
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.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jaap van der Meer
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-03-
|
12
|
+
date: 2010-03-03 00:00:00 +01:00
|
13
13
|
default_executable: textmate_fcsh
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|