daff 1.1.16 → 1.1.19
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/daff.rb +24 -4
- data/lib/lib/coopy/alignment.rb +2 -1
- data/lib/lib/coopy/bag.rb +1 -0
- data/lib/lib/coopy/cell_builder.rb +17 -0
- data/lib/lib/coopy/cell_info.rb +1 -0
- data/lib/lib/coopy/change.rb +1 -0
- data/lib/lib/coopy/compare.rb +1 -0
- data/lib/lib/coopy/compare_flags.rb +28 -0
- data/lib/lib/coopy/compare_table.rb +29 -10
- data/lib/lib/coopy/coopy.rb +29 -15
- data/lib/lib/coopy/cross_match.rb +1 -0
- data/lib/lib/coopy/csv.rb +1 -0
- data/lib/lib/coopy/diff_render.rb +1 -0
- data/lib/lib/coopy/flat_cell_builder.rb +72 -0
- data/lib/lib/coopy/highlight_patch.rb +1 -0
- data/lib/lib/coopy/highlight_patch_unit.rb +1 -0
- data/lib/lib/coopy/index.rb +1 -0
- data/lib/lib/coopy/index_item.rb +1 -0
- data/lib/lib/coopy/index_pair.rb +1 -0
- data/lib/lib/coopy/merger.rb +1 -0
- data/lib/lib/coopy/mover.rb +1 -0
- data/lib/lib/coopy/ordering.rb +1 -0
- data/lib/lib/coopy/report.rb +1 -0
- data/lib/lib/coopy/row.rb +1 -0
- data/lib/lib/coopy/simple_cell.rb +1 -0
- data/lib/lib/coopy/simple_table.rb +5 -0
- data/lib/lib/coopy/simple_view.rb +3 -3
- data/lib/lib/coopy/sparse_sheet.rb +1 -0
- data/lib/lib/coopy/table.rb +2 -0
- data/lib/lib/coopy/table_comparison_state.rb +1 -0
- data/lib/lib/coopy/table_diff.rb +235 -172
- data/lib/lib/coopy/table_io.rb +1 -0
- data/lib/lib/coopy/table_modifier.rb +1 -0
- data/lib/lib/coopy/table_text.rb +1 -0
- data/lib/lib/coopy/terminal_diff_render.rb +1 -0
- data/lib/lib/coopy/unit.rb +1 -0
- data/lib/lib/coopy/view.rb +1 -0
- data/lib/lib/coopy/viewed_datum.rb +1 -0
- data/lib/lib/coopy/viterbi.rb +2 -1
- data/lib/lib/coopy/workspace.rb +1 -0
- data/lib/lib/haxe/ds/int_map.rb +1 -0
- data/lib/lib/haxe/ds/string_map.rb +1 -0
- data/lib/lib/haxe/format/json_parser.rb +1 -0
- data/lib/lib/haxe/format/json_printer.rb +1 -0
- data/lib/lib/haxe/imap.rb +1 -0
- data/lib/lib/haxe/io/bytes.rb +1 -0
- data/lib/lib/haxe/io/bytes_buffer.rb +1 -0
- data/lib/lib/haxe/io/bytes_input.rb +1 -0
- data/lib/lib/haxe/io/bytes_output.rb +1 -0
- data/lib/lib/haxe/io/eof.rb +1 -0
- data/lib/lib/haxe/io/input.rb +1 -0
- data/lib/lib/haxe/io/output.rb +1 -0
- data/lib/lib/hx_overrides.rb +1 -0
- data/lib/lib/hx_sys.rb +66 -0
- data/lib/lib/lambda.rb +1 -0
- data/lib/lib/list.rb +1 -0
- data/lib/lib/rb/boot.rb +2 -5
- data/lib/lib/rb/ruby_iterator.rb +1 -0
- data/lib/lib/reflect.rb +1 -0
- data/lib/lib/string_buf.rb +1 -0
- data/lib/lib/sys/io/file_output.rb +1 -0
- data/lib/lib/sys/io/hx_file.rb +20 -0
- data/lib/lib/type.rb +1 -0
- data/lib/lib/x_list/list_iterator.rb +32 -0
- metadata +7 -2
data/lib/lib/coopy/table_io.rb
CHANGED
data/lib/lib/coopy/table_text.rb
CHANGED
data/lib/lib/coopy/unit.rb
CHANGED
data/lib/lib/coopy/view.rb
CHANGED
data/lib/lib/coopy/viterbi.rb
CHANGED
@@ -124,7 +124,7 @@ module Coopy
|
|
124
124
|
_g11+=1
|
125
125
|
i = @index - 1 - j1
|
126
126
|
@path.set(0,i,bestj)
|
127
|
-
|
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
|
data/lib/lib/coopy/workspace.rb
CHANGED
data/lib/lib/haxe/ds/int_map.rb
CHANGED
data/lib/lib/haxe/imap.rb
CHANGED
data/lib/lib/haxe/io/bytes.rb
CHANGED
data/lib/lib/haxe/io/eof.rb
CHANGED
data/lib/lib/haxe/io/input.rb
CHANGED
data/lib/lib/haxe/io/output.rb
CHANGED
data/lib/lib/hx_overrides.rb
CHANGED
@@ -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
data/lib/lib/list.rb
CHANGED
data/lib/lib/rb/boot.rb
CHANGED
data/lib/lib/rb/ruby_iterator.rb
CHANGED
data/lib/lib/reflect.rb
CHANGED
data/lib/lib/string_buf.rb
CHANGED
@@ -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
@@ -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.
|
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-
|
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
|