rbbt-util 5.17.46 → 5.17.47
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/tsv/attach.rb +8 -8
- data/lib/rbbt/util/misc/pipes.rb +1 -1
- data/share/rbbt_commands/app/template +2 -1
- data/share/rbbt_commands/tsv/sort +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a424c1af41a6ea47d6c9a0e450c2ed759840eb85
|
4
|
+
data.tar.gz: 9ef4162cc1a9676fc7854f59b31b49e6e9c5a57d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f04c5460e1ce49c6c08e5f913a8739273b9cb6299b35821eddec73dee42c271d71d312f8bf346370dfd02a1e678645c6bd10efc356abe6849f9778781552af83
|
7
|
+
data.tar.gz: d080de01ac9d7f0eab395189a83cbd824e844665dcb9bb15e97856dbdf5d0e30b96135277d3ab5220115ec3730a04acb60d934c89b4625c75c0d3b026172973b
|
data/lib/rbbt/tsv/attach.rb
CHANGED
@@ -10,9 +10,9 @@ module TSV
|
|
10
10
|
|
11
11
|
is = case
|
12
12
|
when (String === input and not input.index("\n") and input.length < 250 and File.exists?(input))
|
13
|
-
CMD.cmd("sort -k1,1 -t'#{sep}' #{ input } | grep -v '^#{sep}' ", :pipe => true)
|
13
|
+
CMD.cmd("env LC_ALL=C sort -k1,1 -t'#{sep}' #{ input } | grep -v '^#{sep}' ", :pipe => true)
|
14
14
|
when (String === input or StringIO === input)
|
15
|
-
CMD.cmd("sort -k1,1 -t'#{sep}' | grep -v '^#{sep}'", :in => input, :pipe => true)
|
15
|
+
CMD.cmd("env LC_ALL=C sort -k1,1 -t'#{sep}' | grep -v '^#{sep}'", :in => input, :pipe => true)
|
16
16
|
else
|
17
17
|
input
|
18
18
|
end
|
@@ -70,22 +70,22 @@ module TSV
|
|
70
70
|
case
|
71
71
|
when (String === file1 and not file1 =~ /\n/ and file1.length < 250 and File.exists?(file1))
|
72
72
|
size = CMD.cmd("wc -c '#{file1}'").read.to_f if monitor
|
73
|
-
file1 = CMD.cmd("sort -k1,1 -t'#{sep}' #{ file1 } | grep -v '^#{sep}' ", :pipe => true)
|
73
|
+
file1 = CMD.cmd("env LC_ALL=C sort -k1,1 -t'#{sep}' #{ file1 } | grep -v '^#{sep}' ", :pipe => true)
|
74
74
|
when (String === file1 or StringIO === file1)
|
75
75
|
size = file1.length if monitor
|
76
|
-
file1 = CMD.cmd("sort -k1,1 -t'#{sep}' | grep -v '^#{sep}'", :in => file1, :pipe => true)
|
76
|
+
file1 = CMD.cmd("env LC_ALL=C sort -k1,1 -t'#{sep}' | grep -v '^#{sep}'", :in => file1, :pipe => true)
|
77
77
|
when TSV === file1
|
78
78
|
size = file1.size if monitor
|
79
|
-
file1 = CMD.cmd("sort -k1,1 -t'#{sep}' | grep -v '^#{sep}'", :in => file1.to_s(:sort, true), :pipe => true)
|
79
|
+
file1 = CMD.cmd("env LC_ALL=C sort -k1,1 -t'#{sep}' | grep -v '^#{sep}'", :in => file1.to_s(:sort, true), :pipe => true)
|
80
80
|
end
|
81
81
|
|
82
82
|
case
|
83
83
|
when (String === file2 and not file2 =~ /\n/ and file2.length < 250 and File.exists?(file2))
|
84
|
-
file2 = CMD.cmd("sort -k1,1 -t'#{sep}' #{ file2 } | grep -v '^#{sep}' ", :pipe => true)
|
84
|
+
file2 = CMD.cmd("env LC_ALL=C sort -k1,1 -t'#{sep}' #{ file2 } | grep -v '^#{sep}' ", :pipe => true)
|
85
85
|
when (String === file2 or StringIO === file2)
|
86
|
-
file2 = CMD.cmd("sort -k1,1 -t'#{sep}' | grep -v '^#{sep}'", :in => file2, :pipe => true)
|
86
|
+
file2 = CMD.cmd("env LC_ALL=C sort -k1,1 -t'#{sep}' | grep -v '^#{sep}'", :in => file2, :pipe => true)
|
87
87
|
when TSV === file2
|
88
|
-
file2 = CMD.cmd("sort -k1,1 -t'#{sep}' | grep -v '^#{sep}'", :in => file2.to_s(:sort, true), :pipe => true)
|
88
|
+
file2 = CMD.cmd("env LC_ALL=C sort -k1,1 -t'#{sep}' | grep -v '^#{sep}'", :in => file2.to_s(:sort, true), :pipe => true)
|
89
89
|
end
|
90
90
|
|
91
91
|
begin
|
data/lib/rbbt/util/misc/pipes.rb
CHANGED
@@ -322,7 +322,7 @@ module Misc
|
|
322
322
|
end
|
323
323
|
end
|
324
324
|
|
325
|
-
sorted = CMD.cmd("sort #{cmd_args || ""}", :in => line_stream, :pipe => true)
|
325
|
+
sorted = CMD.cmd("env LC_ALL=C sort #{cmd_args || ""}", :in => line_stream, :pipe => true)
|
326
326
|
|
327
327
|
while block = sorted.read(2048)
|
328
328
|
sin.write block
|
@@ -13,10 +13,11 @@ require 'rbbt/rest/knowledge_base'
|
|
13
13
|
require 'rbbt/rest/helpers'
|
14
14
|
require 'rbbt/rest/web_tool'
|
15
15
|
|
16
|
-
options = SOPT.get "-e--environment*:-p--port*:-s--server*:-b--bind*:-e--environment*:-R--RServe_session*:--finder:--views*"
|
16
|
+
options = SOPT.get "-e--environment*:-p--port*:-s--server*:-b--bind*:-e--environment*:-R--RServe_session*:--finder:--views*:-w--workflows*"
|
17
17
|
|
18
18
|
template = ARGV.first
|
19
19
|
|
20
|
+
template = File.expand_path(template)
|
20
21
|
template = template.sub('.haml','')
|
21
22
|
|
22
23
|
ENV["RBBT_FINDER"] = "true" if options.include?(:finder)
|
@@ -24,11 +24,11 @@ file = ARGV.shift
|
|
24
24
|
file = STDIN if file == '-' or file.nil?
|
25
25
|
|
26
26
|
|
27
|
-
field = options[:field]
|
27
|
+
field = options[:field] || '2'
|
28
28
|
if field =~ /^\d+$/
|
29
29
|
field_pos = field.to_i
|
30
30
|
else
|
31
|
-
field_pos = TSV.parse_header(file).all_fields.index(field) + 1
|
31
|
+
field_pos = TSV.parse_header(file, options).all_fields.index(field) + 1
|
32
32
|
end
|
33
33
|
|
34
34
|
rest = ARGV.inject("-t\"\t\" -g -k#{field_pos}"){|acc,e| acc << " '#{e}'" }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-util
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.17.
|
4
|
+
version: 5.17.47
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|