unipept 0.3.4 → 0.3.5

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/bin/unipept +8 -6
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d8b67a44cab159e17675e6cab96d9fb04e458dc3
4
- data.tar.gz: 515cd4c0592854704f26a410fe8d024aa411d56c
3
+ metadata.gz: 912794c26e712f70f1db0cb0946d87479a1c4dae
4
+ data.tar.gz: 44adc715b0704425d542ca0450c4e523df0f19d2
5
5
  SHA512:
6
- metadata.gz: eb5a84db577d804aac0d969a90307f4d6f30761a6ddd44489db34aa8b9f0280366cce5ba2672a59cfe7770709396899d8e95cd4866cb32f8a01e5d62be65cbc3
7
- data.tar.gz: b5a17c748755f7dfba4e8598290818e1ac2bf9d6dcdd6d32cd2df363635fe7b1be3911a90e1a476e97ae002a303e1ec06abe2b81eb362e517b50a4460e7a1bd0
6
+ metadata.gz: e7dea9e6717f0f3b18510ae53b21c040412c4d25db3525fdd13baa660df72c24c44a6f9f5981301f3fc0352768821826acb082712652d9d2fb4d30b51f22527e
7
+ data.tar.gz: 911afafcbb596b5d66e86c3cdec7ab4022622f635ff0edad85fbfce587949708feb85a2f33b51e0bfdfd4cddb1bb246905bd1dbf40d25db2f181383163030ecc
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.4
1
+ 0.3.5
data/bin/unipept CHANGED
@@ -94,11 +94,13 @@ class ApiRunner < Cri::CommandRunner
94
94
 
95
95
  # wait till it's our turn to write
96
96
  batch_order.wait(i) do
97
- if ! printed_header
98
- write_to_output formatter.header(sub_result)
99
- printed_header = true
97
+ if ! sub_result.empty?
98
+ if ! printed_header
99
+ write_to_output formatter.header(sub_result)
100
+ printed_header = true
101
+ end
102
+ write_to_output formatter.format(sub_result)
100
103
  end
101
- write_to_output formatter.format(sub_result)
102
104
  end
103
105
  else
104
106
  path = File.expand_path(File.join(Dir.home, "unipept.log"))
@@ -143,7 +145,7 @@ class ApiRunner < Cri::CommandRunner
143
145
  def download_xml(result)
144
146
  if options[:xml]
145
147
  File.open(options[:xml] + ".xml", "wb") do |f|
146
- f.write Faraday.get("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=taxonomy&id=#{result.first.map{|h| h['taxon_id'] }.join(",")}&retmode=xml").body
148
+ f.write Typhoeus.get("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=taxonomy&id=#{result.first.map{|h| h['taxon_id'] }.join(",")}&retmode=xml").response_body
147
149
  end
148
150
  end
149
151
  end
@@ -195,7 +197,7 @@ class Pept2prot < ApiRunner
195
197
  FileUtils.mkdir_p(options[:xml])
196
198
  result.first.each do |prot|
197
199
  File.open(options[:xml] + "/#{prot['uniprot_id']}.xml", "wb") do |f|
198
- f.write Faraday.get("http://www.uniprot.org/uniprot/#{prot['uniprot_id']}.xml").body
200
+ f.write Typhoeus.get("http://www.uniprot.org/uniprot/#{prot['uniprot_id']}.xml").response_body
199
201
  end
200
202
  end
201
203
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unipept
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toon Willems