unipept 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/bin/uniprot +14 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50644c602dbd81f19cb9fe9227c961b7f201c558
4
- data.tar.gz: f3d2c2640f96499686872f522f0862381268cda4
3
+ metadata.gz: d8b67a44cab159e17675e6cab96d9fb04e458dc3
4
+ data.tar.gz: 515cd4c0592854704f26a410fe8d024aa411d56c
5
5
  SHA512:
6
- metadata.gz: a093829d561541fb505d676c386aa7503baf38c8295c8c002c012b24f4131324c1ade7261c0cdadb660a02cbe85ce332c3bffa11f138859bd20dd58cee35895c
7
- data.tar.gz: 6824cac10d9ef6eb5621795ca0a0ab5e06cfb653c3470294fe918b45ea81d52ed054f7784077d2b359c74a70299b5ea7601460213f8448d6d67a505eabbffd22
6
+ metadata.gz: eb5a84db577d804aac0d969a90307f4d6f30761a6ddd44489db34aa8b9f0280366cce5ba2672a59cfe7770709396899d8e95cd4866cb32f8a01e5d62be65cbc3
7
+ data.tar.gz: b5a17c748755f7dfba4e8598290818e1ac2bf9d6dcdd6d32cd2df363635fe7b1be3911a90e1a476e97ae002a303e1ec06abe2b81eb362e517b50a4460e7a1bd0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.3
1
+ 0.3.4
data/bin/uniprot CHANGED
@@ -1,10 +1,23 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'faraday'
3
+ require 'cri'
4
+
3
5
  Signal.trap("PIPE", "EXIT")
4
6
  Signal.trap("INT", "EXIT")
5
- ARGV.each do |arg|
7
+
8
+ def get_uniprot_entry(arg)
6
9
  resp = Faraday.get("http://www.uniprot.org/uniprot/#{arg}.fasta")
7
10
  if resp.success?
8
11
  puts resp.body.lines.map(&:chomp)[1..-1].join("")
9
12
  end
10
13
  end
14
+
15
+ if ARGV.empty?
16
+ STDIN.each_line do |pept|
17
+ get_uniprot_entry(pept.chomp)
18
+ end
19
+ else
20
+ ARGV.each do |pept|
21
+ get_uniprot_entry(pept)
22
+ end
23
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unipept
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toon Willems
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-09 00:00:00.000000000 Z
11
+ date: 2014-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: shoulda