rbbt-util 5.14.10 → 5.14.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cb5293895c8a68f418b08234e239bacadd00d4eb
4
- data.tar.gz: 7e70f082d70d3ae7b878be2df3be9c36c50c33a2
3
+ metadata.gz: 4d027fa4dd9f82671322bbc9dad837e1c35748b5
4
+ data.tar.gz: 7b02a4bff8f485a0c51c6d5ddf4b0e3b329fb5da
5
5
  SHA512:
6
- metadata.gz: 96960fe35a0668ece8cd3186d76c16ee0b8e05075d8b84be2d7b5bb32e4019d2b9040cb81fdd85934677394576cff10f62f7c4995a93d26e7f9ebebe2eeb90e5
7
- data.tar.gz: 75814ae86c6824bd184e095c3322bd87c87e5cc67370a41d50cfce97755ad1b7895678c1d5ec38f6d0a3573dc2b6dffb253f689b35e35f90d8522dcd126f96e2
6
+ metadata.gz: a8efceacaed62a956f0f948c5905f5cd235ed6b8f79248120e2ebbab27219becbc3e40985d534194f515c41c1ca7a0e5b5d5f74566796aa3270279b50bad0814
7
+ data.tar.gz: a6115e5690df10e4f245584d2854a3c2baadfe53219b79a1bcd61bc162d479f3eb7b539ef64fbe4b5fe4ed333c22772e5a7988737b579a04b61a3146036401e5
@@ -79,7 +79,9 @@ module Association
79
79
  if source == :all or source == "all"
80
80
  matches = keys
81
81
  else
82
- matches = source.uniq.inject([]){|acc,e| acc.concat(match(e)) }
82
+ matches = source.uniq.inject([]){|acc,e|
83
+ acc.concat(match(e))
84
+ }
83
85
  end
84
86
 
85
87
  return matches if target == :all or target == "all"
@@ -88,6 +90,7 @@ module Association
88
90
 
89
91
  matches.each{|code|
90
92
  s,sep,t = code.partition "~"
93
+ next if t > s
91
94
  target_matches[t] ||= []
92
95
  target_matches[t] << code
93
96
  }
@@ -206,7 +206,8 @@ class KnowledgeBase
206
206
  @identifiers[name] ||= {}
207
207
  @identifiers[name]['source'] ||= begin
208
208
  if database.identifier_files.any?
209
- if TSV.parse_header(database.identifier_files.first).all_fields.include? source
209
+ identifier_fields = TSV.parse_header(database.identifier_files.first).all_fields
210
+ if identifier_fields.include? source
210
211
  TSV.index(database.identifiers, :target => source, :persist => true, :order => true)
211
212
  else
212
213
  {}
@@ -68,7 +68,7 @@ when :subset
68
68
  else
69
69
  matches.each do |item|
70
70
  puts Log.color(:magenta, item)
71
- info = file.fields.zip(file[item])
71
+ info = item.info
72
72
  source,_sep, target = item.partition "~"
73
73
  puts " " << Misc.format_definition_list_item("source", source)
74
74
  puts " " << Misc.format_definition_list_item("target", target)
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.14.10
4
+ version: 5.14.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-07-17 00:00:00.000000000 Z
11
+ date: 2014-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake