rbbt-util 5.6.10 → 5.6.11
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/tsv/attach.rb +2 -1
- data/lib/rbbt/tsv.rb +26 -21
- data/lib/rbbt/util/misc.rb +2 -1
- data/lib/rbbt/util/semaphore.rb +8 -1
- data/test/rbbt/association/test_index.rb +3 -4
- data/test/rbbt/persist/test_tsv.rb +7 -11
- data/test/rbbt/persist/tsv/test_kyotocabinet.rb +1 -3
- data/test/rbbt/test_annotations.rb +0 -1
- data/test/rbbt/test_association.rb +21 -28
- data/test/rbbt/test_entity.rb +5 -48
- data/test/rbbt/test_knowledge_base.rb +4 -6
- data/test/rbbt/tsv/test_accessor.rb +0 -1
- data/test/rbbt/tsv/test_attach.rb +1 -3
- data/test/rbbt/tsv/test_change_id.rb +1 -1
- data/test/rbbt/tsv/test_field_index.rb +2 -2
- data/test/rbbt/tsv/test_filter.rb +0 -1
- data/test/rbbt/util/test_R.rb +2 -4
- data/test/rbbt/util/test_log.rb +1 -1
- data/test/rbbt/util/test_misc.rb +3 -12
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c30ab5dc60391c384494c4607cc74c765d507b5
|
4
|
+
data.tar.gz: 8a599300be751940d1feb9b11a14fc83be187722
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05b7d25435ee522bb08c7b0d8ad5355d56d1b1d91816c191bf1a4d831ae2fb829af9b0201ae84f7544fd51f37abb72395f4cd1d88bdc432ac0688c6e6fd27de7
|
7
|
+
data.tar.gz: 185cfbaa226f9512d56a42c76a9fbcc2c8b24de266c7ed4a91e7d1f6055608c4a5b7e6f087ac3090a673015af29c5d93e4b19d292a04fdf00c48ab5f8b4de4cc
|
data/lib/rbbt/tsv/attach.rb
CHANGED
@@ -31,7 +31,8 @@ module TSV
|
|
31
31
|
|
32
32
|
done = false
|
33
33
|
Open.write(output) do |os|
|
34
|
-
|
34
|
+
options.delete :sep if options[:sep] == "\t"
|
35
|
+
os.puts TSV.header_lines(key_field, fields, options)
|
35
36
|
|
36
37
|
while line
|
37
38
|
key, *parts = line.sub("\n",'').split(sep, -1)
|
data/lib/rbbt/tsv.rb
CHANGED
@@ -171,33 +171,38 @@ module TSV
|
|
171
171
|
end
|
172
172
|
|
173
173
|
line_num = 1
|
174
|
-
|
175
|
-
|
176
|
-
progress_monitor.tick(stream.pos) if progress_monitor
|
177
|
-
|
178
|
-
raise Parser::SKIP_LINE if line.empty?
|
179
|
-
|
180
|
-
line = Misc.fixutf8(line)
|
181
|
-
line = parser.process line
|
182
|
-
parts = parser.chop_line line
|
183
|
-
key, values = parser.get_values parts
|
184
|
-
values = parser.cast_values values if parser.cast?
|
185
|
-
parser.add_to_data data, key, values
|
186
|
-
line = stream.gets
|
187
|
-
line_num += 1
|
188
|
-
raise Parser::END_PARSING if head and line_num > head.to_i
|
189
|
-
rescue Parser::SKIP_LINE
|
174
|
+
begin
|
175
|
+
while not line.nil?
|
190
176
|
begin
|
177
|
+
progress_monitor.tick(stream.pos) if progress_monitor
|
178
|
+
|
179
|
+
raise Parser::SKIP_LINE if line.empty?
|
180
|
+
|
181
|
+
line = Misc.fixutf8(line)
|
182
|
+
line = parser.process line
|
183
|
+
parts = parser.chop_line line
|
184
|
+
key, values = parser.get_values parts
|
185
|
+
values = parser.cast_values values if parser.cast?
|
186
|
+
parser.add_to_data data, key, values
|
191
187
|
line = stream.gets
|
192
|
-
|
188
|
+
line_num += 1
|
189
|
+
raise Parser::END_PARSING if head and line_num > head.to_i
|
190
|
+
rescue Parser::SKIP_LINE
|
191
|
+
begin
|
192
|
+
line = stream.gets
|
193
|
+
next
|
194
|
+
rescue IOError
|
195
|
+
break
|
196
|
+
end
|
197
|
+
rescue Parser::END_PARSING
|
198
|
+
break
|
193
199
|
rescue IOError
|
200
|
+
Log.exception $!
|
194
201
|
break
|
195
202
|
end
|
196
|
-
rescue Parser::END_PARSING
|
197
|
-
break
|
198
|
-
rescue IOError
|
199
|
-
break
|
200
203
|
end
|
204
|
+
ensure
|
205
|
+
stream.close unless stream.closed?
|
201
206
|
end
|
202
207
|
|
203
208
|
parser.setup data
|
data/lib/rbbt/util/misc.rb
CHANGED
data/lib/rbbt/util/semaphore.rb
CHANGED
@@ -64,6 +64,7 @@ void post_semaphore(char* name){
|
|
64
64
|
def self.fork_each_on_semaphore(elems, size, file = nil)
|
65
65
|
with_semaphore(size, file) do |file|
|
66
66
|
begin
|
67
|
+
|
67
68
|
pids = elems.collect do |elem|
|
68
69
|
Process.fork do
|
69
70
|
begin
|
@@ -78,7 +79,13 @@ void post_semaphore(char* name){
|
|
78
79
|
end
|
79
80
|
end
|
80
81
|
end
|
81
|
-
|
82
|
+
|
83
|
+
while pids.any?
|
84
|
+
pid = Process.wait -1
|
85
|
+
pids.delete pid
|
86
|
+
end
|
87
|
+
#pids.each do |pid| Process.waitpid pid end
|
88
|
+
|
82
89
|
rescue Exception
|
83
90
|
Log.error "Killing children: #{pids.sort * ", " }"
|
84
91
|
pids.each do |pid| begin Process.kill("INT", pid); rescue; end; end
|
@@ -3,9 +3,8 @@ require 'rbbt/workflow'
|
|
3
3
|
require 'rbbt/association'
|
4
4
|
require 'rbbt/association/index'
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
require 'rbbt/entity/gene'
|
6
|
+
#Workflow.require_workflow "Genomics"
|
7
|
+
#require 'rbbt/entity/gene'
|
9
8
|
|
10
9
|
class TestAssociationIndex < Test::Unit::TestCase
|
11
10
|
|
@@ -16,7 +15,7 @@ class TestAssociationIndex < Test::Unit::TestCase
|
|
16
15
|
end
|
17
16
|
|
18
17
|
|
19
|
-
def
|
18
|
+
def __test_subset
|
20
19
|
require 'rbbt/sources/pina'
|
21
20
|
require 'rbbt/sources/kegg'
|
22
21
|
tp53 = Gene.setup("TP53", "Associated Gene Name", "Hsa/jan2013").ensembl
|
@@ -11,11 +11,8 @@ class TestPersistTSV < Test::Unit::TestCase
|
|
11
11
|
|
12
12
|
def tsv_path
|
13
13
|
Random.new
|
14
|
-
#require 'rbbt/sources/organism'
|
15
|
-
#Organism.identifiers("Hsa")
|
16
14
|
require 'rbbt/workflow'
|
17
|
-
Workflow.require_workflow "
|
18
|
-
require 'rbbt/entity/gene'
|
15
|
+
Workflow.require_workflow "Genomes1000"
|
19
16
|
require 'rbbt/sources/genomes1000'
|
20
17
|
CMD.cmd("grep -v '^\\.\t' | head -n #{MAX}", :in => Genomes1000.mutations.open, :pipe => true)
|
21
18
|
end
|
@@ -26,7 +23,6 @@ class TestPersistTSV < Test::Unit::TestCase
|
|
26
23
|
db= nil
|
27
24
|
Misc.benchmark(1, "Build database with #{MAX - 2} entries") do
|
28
25
|
db = TSV.open(file, :fields => [1], :persist => true, :persist_engine => engine, :persist_dir => tmp_file, :type => :single, :unnamed => true)
|
29
|
-
fff db
|
30
26
|
end
|
31
27
|
test = db.keys.sort{rand}[1..100000]
|
32
28
|
Misc.benchmark(5, "Access #{test.length} random entries") do
|
@@ -40,32 +36,32 @@ class TestPersistTSV < Test::Unit::TestCase
|
|
40
36
|
end
|
41
37
|
end
|
42
38
|
|
43
|
-
def
|
39
|
+
def _test_benchmark_tch
|
44
40
|
engine = "HDB"
|
45
41
|
run_bechmark(tsv_path, engine)
|
46
42
|
end
|
47
43
|
|
48
|
-
def
|
44
|
+
def _test_benchmark_tcb
|
49
45
|
engine = "BDB"
|
50
46
|
run_bechmark(tsv_path, engine)
|
51
47
|
end
|
52
48
|
|
53
|
-
def
|
49
|
+
def _test_benchmark_kch
|
54
50
|
engine = "kch"
|
55
51
|
run_bechmark(tsv_path, engine)
|
56
52
|
end
|
57
53
|
|
58
|
-
def
|
54
|
+
def _test_benchmark_kcb
|
59
55
|
engine = "kct"
|
60
56
|
run_bechmark(tsv_path, engine)
|
61
57
|
end
|
62
58
|
|
63
|
-
def
|
59
|
+
def _test_benchmark_cdb
|
64
60
|
engine = "CDB"
|
65
61
|
run_bechmark(tsv_path, engine)
|
66
62
|
end
|
67
63
|
|
68
|
-
def
|
64
|
+
def _test_benchmark_leveldb
|
69
65
|
engine = "LevelDB"
|
70
66
|
run_bechmark(tsv_path, engine)
|
71
67
|
end
|
@@ -5,8 +5,6 @@ require 'rbbt/annotations'
|
|
5
5
|
require 'rbbt/util/tmpfile'
|
6
6
|
require 'test/unit'
|
7
7
|
|
8
|
-
require 'rbbt/sources/organism'
|
9
|
-
|
10
8
|
module TestAnnotation
|
11
9
|
extend Annotation
|
12
10
|
|
@@ -23,7 +21,7 @@ class TestPersistTSVKC < Test::Unit::TestCase
|
|
23
21
|
end
|
24
22
|
|
25
23
|
|
26
|
-
def
|
24
|
+
def _test_organism_kct
|
27
25
|
require 'rbbt/sources/organism'
|
28
26
|
TmpFile.with_file do |tmp_file|
|
29
27
|
tsv = Organism.identifiers("Hsa").tsv :key_field => "Associated Gene Name", :fields => ["Ensembl Gene ID"], :type => :single, :persist => true, :persist_engine => "kct", :persist_dir => tmp_file
|
@@ -8,13 +8,6 @@ require 'rbbt/entity'
|
|
8
8
|
require 'rbbt/association'
|
9
9
|
require 'rbbt/knowledge_base'
|
10
10
|
|
11
|
-
gem 'rbbt-sources'
|
12
|
-
gem 'rbbt-phgx'
|
13
|
-
|
14
|
-
Log.severity=0
|
15
|
-
Workflow.require_workflow "Genomics"
|
16
|
-
require 'rbbt/entity/gene'
|
17
|
-
require 'rbbt/sources/pina'
|
18
11
|
|
19
12
|
TEST_ASSOCIATIONS =<<-EOF
|
20
13
|
#: :sep=" "#:namespace=Hsa/jan2013
|
@@ -42,6 +35,7 @@ class TestAssociations < Test::Unit::TestCase
|
|
42
35
|
|
43
36
|
def test_simple_open
|
44
37
|
database = Association.open(FAssocs, {}, :dir => DAssocs)
|
38
|
+
database.unnamed = false
|
45
39
|
assert_equal ["C", "K"], database["c"]["Entity2"]
|
46
40
|
end
|
47
41
|
|
@@ -57,7 +51,24 @@ class TestAssociations < Test::Unit::TestCase
|
|
57
51
|
assert_equal ["kk", "c", "4", "PTEN"], database["K"].flatten
|
58
52
|
end
|
59
53
|
|
60
|
-
|
54
|
+
|
55
|
+
def test_gene_open
|
56
|
+
database = Association.open(FAssocs, {:source => "Gene=~Associated Gene Name", :target => "Entity3", :zipped => true}, :dir => DAssocs)
|
57
|
+
assert_equal ["aa"], database["TP53"].first
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
def __test_ICGC
|
62
|
+
assoc = Association.open(Open.open('ftp://data.dcc.icgc.org/current/Chronic_Lymphocytic_Leukemia-ISC_MICINN-ES/simple_somatic_mutation.CLLE-ES.tsv.gz'),
|
63
|
+
{ :source => "gene_affected=~Ensembl Gene ID=>Associated Gene Name", :target => "icgc_donor_id=~Sample",
|
64
|
+
:fields => ['consequence_type'],
|
65
|
+
:namespace => 'Hsa/jan2013',
|
66
|
+
:merge => true, :header_hash=>''}, :persist => false)
|
67
|
+
|
68
|
+
assert_equal 9, assoc["SF3B1"]["Sample"].uniq.length
|
69
|
+
end
|
70
|
+
|
71
|
+
def __test_target_open
|
61
72
|
|
62
73
|
database = Association.open(Pina.protein_protein,{
|
63
74
|
:undirected => false,
|
@@ -74,34 +85,16 @@ class TestAssociations < Test::Unit::TestCase
|
|
74
85
|
assert database["Q13547"][0].include? "O15379"
|
75
86
|
end
|
76
87
|
|
77
|
-
|
78
|
-
def test_gene_open
|
79
|
-
database = Association.open(FAssocs, {:source => "Gene=~Associated Gene Name", :target => "Entity3", :zipped => true}, :dir => DAssocs)
|
80
|
-
assert_equal ["aa"], database["TP53"].first
|
81
|
-
end
|
82
|
-
|
83
|
-
def test_gene_open_translate
|
88
|
+
def __test_gene_open_translate
|
84
89
|
tp53 = Gene.setup("TP53", "Associated Gene Name", "Hsa/jan2013")
|
85
90
|
database = Association.open(FAssocs, {:source => "Gene=~Associated Gene Name", :source_format => "Ensembl Gene ID", :target => "Entity3", :zipped => true}, :dir => DAssocs)
|
86
91
|
assert_equal ["aa"], database[tp53.ensembl].first
|
87
92
|
end
|
88
93
|
|
89
|
-
def
|
94
|
+
def __test_gene_target_open_translate
|
90
95
|
tp53 = Gene.setup("TP53", "Associated Gene Name", "Hsa/jan2013")
|
91
96
|
database = Association.open(FAssocs, {:target => "Gene=~Associated Gene Name=>Ensembl Gene ID", :source => "Entity3", :zipped => true}, :dir => DAssocs)
|
92
97
|
assert_equal [tp53.ensembl], database["aa"].first
|
93
98
|
end
|
94
99
|
|
95
|
-
def test_ICGC
|
96
|
-
assoc = Association.open(Open.open('ftp://data.dcc.icgc.org/current/Chronic_Lymphocytic_Leukemia-ISC_MICINN-ES/simple_somatic_mutation.CLLE-ES.tsv.gz'),
|
97
|
-
{ :source => "gene_affected=~Ensembl Gene ID=>Associated Gene Name", :target => "icgc_donor_id=~Sample",
|
98
|
-
:fields => ['consequence_type'],
|
99
|
-
:namespace => 'Hsa/jan2013',
|
100
|
-
:merge => true, :header_hash=>''}, :persist => false)
|
101
|
-
|
102
|
-
assert_equal 9, assoc["SF3B1"]["Sample"].uniq.length
|
103
|
-
|
104
|
-
end
|
105
|
-
|
106
|
-
|
107
100
|
end
|
data/test/rbbt/test_entity.rb
CHANGED
@@ -167,55 +167,12 @@ class TestEntity < Test::Unit::TestCase
|
|
167
167
|
assert_equal string.length, string.annotation_list.length
|
168
168
|
end
|
169
169
|
|
170
|
-
def
|
171
|
-
require 'rbbt/entity/gene'
|
172
|
-
Misc.profile(:min_percent => 2) do
|
173
|
-
1000.times do
|
174
|
-
TestA.new "foo", "bar"
|
175
|
-
end
|
176
|
-
end
|
177
|
-
|
178
|
-
Misc.profile(:min_percent => 2) do
|
179
|
-
1000.times do
|
180
|
-
Gene.setup_positional("", "foo", "bar")
|
181
|
-
end
|
182
|
-
end
|
183
|
-
|
184
|
-
Misc.benchmark(100000) do
|
185
|
-
Gene.setup("", :foo => "foo", :bar => "bar")
|
186
|
-
end
|
187
|
-
|
188
|
-
Misc.benchmark(100000) do
|
189
|
-
TestA.new "foo", "bar"
|
190
|
-
end
|
191
|
-
end
|
192
|
-
|
193
|
-
def __test_clean_annotations
|
194
|
-
Workflow.require_workflow "StudyExplorer"
|
195
|
-
|
196
|
-
s = Study.setup("CLL")
|
197
|
-
mutations = s.cohort.metagenotype
|
170
|
+
def test_clean_annotations
|
198
171
|
|
199
|
-
|
172
|
+
string = "test_string"
|
173
|
+
ReversableString.setup string
|
174
|
+
assert string.respond_to?(:reverse_text_single)
|
175
|
+
assert ! string.clean_annotations.respond_to?(:reverse_text_single)
|
200
176
|
|
201
|
-
Misc.profile(:min_percent => 1) do
|
202
|
-
mis.each{|m| m}
|
203
|
-
end
|
204
|
-
|
205
|
-
|
206
|
-
Misc.benchmark(10) do
|
207
|
-
mis.each{|m| m}
|
208
|
-
end
|
209
|
-
|
210
|
-
Misc.benchmark(10) do
|
211
|
-
mis.clean_annotations.each{|m| m}
|
212
|
-
end
|
213
|
-
|
214
|
-
m = mutations.first
|
215
|
-
|
216
|
-
assert_equal m.split(":")[1], m.position.to_s
|
217
|
-
assert_raise NoMethodError do
|
218
|
-
m.clean_annotations.position
|
219
|
-
end
|
220
177
|
end
|
221
178
|
end
|
@@ -3,17 +3,15 @@ $LOAD_PATH.unshift(File.dirname(__FILE__))
|
|
3
3
|
require 'test/unit'
|
4
4
|
require 'rbbt/knowledge_base'
|
5
5
|
|
6
|
-
gem 'rbbt-sources'
|
7
|
-
gem 'rbbt-phgx'
|
8
|
-
gem 'rest-client'
|
9
|
-
|
10
6
|
require 'rbbt/sources/pina'
|
11
7
|
require 'rbbt/workflow'
|
12
|
-
Workflow.require_workflow "Genomics"
|
13
|
-
require 'genomics_kb'
|
14
8
|
|
15
9
|
class TestKnowledgeBase < Test::Unit::TestCase
|
16
10
|
def setup
|
11
|
+
if not defined? Genomics
|
12
|
+
Workflow.require_workflow "Genomics"
|
13
|
+
require 'genomics_kb'
|
14
|
+
end
|
17
15
|
KnowledgeBase.knowledge_base_dir = Rbbt.tmp.knowledge_base_test.find
|
18
16
|
@kb = Genomics.knowledge_base
|
19
17
|
end
|
@@ -469,7 +469,6 @@ A Id3
|
|
469
469
|
tsv1 = tsv2 = index = nil
|
470
470
|
TmpFile.with_file(content1) do |filename|
|
471
471
|
tsv1 = TSV.open(File.open(filename), :flat, :fields => ["ValueA"], :sep => /\s+/)
|
472
|
-
puts tsv1
|
473
472
|
end
|
474
473
|
|
475
474
|
TmpFile.with_file(content2) do |filename|
|
@@ -477,8 +476,7 @@ A Id3
|
|
477
476
|
end
|
478
477
|
|
479
478
|
res = tsv1.attach tsv2, :fields => ["OtherID"]
|
480
|
-
|
481
|
-
|
479
|
+
assert_equal "Id3", res["row2"]["OtherID"]
|
482
480
|
end
|
483
481
|
end
|
484
482
|
|
@@ -4,7 +4,7 @@ require 'rbbt/tsv/field_index'
|
|
4
4
|
|
5
5
|
class TestTSVFieldIndex < Test::Unit::TestCase
|
6
6
|
|
7
|
-
def
|
7
|
+
def test_field_index
|
8
8
|
content =<<-EOF
|
9
9
|
#Id ValueA ValueB ValueC
|
10
10
|
rowA A|AA B|BB C|CC
|
@@ -13,7 +13,7 @@ rowa a|aa b|BB C|CC
|
|
13
13
|
|
14
14
|
TmpFile.with_file(content) do |filename|
|
15
15
|
tsv = TSV.open(File.open(filename), :sep => /\s+/, :type => :double)
|
16
|
-
|
16
|
+
assert_equal ["rowA"], tsv.field_index("ValueA")["A"]
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
data/test/rbbt/util/test_R.rb
CHANGED
@@ -2,7 +2,7 @@ require File.join(File.expand_path(File.dirname(__FILE__)), '../..', 'test_helpe
|
|
2
2
|
require 'rbbt/util/R'
|
3
3
|
|
4
4
|
class TestR < Test::Unit::TestCase
|
5
|
-
def
|
5
|
+
def _test_sum
|
6
6
|
assert_equal "6", R.run('cat(3+3)').read.split(/\n/).last
|
7
7
|
end
|
8
8
|
|
@@ -16,9 +16,7 @@ data = data + 1
|
|
16
16
|
|
17
17
|
def test_format_tsv
|
18
18
|
tsv = TSV.setup({"a" => [1], "b" => [2]}, :type => :list, :key_field => "Letter", :fields => ["Number"])
|
19
|
-
|
20
|
-
tsv.unnamed = true
|
21
|
-
puts R.ruby2R tsv
|
19
|
+
assert tsv.transpose("Field").include? "Number"
|
22
20
|
end
|
23
21
|
end
|
24
22
|
|
data/test/rbbt/util/test_log.rb
CHANGED
data/test/rbbt/util/test_misc.rb
CHANGED
@@ -6,9 +6,6 @@ require 'rbbt/entity'
|
|
6
6
|
|
7
7
|
class TestMisc < Test::Unit::TestCase
|
8
8
|
|
9
|
-
def test_humanize
|
10
|
-
assert_equal "mutation_enrichment", Misc.humanize("MutationEnrichment")
|
11
|
-
end
|
12
9
|
|
13
10
|
def test_fixutf8
|
14
11
|
string = "abc\xffdef"
|
@@ -84,13 +81,6 @@ class TestMisc < Test::Unit::TestCase
|
|
84
81
|
assert_equal('d', Misc.string2hash("a=b#c=d#:h='j'")["c"])
|
85
82
|
assert_equal('j', Misc.string2hash("a=b#c=d#:h='j'")[:h])
|
86
83
|
assert_equal(:j, Misc.string2hash("a=b#c=d#:h=:j")[:h])
|
87
|
-
|
88
|
-
Misc.benchmark(1000) do
|
89
|
-
Misc.string2hash_old("a=b#c=d#:h=:j#test='1'#:num=1#:sep=/#/")
|
90
|
-
end
|
91
|
-
Misc.benchmark(1000) do
|
92
|
-
Misc.string2hash("a=b#c=d#:h=:j#test='1'#:num=1#:sep=/#/")
|
93
|
-
end
|
94
84
|
end
|
95
85
|
|
96
86
|
def test_named_array
|
@@ -227,6 +217,8 @@ class TestMisc < Test::Unit::TestCase
|
|
227
217
|
assert_equal "Test string", Misc.humanize(str1)
|
228
218
|
assert_equal "TEST string", Misc.humanize(str2)
|
229
219
|
assert_equal "Test", Misc.humanize(str3)
|
220
|
+
|
221
|
+
assert_equal "mutation_enrichment", Misc.snake_case("MutationEnrichment")
|
230
222
|
end
|
231
223
|
|
232
224
|
def test_snake_case
|
@@ -241,7 +233,7 @@ class TestMisc < Test::Unit::TestCase
|
|
241
233
|
end
|
242
234
|
|
243
235
|
def test_fingerprint
|
244
|
-
|
236
|
+
assert_equal '{a=>1}', Misc.fingerprint({:a => 1})
|
245
237
|
end
|
246
238
|
|
247
239
|
def test_tarize
|
@@ -266,7 +258,6 @@ class TestMisc < Test::Unit::TestCase
|
|
266
258
|
t = 5
|
267
259
|
stream = Misc.open_pipe do |sin|
|
268
260
|
t.times do |i|
|
269
|
-
puts "Calculating line #{ i }"
|
270
261
|
sleep 0.5
|
271
262
|
sin.puts "LINE #{ i }"
|
272
263
|
end
|
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.6.
|
4
|
+
version: 5.6.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -108,20 +108,6 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: ZenTest
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - '='
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '4.3'
|
118
|
-
type: :runtime
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - '='
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '4.3'
|
125
111
|
description: Utilities for handling tsv files, caches, etc
|
126
112
|
email: miguel.vazquez@cnio.es
|
127
113
|
executables:
|