rbbt-util 5.21.113 → 5.21.114
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.
- checksums.yaml +4 -4
- data/lib/rbbt/util/misc/inspect.rb +7 -1
- data/share/rbbt_commands/tsv/read +13 -0
- 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: 0e4131497146d6065961b53d868e37e9646da540
|
|
4
|
+
data.tar.gz: bccbef978b8665d403f6ccab0d406cd4bbc9893f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 52627cf3091431622e0319ec71fa02f378a8b9ac530aa77f43bd969cacf446d4e98fa8c381a1a7c6357ae3bb91bdfc08162d7531d09c9947e83d1b37884af8b5
|
|
7
|
+
data.tar.gz: 2c5e96ee531bc7c0a73923c819c268b356709908d88dfa96f5ddae813d4cbeea3577e4d6414820a86c06e3cd54ba38540a940d0b906a3aa971bf1608b0ef0d52
|
|
@@ -281,12 +281,18 @@ module Misc
|
|
|
281
281
|
end
|
|
282
282
|
when (defined? Step and Step)
|
|
283
283
|
"<IO:" << obj.path << ">"
|
|
284
|
+
when IO
|
|
285
|
+
if obj.respond_to? :filename and obj.filename
|
|
286
|
+
"<IO:" << obj.filename << "--" << mtime_str(obj.filename) << ">"
|
|
287
|
+
else
|
|
288
|
+
obj.inspect + rand(1000000).to_s
|
|
289
|
+
end
|
|
284
290
|
else
|
|
285
291
|
if obj.respond_to? :filename and obj.filename
|
|
286
292
|
"<IO:" << obj.filename << "--" << mtime_str(obj.filename) << ">"
|
|
287
293
|
else
|
|
288
294
|
obj_ins = obj.inspect
|
|
289
|
-
if obj_ins =~ /:0x0/
|
|
295
|
+
obj_str = if obj_ins =~ /:0x0/
|
|
290
296
|
obj_ins.gsub(/:0x[a-f0-9]+/,'')
|
|
291
297
|
else
|
|
292
298
|
obj_ins
|
|
@@ -15,6 +15,8 @@ Use - to read from STDIN
|
|
|
15
15
|
-t--type* Type
|
|
16
16
|
-m--merge Merge from multiple rows
|
|
17
17
|
-h--help Print this help
|
|
18
|
+
-tch--tokyocabinet File is a tokyocabinet hash database
|
|
19
|
+
-tcb--tokyocabinet_bd File is a tokyocabinet B database
|
|
18
20
|
|
|
19
21
|
EOF
|
|
20
22
|
rbbt_usage and exit 0 if options[:help]
|
|
@@ -23,6 +25,17 @@ file = ARGV.shift
|
|
|
23
25
|
|
|
24
26
|
file = STDIN if file == '-'
|
|
25
27
|
|
|
28
|
+
case
|
|
29
|
+
when options[:tokyocabinet]
|
|
30
|
+
tsv = Persist.open_tokyocabinet(file, false)
|
|
31
|
+
puts tsv.to_s
|
|
32
|
+
exit
|
|
33
|
+
when options[:tokyocabinet_bd]
|
|
34
|
+
tsv = Persist.open_tokyocabinet(file, false, nil, TokyoCabinet::BDB)
|
|
35
|
+
puts tsv.to_s
|
|
36
|
+
exit
|
|
37
|
+
end
|
|
38
|
+
|
|
26
39
|
parser = TSV::Parser.new TSV.get_stream(file), options
|
|
27
40
|
|
|
28
41
|
dumper = TSV::Dumper.new parser.options
|
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.21.
|
|
4
|
+
version: 5.21.114
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Miguel Vazquez
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-12-
|
|
11
|
+
date: 2017-12-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|