rbbt-util 5.21.113 → 5.21.114

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 51f95ac687a3b34bd02b32a6a4c542ee6fb3a169
4
- data.tar.gz: bc322aceaa669319865fb86b665f2aafb09e9065
3
+ metadata.gz: 0e4131497146d6065961b53d868e37e9646da540
4
+ data.tar.gz: bccbef978b8665d403f6ccab0d406cd4bbc9893f
5
5
  SHA512:
6
- metadata.gz: 536e9dd8b7e012ce0d7c20ec55d0bf7a504c314eb5644a3616eddfcde1d365f5406ede03e10f51705fea79f60f0c7e6c80701f61d3620902e2042d1412556772
7
- data.tar.gz: d9633a0deb661e98b5586ead07295fb7543d7eb5f6b528a09eb6a44857aed19af0dddbaf932202817ca78c6a4a6a05e390e5b138f13092a8dc553fcb28bf2564
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.113
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-07 00:00:00.000000000 Z
11
+ date: 2017-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake