daff 1.1.16 → 1.1.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. data/lib/daff.rb +24 -4
  2. data/lib/lib/coopy/alignment.rb +2 -1
  3. data/lib/lib/coopy/bag.rb +1 -0
  4. data/lib/lib/coopy/cell_builder.rb +17 -0
  5. data/lib/lib/coopy/cell_info.rb +1 -0
  6. data/lib/lib/coopy/change.rb +1 -0
  7. data/lib/lib/coopy/compare.rb +1 -0
  8. data/lib/lib/coopy/compare_flags.rb +28 -0
  9. data/lib/lib/coopy/compare_table.rb +29 -10
  10. data/lib/lib/coopy/coopy.rb +29 -15
  11. data/lib/lib/coopy/cross_match.rb +1 -0
  12. data/lib/lib/coopy/csv.rb +1 -0
  13. data/lib/lib/coopy/diff_render.rb +1 -0
  14. data/lib/lib/coopy/flat_cell_builder.rb +72 -0
  15. data/lib/lib/coopy/highlight_patch.rb +1 -0
  16. data/lib/lib/coopy/highlight_patch_unit.rb +1 -0
  17. data/lib/lib/coopy/index.rb +1 -0
  18. data/lib/lib/coopy/index_item.rb +1 -0
  19. data/lib/lib/coopy/index_pair.rb +1 -0
  20. data/lib/lib/coopy/merger.rb +1 -0
  21. data/lib/lib/coopy/mover.rb +1 -0
  22. data/lib/lib/coopy/ordering.rb +1 -0
  23. data/lib/lib/coopy/report.rb +1 -0
  24. data/lib/lib/coopy/row.rb +1 -0
  25. data/lib/lib/coopy/simple_cell.rb +1 -0
  26. data/lib/lib/coopy/simple_table.rb +5 -0
  27. data/lib/lib/coopy/simple_view.rb +3 -3
  28. data/lib/lib/coopy/sparse_sheet.rb +1 -0
  29. data/lib/lib/coopy/table.rb +2 -0
  30. data/lib/lib/coopy/table_comparison_state.rb +1 -0
  31. data/lib/lib/coopy/table_diff.rb +235 -172
  32. data/lib/lib/coopy/table_io.rb +1 -0
  33. data/lib/lib/coopy/table_modifier.rb +1 -0
  34. data/lib/lib/coopy/table_text.rb +1 -0
  35. data/lib/lib/coopy/terminal_diff_render.rb +1 -0
  36. data/lib/lib/coopy/unit.rb +1 -0
  37. data/lib/lib/coopy/view.rb +1 -0
  38. data/lib/lib/coopy/viewed_datum.rb +1 -0
  39. data/lib/lib/coopy/viterbi.rb +2 -1
  40. data/lib/lib/coopy/workspace.rb +1 -0
  41. data/lib/lib/haxe/ds/int_map.rb +1 -0
  42. data/lib/lib/haxe/ds/string_map.rb +1 -0
  43. data/lib/lib/haxe/format/json_parser.rb +1 -0
  44. data/lib/lib/haxe/format/json_printer.rb +1 -0
  45. data/lib/lib/haxe/imap.rb +1 -0
  46. data/lib/lib/haxe/io/bytes.rb +1 -0
  47. data/lib/lib/haxe/io/bytes_buffer.rb +1 -0
  48. data/lib/lib/haxe/io/bytes_input.rb +1 -0
  49. data/lib/lib/haxe/io/bytes_output.rb +1 -0
  50. data/lib/lib/haxe/io/eof.rb +1 -0
  51. data/lib/lib/haxe/io/input.rb +1 -0
  52. data/lib/lib/haxe/io/output.rb +1 -0
  53. data/lib/lib/hx_overrides.rb +1 -0
  54. data/lib/lib/hx_sys.rb +66 -0
  55. data/lib/lib/lambda.rb +1 -0
  56. data/lib/lib/list.rb +1 -0
  57. data/lib/lib/rb/boot.rb +2 -5
  58. data/lib/lib/rb/ruby_iterator.rb +1 -0
  59. data/lib/lib/reflect.rb +1 -0
  60. data/lib/lib/string_buf.rb +1 -0
  61. data/lib/lib/sys/io/file_output.rb +1 -0
  62. data/lib/lib/sys/io/hx_file.rb +20 -0
  63. data/lib/lib/type.rb +1 -0
  64. data/lib/lib/x_list/list_iterator.rb +32 -0
  65. metadata +7 -2
@@ -44,6 +44,7 @@ module Coopy
44
44
  return File.exist?(path)
45
45
  end
46
46
 
47
+ haxe_me
47
48
  end
48
49
 
49
50
  end
@@ -34,6 +34,7 @@ module Coopy
34
34
  return @t.insert_or_delete_columns(fate,@t.get_width - 1)
35
35
  end
36
36
 
37
+ haxe_me
37
38
  end
38
39
 
39
40
  end
@@ -20,6 +20,7 @@ module Coopy
20
20
  return @view.to_s(@rows.get_cell(x,y))
21
21
  end
22
22
 
23
+ haxe_me
23
24
  end
24
25
 
25
26
  end
@@ -62,6 +62,7 @@ module Coopy
62
62
  return txt
63
63
  end
64
64
 
65
+ haxe_me
65
66
  end
66
67
 
67
68
  end
@@ -65,6 +65,7 @@ module Coopy
65
65
  end
66
66
  end
67
67
 
68
+ haxe_me
68
69
  end
69
70
 
70
71
  end
@@ -9,6 +9,7 @@ module Coopy
9
9
  def hasStructure(d) puts "Abstract View.hasStructure called" end
10
10
  def equals(d1,d2) puts "Abstract View.equals called" end
11
11
  def toDatum(str) puts "Abstract View.toDatum called" end
12
+ haxe_me
12
13
  end
13
14
 
14
15
  end
@@ -32,6 +32,7 @@ module Coopy
32
32
  return ::Coopy::ViewedDatum.new(datum,::Coopy::SimpleView.new)
33
33
  end
34
34
 
35
+ haxe_me
35
36
  end
36
37
 
37
38
  end
@@ -124,7 +124,7 @@ module Coopy
124
124
  _g11+=1
125
125
  i = @index - 1 - j1
126
126
  @path.set(0,i,bestj)
127
- ::Haxe::Log._trace.call("Problem in Viterbi",{ file_name: "Viterbi.hx", line_number: 119, class_name: "coopy.Viterbi", method_name: "calculatePath"}) if !(bestj != -1 && (bestj >= 0 && bestj < @k))
127
+ puts "Problem in Viterbi" if !(bestj != -1 && (bestj >= 0 && bestj < @k))
128
128
  bestj = @src.get(bestj,i)
129
129
  end
130
130
  end
@@ -167,6 +167,7 @@ module Coopy
167
167
  return @best_cost
168
168
  end
169
169
 
170
+ haxe_me
170
171
  end
171
172
 
172
173
  end
@@ -17,6 +17,7 @@ module Coopy
17
17
  attr_accessor :p2l
18
18
  attr_accessor :p2r
19
19
  attr_accessor :l2r
20
+ haxe_me
20
21
  end
21
22
 
22
23
  end
@@ -8,6 +8,7 @@ module Ds
8
8
  def initialize
9
9
  end
10
10
 
11
+ haxe_me
11
12
  end
12
13
 
13
14
  end
@@ -8,6 +8,7 @@ module Ds
8
8
  def initialize
9
9
  end
10
10
 
11
+ haxe_me
11
12
  end
12
13
 
13
14
  end
@@ -258,6 +258,7 @@ module Format
258
258
  raise "Invalid number at position " + _hx_str(start) + ": " + _hx_str(@str[start,@pos - start])
259
259
  end
260
260
 
261
+ haxe_me
261
262
  end
262
263
 
263
264
  end
@@ -233,6 +233,7 @@ module Format
233
233
  return printer.buf.b
234
234
  end
235
235
 
236
+ haxe_me
236
237
  end
237
238
 
238
239
  end
data/lib/lib/haxe/imap.rb CHANGED
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Haxe
5
5
  class IMap
6
+ haxe_me
6
7
  end
7
8
 
8
9
  end
@@ -27,6 +27,7 @@ module Io
27
27
  return ::Haxe::Io::Bytes.new(s.bytesize,s)
28
28
  end
29
29
 
30
+ haxe_me
30
31
  end
31
32
 
32
33
  end
@@ -12,6 +12,7 @@ module Io
12
12
  public
13
13
 
14
14
  attr_accessor :length
15
+ haxe_me
15
16
  end
16
17
 
17
18
  end
@@ -6,6 +6,7 @@ module Io
6
6
  class BytesInput < ::Haxe::Io::Input
7
7
  attr_accessor :position
8
8
  attr_accessor :length
9
+ haxe_me
9
10
  end
10
11
 
11
12
  end
@@ -26,6 +26,7 @@ module Io
26
26
  return len
27
27
  end
28
28
 
29
+ haxe_me
29
30
  end
30
31
 
31
32
  end
@@ -11,6 +11,7 @@ module Io
11
11
  return "Eof"
12
12
  end
13
13
 
14
+ haxe_me
14
15
  end
15
16
 
16
17
  end
@@ -4,6 +4,7 @@
4
4
  module Haxe
5
5
  module Io
6
6
  class Input
7
+ haxe_me
7
8
  end
8
9
 
9
10
  end
@@ -34,6 +34,7 @@ module Io
34
34
  self.write_full_bytes(b,0,b.length)
35
35
  end
36
36
 
37
+ haxe_me
37
38
  end
38
39
 
39
40
  end
@@ -14,5 +14,6 @@
14
14
  return _hx_str(date.get_full_year) + "-" + _hx_str((((m < 10) ? "0" + _hx_str(m) : "" + _hx_str(m)))) + "-" + _hx_str((((d < 10) ? "0" + _hx_str(d) : "" + _hx_str(d)))) + " " + _hx_str((((h < 10) ? "0" + _hx_str(h) : "" + _hx_str(h)))) + ":" + _hx_str((((mi < 10) ? "0" + _hx_str(mi) : "" + _hx_str(mi)))) + ":" + _hx_str((((s < 10) ? "0" + _hx_str(s) : "" + _hx_str(s))))
15
15
  end
16
16
 
17
+ haxe_me
17
18
  end
18
19
 
data/lib/lib/hx_sys.rb ADDED
@@ -0,0 +1,66 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: utf-8
3
+
4
+ class HxSys
5
+
6
+ def HxSys.args
7
+ return ARGV
8
+ end
9
+
10
+ # protected - in ruby this doesn't play well with static/inline methods
11
+
12
+ def HxSys.escape_argument(arg)
13
+ ok = true
14
+ begin
15
+ _g1 = 0
16
+ _g = arg.length
17
+ while(_g1 < _g)
18
+ i = _g1
19
+ _g1+=1
20
+ _g2 = (arg[i].ord rescue nil)
21
+ case(_g2)
22
+ when 32,34
23
+ ok = false
24
+ when 0,13,10
25
+ arg = arg[0,i]
26
+ end if _g2 != nil
27
+ end
28
+ end
29
+ return arg if ok
30
+ return "\"" + _hx_str(arg.split("\"").join("\\\"")) + "\""
31
+ end
32
+
33
+ public
34
+
35
+ def HxSys.command(cmd,args = nil)
36
+ if args != nil
37
+ cmd = HxSys.escape_argument(cmd)
38
+ begin
39
+ _g = 0
40
+ while(_g < args.length)
41
+ a = args[_g]
42
+ _g+=1
43
+ cmd += " " + _hx_str(HxSys.escape_argument(a))
44
+ end
45
+ end
46
+ end
47
+ result = nil
48
+ if system(cmd)
49
+ result = 0
50
+ else
51
+ result = 1
52
+ end
53
+ return result
54
+ end
55
+
56
+ def HxSys.stdout
57
+ return ::Sys::Io::FileOutput.new(STDOUT)
58
+ end
59
+
60
+ def HxSys.stderr
61
+ return ::Sys::Io::FileOutput.new(STDERR)
62
+ end
63
+
64
+ haxe_me
65
+ end
66
+
data/lib/lib/lambda.rb CHANGED
@@ -32,5 +32,6 @@
32
32
  return false
33
33
  end
34
34
 
35
+ haxe_me
35
36
  end
36
37
 
data/lib/lib/list.rb CHANGED
@@ -31,5 +31,6 @@
31
31
  return ::X_List::ListIterator.new(@h)
32
32
  end
33
33
 
34
+ haxe_me
34
35
  end
35
36
 
data/lib/lib/rb/boot.rb CHANGED
@@ -7,13 +7,10 @@ module Rb
7
7
  # protected - in ruby this doesn't play well with static/inline methods
8
8
 
9
9
  def Boot.__trace(v,i)
10
- if i != nil
11
- puts "#{v} #{i.inspect}"
12
- else
13
- puts v
14
- end
10
+ puts(v)
15
11
  end
16
12
 
13
+ haxe_me
17
14
  end
18
15
 
19
16
  end
@@ -44,6 +44,7 @@ module Rb
44
44
  return @ref.next
45
45
  end
46
46
 
47
+ haxe_me
47
48
  end
48
49
 
49
50
  end
data/lib/lib/reflect.rb CHANGED
@@ -25,5 +25,6 @@
25
25
  return f.respond_to?("call")
26
26
  end
27
27
 
28
+ haxe_me
28
29
  end
29
30
 
@@ -14,5 +14,6 @@
14
14
  public
15
15
 
16
16
  attr_accessor :length
17
+ haxe_me
17
18
  end
18
19
 
@@ -29,6 +29,7 @@ module Io
29
29
  return r
30
30
  end
31
31
 
32
+ haxe_me
32
33
  end
33
34
 
34
35
  end
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: utf-8
3
+
4
+ module Sys
5
+ module Io
6
+ class HxFile
7
+
8
+ def HxFile.get_content(path)
9
+ return IO.read(path)
10
+ end
11
+
12
+ def HxFile.save_content(path,content)
13
+ IO.write(path,content)
14
+ end
15
+
16
+ haxe_me
17
+ end
18
+
19
+ end
20
+ end
data/lib/lib/type.rb CHANGED
@@ -28,5 +28,6 @@
28
28
  end
29
29
  end
30
30
 
31
+ haxe_me
31
32
  end
32
33
 
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: utf-8
3
+
4
+ module X_List
5
+ class ListIterator
6
+
7
+ def initialize(head)
8
+ @head = head
9
+ @val = nil
10
+ end
11
+
12
+ # protected - in ruby this doesn't play well with static/inline methods
13
+
14
+ attr_accessor :head
15
+ attr_accessor :val
16
+
17
+ public
18
+
19
+ def has_next
20
+ return @head != nil
21
+ end
22
+
23
+ def _next
24
+ @val = @head[0]
25
+ @head = @head[1]
26
+ return @val
27
+ end
28
+
29
+ haxe_me
30
+ end
31
+
32
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daff
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.16
4
+ version: 1.1.19
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-10-15 00:00:00.000000000 Z
13
+ date: 2014-10-24 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: Diff and patch tables
16
16
  email:
@@ -23,6 +23,7 @@ extra_rdoc_files: []
23
23
  files:
24
24
  - lib/daff.rb
25
25
  - lib/lib/type.rb
26
+ - lib/lib/hx_sys.rb
26
27
  - lib/lib/lambda.rb
27
28
  - lib/lib/reflect.rb
28
29
  - lib/lib/rb/boot.rb
@@ -30,9 +31,11 @@ files:
30
31
  - lib/lib/value_type.rb
31
32
  - lib/lib/hx_overrides.rb
32
33
  - lib/lib/coopy/simple_table.rb
34
+ - lib/lib/coopy/cell_builder.rb
33
35
  - lib/lib/coopy/workspace.rb
34
36
  - lib/lib/coopy/compare_table.rb
35
37
  - lib/lib/coopy/table_io.rb
38
+ - lib/lib/coopy/flat_cell_builder.rb
36
39
  - lib/lib/coopy/compare.rb
37
40
  - lib/lib/coopy/index_item.rb
38
41
  - lib/lib/coopy/simple_cell.rb
@@ -68,10 +71,12 @@ files:
68
71
  - lib/lib/coopy/table.rb
69
72
  - lib/lib/coopy/viterbi.rb
70
73
  - lib/lib/list.rb
74
+ - lib/lib/sys/io/hx_file.rb
71
75
  - lib/lib/sys/io/file_output.rb
72
76
  - lib/lib/sys/io/file.rb
73
77
  - lib/lib/sys/io/file_handle.rb
74
78
  - lib/lib/_list/list_iterator.rb
79
+ - lib/lib/x_list/list_iterator.rb
75
80
  - lib/lib/string_buf.rb
76
81
  - lib/lib/haxe/imap.rb
77
82
  - lib/lib/haxe/io/bytes_buffer.rb