textmate_fcsh 0.4.1 → 0.4.2

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 CHANGED
@@ -1 +1 @@
1
- 0.4.1
1
+ 0.4.2
data/lib/fcsh/fcsh.rb CHANGED
@@ -71,6 +71,7 @@ class Fcsh
71
71
  started = Time.now
72
72
  a = Thread.new do
73
73
  @stderr.each_line do |line|
74
+ puts line.inspect
74
75
  first_line_captured = Time.now if first_line_captured.nil?
75
76
  @error_output_last_run << line
76
77
  end
@@ -6,7 +6,7 @@ class MxmlcError
6
6
 
7
7
 
8
8
 
9
- def initialize(filename, line, col, level, message)
9
+ def initialize(filename, line, column, level, message)
10
10
  @filename = filename
11
11
  @line = line
12
12
  @column = column
@@ -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+)\): (col: (\d+))? (\w+): (.+)$/
7
+ ERROR_LINE = /^((\/([\w\.]+))+)(\((\d+)\))?:\s*(col: (\d+))?\s*(\w+): (.+)$/
8
8
 
9
9
  def initialize(output)
10
10
  @output = output
@@ -18,8 +18,7 @@ class MxmlcOutputReader
18
18
  @output.each_line do |l|
19
19
  matches = ERROR_LINE.match(l)
20
20
  if !matches.nil?
21
-
22
- @errors << MxmlcError.new(matches[1], matches[4], matches[5], matches[7], matches[8])
21
+ @errors << MxmlcError.new(matches[1], matches[5], matches[7], matches[8], matches[9])
23
22
  elsif !@errors.empty?
24
23
  @errors.last.content << l
25
24
  end
@@ -36,6 +36,17 @@ EOD
36
36
  reader.errors.size.should be 2
37
37
  reader.errors.first.level.should be == "Error"
38
38
  reader.errors.last.level.should be == "Warning"
39
+ reader.errors.first.line.should be == "45"
40
+ reader.errors.last.column.should be == "49"
41
+ end
42
+
43
+ it "should process mxmlc error" do
44
+ out = <<EOD
45
+ /Users/japetheape/Projects/tunedustry/editornew/src/TunedustryEditor.mxml: Error: Could not resolve <tunedustry:TunedustryContext> to a component implementation.
39
46
 
47
+ EOD
48
+ reader = MxmlcOutputReader.new(out)
49
+ reader.errors.size.should be 1
40
50
  end
51
+
41
52
  end
@@ -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.1"
8
+ s.version = "0.4.2"
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-03}
12
+ s.date = %q{2010-03-04}
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.1
4
+ version: 0.4.2
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-03 00:00:00 +01:00
12
+ date: 2010-03-04 00:00:00 +01:00
13
13
  default_executable: textmate_fcsh
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency