unipept 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (8) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -0
  3. data/Gemfile.lock +40 -30
  4. data/Rakefile +0 -3
  5. data/VERSION +1 -1
  6. data/bin/uniprot +18 -9
  7. data/unipept.gemspec +9 -9
  8. metadata +27 -27
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76c5c9cf72e0988ad2b3af3bb718b5f771ff64f0
4
- data.tar.gz: df8d0bb303b89dc56780cbf41f27c74c3573bdd6
3
+ metadata.gz: 567da9af48d82125a8bb3d330d25ee0f51429833
4
+ data.tar.gz: d176b5daec3dc2287fe453d3567d9d7ce86032e8
5
5
  SHA512:
6
- metadata.gz: 14e08400bd1e8f94aee029cd78b355e3abacf628d68cd1a9ea41f133a97d0afcab1d94facb8cdc41dc0ceebf410237bfae0dca458ae513baa47f272d762a37c9
7
- data.tar.gz: db5ff353e531b26c094a4a1662922d8e5d409a8e0fb569afb332b6a3abc7ab28c792454de37a5f85e98b6dbb5131ee37ce721981470fe4e3b783c4983671b8b3
6
+ metadata.gz: e2ca1389cfd0bf5b341222aca4ac8c878b1928d2872ed8d6d2ea8440d2e2f7bb39b51fde803888721fcd85a3b03a3ce2848943348e14cb235556e4f692c2eacd
7
+ data.tar.gz: 44e9af1dde7132c883fac6f95a0a6d2bf23bb8676f59ece0e51537ed8a101ab141c7056deca40aaee978d6273b557b8389b800cf40178d7d499b0adbc7110d74
data/Gemfile CHANGED
@@ -3,6 +3,9 @@ source "http://rubygems.org"
3
3
  # Example:
4
4
  # gem "activesupport", ">= 2.3.5"
5
5
 
6
+ gem "cri", "~> 2.7"
7
+ gem "typhoeus", "~> 0.6"
8
+
6
9
  # Add dependencies to develop your gem here.
7
10
  # Include everything needed to run rake, tests, features, etc.
8
11
  group :development do
data/Gemfile.lock CHANGED
@@ -1,31 +1,37 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- activesupport (4.1.1)
5
- i18n (~> 0.6, >= 0.6.9)
4
+ activesupport (4.2.1)
5
+ i18n (~> 0.7)
6
6
  json (~> 1.7, >= 1.7.7)
7
7
  minitest (~> 5.1)
8
- thread_safe (~> 0.1)
8
+ thread_safe (~> 0.3, >= 0.3.4)
9
9
  tzinfo (~> 1.1)
10
- addressable (2.3.6)
10
+ addressable (2.3.8)
11
11
  builder (3.2.2)
12
+ colored (1.2)
13
+ cri (2.7.0)
14
+ colored (~> 1.2)
12
15
  descendants_tracker (0.0.4)
13
16
  thread_safe (~> 0.3, >= 0.3.1)
14
17
  docile (1.1.5)
15
- faraday (0.9.0)
18
+ ethon (0.7.3)
19
+ ffi (>= 1.3.0)
20
+ faraday (0.9.1)
16
21
  multipart-post (>= 1.2, < 3)
17
- git (1.2.7)
18
- github_api (0.11.3)
22
+ ffi (1.9.8)
23
+ git (1.2.9.1)
24
+ github_api (0.12.3)
19
25
  addressable (~> 2.3)
20
- descendants_tracker (~> 0.0.1)
26
+ descendants_tracker (~> 0.0.4)
21
27
  faraday (~> 0.8, < 0.10)
22
- hashie (>= 1.2)
28
+ hashie (>= 3.3)
23
29
  multi_json (>= 1.7.5, < 2.0)
24
- nokogiri (~> 1.6.0)
30
+ nokogiri (~> 1.6.3)
25
31
  oauth2
26
- hashie (3.0.0)
27
- highline (1.6.21)
28
- i18n (0.6.9)
32
+ hashie (3.4.1)
33
+ highline (1.7.2)
34
+ i18n (0.7.0)
29
35
  jeweler (2.0.1)
30
36
  builder
31
37
  bundler (>= 1.0)
@@ -35,38 +41,40 @@ GEM
35
41
  nokogiri (>= 1.5.10)
36
42
  rake
37
43
  rdoc
38
- json (1.8.1)
39
- jwt (1.0.0)
40
- mini_portile (0.6.0)
41
- minitest (5.3.5)
42
- multi_json (1.10.1)
44
+ json (1.8.2)
45
+ jwt (1.4.1)
46
+ mini_portile (0.6.2)
47
+ minitest (5.6.1)
48
+ multi_json (1.11.0)
43
49
  multi_xml (0.5.5)
44
50
  multipart-post (2.0.0)
45
- nokogiri (1.6.2.1)
46
- mini_portile (= 0.6.0)
47
- oauth2 (0.9.4)
51
+ nokogiri (1.6.6.2)
52
+ mini_portile (~> 0.6.0)
53
+ oauth2 (1.0.0)
48
54
  faraday (>= 0.8, < 0.10)
49
55
  jwt (~> 1.0)
50
56
  multi_json (~> 1.3)
51
57
  multi_xml (~> 0.5)
52
58
  rack (~> 1.2)
53
- rack (1.5.2)
54
- rake (10.3.2)
59
+ rack (1.6.0)
60
+ rake (10.4.2)
55
61
  rdoc (3.12.2)
56
62
  json (~> 1.4)
57
63
  shoulda (3.5.0)
58
64
  shoulda-context (~> 1.0, >= 1.0.1)
59
65
  shoulda-matchers (>= 1.4.1, < 3.0)
60
66
  shoulda-context (1.2.1)
61
- shoulda-matchers (2.6.1)
67
+ shoulda-matchers (2.8.0)
62
68
  activesupport (>= 3.0.0)
63
- simplecov (0.8.2)
69
+ simplecov (0.10.0)
64
70
  docile (~> 1.1.0)
65
- multi_json
66
- simplecov-html (~> 0.8.0)
67
- simplecov-html (0.8.0)
68
- thread_safe (0.3.4)
69
- tzinfo (1.2.1)
71
+ json (~> 1.8)
72
+ simplecov-html (~> 0.10.0)
73
+ simplecov-html (0.10.0)
74
+ thread_safe (0.3.5)
75
+ typhoeus (0.7.1)
76
+ ethon (>= 0.7.1)
77
+ tzinfo (1.2.2)
70
78
  thread_safe (~> 0.1)
71
79
 
72
80
  PLATFORMS
@@ -74,7 +82,9 @@ PLATFORMS
74
82
 
75
83
  DEPENDENCIES
76
84
  bundler (~> 1.0)
85
+ cri (~> 2.7)
77
86
  jeweler (~> 2.0)
78
87
  rdoc (~> 3.12)
79
88
  shoulda (~> 3.5)
80
89
  simplecov (~> 0.8)
90
+ typhoeus (~> 0.6)
data/Rakefile CHANGED
@@ -23,9 +23,6 @@ Jeweler::Tasks.new do |gem|
23
23
  gem.email = "unipept@ugent.be"
24
24
  gem.authors = ["Toon Willems", "Bart Mesuere", "Tom Naessens"]
25
25
  gem.required_ruby_version = '>= 1.9.3'
26
- # dependencies defined in Gemfile
27
- gem.add_dependency 'typhoeus', '~> 0.6'
28
- gem.add_dependency 'cri', '~> 2.6'
29
26
  end
30
27
  Jeweler::RubygemsDotOrgTasks.new
31
28
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.1
1
+ 0.6.2
data/bin/uniprot CHANGED
@@ -5,26 +5,35 @@ require 'cri'
5
5
  Signal.trap("PIPE", "EXIT")
6
6
  Signal.trap("INT", "EXIT")
7
7
 
8
- def get_uniprot_entry(arg, fasta = false)
9
- resp = Typhoeus.get("http://www.uniprot.org/uniprot/#{arg}.fasta")
10
- if resp.success?
11
- if fasta
12
- puts resp.response_body
13
- else
8
+ valid_formats = Set.new ["fasta", "txt", "xml", "rdf", "gff"]
9
+
10
+ def get_uniprot_entry(arg, format)
11
+ if format.nil? || format.empty?
12
+ resp = Typhoeus.get("http://www.uniprot.org/uniprot/#{arg}.fasta")
13
+ if resp.success?
14
14
  puts resp.response_body.lines.map(&:chomp)[1..-1].join("")
15
15
  end
16
+ else
17
+ # other format has been specified, just download and output
18
+ resp = Typhoeus.get("http://www.uniprot.org/uniprot/#{arg}.#{format}")
19
+ if resp.success?
20
+ puts resp.response_body
21
+ end
16
22
  end
17
23
  end
18
24
 
19
25
  root_cmd = Cri::Command.new_basic_root.modify do
20
26
  name 'uniprot'
21
27
  description 'Download protein sequence from uniprot.org'
22
- required :f, :format, "specify output format (available: fasta, plain)"
28
+ required :f, :format, "specify output format (available: " + valid_formats.to_a.join(", ") + ")"
23
29
  run do |opts, args, cmd|
24
- fasta = opts[:format] == 'fasta'
30
+ if !opts[:format].nil? and !valid_formats.include? opts[:format]
31
+ $stderr.puts opts[:format] + " is not a valid output format. Available formats are: " + valid_formats.to_a.join(", ")
32
+ exit 1
33
+ end
25
34
  iterator = args.empty? ? $stdin.each_line : args
26
35
  iterator.each do |pept|
27
- get_uniprot_entry(pept.chomp, fasta)
36
+ get_uniprot_entry(pept.chomp, opts[:format])
28
37
  end
29
38
  end
30
39
  end
data/unipept.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: unipept 0.6.1 ruby lib
5
+ # stub: unipept 0.6.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "unipept"
9
- s.version = "0.6.1"
9
+ s.version = "0.6.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Toon Willems", "Bart Mesuere", "Tom Naessens"]
14
- s.date = "2015-04-22"
14
+ s.date = "2015-04-30"
15
15
  s.description = "Command line interface to Unipept web services."
16
16
  s.email = "unipept@ugent.be"
17
17
  s.executables = ["unipept", "prot2pept", "peptfilter", "uniprot"]
@@ -57,30 +57,30 @@ Gem::Specification.new do |s|
57
57
  s.specification_version = 4
58
58
 
59
59
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
60
+ s.add_runtime_dependency(%q<cri>, ["~> 2.7"])
61
+ s.add_runtime_dependency(%q<typhoeus>, ["~> 0.6"])
60
62
  s.add_development_dependency(%q<shoulda>, ["~> 3.5"])
61
63
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
62
64
  s.add_development_dependency(%q<bundler>, ["~> 1.0"])
63
65
  s.add_development_dependency(%q<jeweler>, ["~> 2.0"])
64
66
  s.add_development_dependency(%q<simplecov>, ["~> 0.8"])
65
- s.add_runtime_dependency(%q<typhoeus>, ["~> 0.6"])
66
- s.add_runtime_dependency(%q<cri>, ["~> 2.6"])
67
67
  else
68
+ s.add_dependency(%q<cri>, ["~> 2.7"])
69
+ s.add_dependency(%q<typhoeus>, ["~> 0.6"])
68
70
  s.add_dependency(%q<shoulda>, ["~> 3.5"])
69
71
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
70
72
  s.add_dependency(%q<bundler>, ["~> 1.0"])
71
73
  s.add_dependency(%q<jeweler>, ["~> 2.0"])
72
74
  s.add_dependency(%q<simplecov>, ["~> 0.8"])
73
- s.add_dependency(%q<typhoeus>, ["~> 0.6"])
74
- s.add_dependency(%q<cri>, ["~> 2.6"])
75
75
  end
76
76
  else
77
+ s.add_dependency(%q<cri>, ["~> 2.7"])
78
+ s.add_dependency(%q<typhoeus>, ["~> 0.6"])
77
79
  s.add_dependency(%q<shoulda>, ["~> 3.5"])
78
80
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
79
81
  s.add_dependency(%q<bundler>, ["~> 1.0"])
80
82
  s.add_dependency(%q<jeweler>, ["~> 2.0"])
81
83
  s.add_dependency(%q<simplecov>, ["~> 0.8"])
82
- s.add_dependency(%q<typhoeus>, ["~> 0.6"])
83
- s.add_dependency(%q<cri>, ["~> 2.6"])
84
84
  end
85
85
  end
86
86
 
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.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toon Willems
@@ -10,106 +10,106 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-04-22 00:00:00.000000000 Z
13
+ date: 2015-04-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: shoulda
16
+ name: cri
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: '3.5'
22
- type: :development
21
+ version: '2.7'
22
+ type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: '3.5'
28
+ version: '2.7'
29
29
  - !ruby/object:Gem::Dependency
30
- name: rdoc
30
+ name: typhoeus
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - "~>"
34
34
  - !ruby/object:Gem::Version
35
- version: '3.12'
36
- type: :development
35
+ version: '0.6'
36
+ type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: '3.12'
42
+ version: '0.6'
43
43
  - !ruby/object:Gem::Dependency
44
- name: bundler
44
+ name: shoulda
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: '1.0'
49
+ version: '3.5'
50
50
  type: :development
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - "~>"
55
55
  - !ruby/object:Gem::Version
56
- version: '1.0'
56
+ version: '3.5'
57
57
  - !ruby/object:Gem::Dependency
58
- name: jeweler
58
+ name: rdoc
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: '2.0'
63
+ version: '3.12'
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - "~>"
69
69
  - !ruby/object:Gem::Version
70
- version: '2.0'
70
+ version: '3.12'
71
71
  - !ruby/object:Gem::Dependency
72
- name: simplecov
72
+ name: bundler
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - "~>"
76
76
  - !ruby/object:Gem::Version
77
- version: '0.8'
77
+ version: '1.0'
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - "~>"
83
83
  - !ruby/object:Gem::Version
84
- version: '0.8'
84
+ version: '1.0'
85
85
  - !ruby/object:Gem::Dependency
86
- name: typhoeus
86
+ name: jeweler
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - "~>"
90
90
  - !ruby/object:Gem::Version
91
- version: '0.6'
92
- type: :runtime
91
+ version: '2.0'
92
+ type: :development
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - "~>"
97
97
  - !ruby/object:Gem::Version
98
- version: '0.6'
98
+ version: '2.0'
99
99
  - !ruby/object:Gem::Dependency
100
- name: cri
100
+ name: simplecov
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - "~>"
104
104
  - !ruby/object:Gem::Version
105
- version: '2.6'
106
- type: :runtime
105
+ version: '0.8'
106
+ type: :development
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - "~>"
111
111
  - !ruby/object:Gem::Version
112
- version: '2.6'
112
+ version: '0.8'
113
113
  description: Command line interface to Unipept web services.
114
114
  email: unipept@ugent.be
115
115
  executables: