unipept 2.2.2 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -0
- data/Gemfile.lock +16 -13
- data/VERSION +1 -1
- data/lib/commands/unipept/api_runner.rb +1 -1
- data/lib/commands/unipept/taxa2tree.rb +1 -1
- data/lib/commands/uniprot.rb +1 -1
- data/lib/server_message.rb +1 -1
- data/test/commands/unipept/test_api_runner.rb +1 -1
- data/test/support/api_stub.rb +4 -4
- data/test/test_server_message.rb +1 -1
- data/unipept.gemspec +6 -4
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4684d01b8ed753c705e56cc82f59783cd8f4bdf2ebb6fd9d5ddc5e2cb6ff84b
|
4
|
+
data.tar.gz: 3ce7f3443ba3047aa4f54e09b9ad872b34a9f72df0a32d929c3967294a821ff7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e381846d62f44b1dae4855fbce2fa732ec84de0f545573a64eecb9e72a4d418acb66b3a60b49c94797835419c7f8efdd8c6a738d0c9eaf1139a5ba897c5cb1b6
|
7
|
+
data.tar.gz: f4ccfaf31feac1b4a4547ae8f8b3d50ccf55462a883a04813983ff0c76744e3c7afeefc0921250b6ab13dff439964b7c16b56c62d9257a23ff0cd9368f7ba3c8
|
data/Gemfile
CHANGED
@@ -4,6 +4,9 @@ source 'http://rubygems.org'
|
|
4
4
|
gem 'cri', '~>2.15.10'
|
5
5
|
gem 'typhoeus', '~> 1.3.1'
|
6
6
|
|
7
|
+
# this is not explicitly used, but an older incompatible version comes bundled with ruby
|
8
|
+
gem 'psych', '~> 4.0.3'
|
9
|
+
|
7
10
|
group :development do
|
8
11
|
gem 'minitest', '~> 5.14'
|
9
12
|
gem 'rake', '~> 13.0.1'
|
data/Gemfile.lock
CHANGED
@@ -16,7 +16,7 @@ GEM
|
|
16
16
|
ruby2_keywords
|
17
17
|
faraday-net_http (1.0.1)
|
18
18
|
ffi (1.12.1)
|
19
|
-
git (1.
|
19
|
+
git (1.11.0)
|
20
20
|
rchardet (~> 1.8)
|
21
21
|
github_api (0.19.0)
|
22
22
|
addressable (~> 2.4)
|
@@ -26,6 +26,7 @@ GEM
|
|
26
26
|
oauth2 (~> 1.0)
|
27
27
|
hashie (3.6.0)
|
28
28
|
highline (2.0.3)
|
29
|
+
json (2.6.2)
|
29
30
|
juwelier (2.4.9)
|
30
31
|
builder
|
31
32
|
bundler
|
@@ -42,11 +43,11 @@ GEM
|
|
42
43
|
kamelcase (0.0.2)
|
43
44
|
semver2 (~> 3)
|
44
45
|
mini_portile2 (2.8.0)
|
45
|
-
minitest (5.
|
46
|
+
minitest (5.16.2)
|
46
47
|
multi_json (1.15.0)
|
47
48
|
multi_xml (0.6.0)
|
48
49
|
multipart-post (2.1.1)
|
49
|
-
nokogiri (1.13.
|
50
|
+
nokogiri (1.13.6)
|
50
51
|
mini_portile2 (~> 2.8.0)
|
51
52
|
racc (~> 1.4)
|
52
53
|
oauth2 (1.4.4)
|
@@ -56,39 +57,40 @@ GEM
|
|
56
57
|
multi_xml (~> 0.5)
|
57
58
|
rack (>= 1.2, < 3)
|
58
59
|
parallel (1.22.1)
|
59
|
-
parser (3.1.
|
60
|
+
parser (3.1.2.0)
|
60
61
|
ast (~> 2.4.1)
|
61
|
-
psych (4.0.
|
62
|
+
psych (4.0.4)
|
62
63
|
stringio
|
63
64
|
public_suffix (4.0.6)
|
64
65
|
racc (1.6.0)
|
65
|
-
rack (2.2.3)
|
66
|
+
rack (2.2.3.1)
|
66
67
|
rainbow (3.1.1)
|
67
68
|
rake (13.0.6)
|
68
69
|
rchardet (1.8.0)
|
69
70
|
rdoc (6.4.0)
|
70
71
|
psych (>= 4.0.0)
|
71
|
-
regexp_parser (2.
|
72
|
+
regexp_parser (2.5.0)
|
72
73
|
rexml (3.2.5)
|
73
|
-
rubocop (1.
|
74
|
+
rubocop (1.31.2)
|
75
|
+
json (~> 2.3)
|
74
76
|
parallel (~> 1.10)
|
75
77
|
parser (>= 3.1.0.0)
|
76
78
|
rainbow (>= 2.2.2, < 4.0)
|
77
79
|
regexp_parser (>= 1.8, < 3.0)
|
78
|
-
rexml
|
79
|
-
rubocop-ast (>= 1.
|
80
|
+
rexml (>= 3.2.5, < 4.0)
|
81
|
+
rubocop-ast (>= 1.18.0, < 2.0)
|
80
82
|
ruby-progressbar (~> 1.7)
|
81
83
|
unicode-display_width (>= 1.4.0, < 3.0)
|
82
|
-
rubocop-ast (1.
|
84
|
+
rubocop-ast (1.18.0)
|
83
85
|
parser (>= 3.1.1.0)
|
84
86
|
ruby-progressbar (1.11.0)
|
85
87
|
ruby2_keywords (0.0.4)
|
86
88
|
semver2 (3.4.2)
|
87
|
-
stringio (3.0.
|
89
|
+
stringio (3.0.2)
|
88
90
|
thread_safe (0.3.6)
|
89
91
|
typhoeus (1.3.1)
|
90
92
|
ethon (>= 0.9.0)
|
91
|
-
unicode-display_width (2.
|
93
|
+
unicode-display_width (2.2.0)
|
92
94
|
|
93
95
|
PLATFORMS
|
94
96
|
ruby
|
@@ -97,6 +99,7 @@ DEPENDENCIES
|
|
97
99
|
cri (~> 2.15.10)
|
98
100
|
juwelier
|
99
101
|
minitest (~> 5.14)
|
102
|
+
psych (~> 4.0.3)
|
100
103
|
rake (~> 13.0.1)
|
101
104
|
rubocop (~> 1.11)
|
102
105
|
typhoeus (~> 1.3.1)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.0.2
|
@@ -14,7 +14,7 @@ module Unipept::Commands
|
|
14
14
|
|
15
15
|
if options[:format] == 'html'
|
16
16
|
# Overwrite the URL for this command, since it's possible that it uses HTML generated by the server.
|
17
|
-
@url = "#{@host}/api/
|
17
|
+
@url = "#{@host}/api/v2/#{cmd.name}.html"
|
18
18
|
elsif args[:format] == 'url'
|
19
19
|
@link = true
|
20
20
|
end
|
data/lib/commands/uniprot.rb
CHANGED
@@ -60,7 +60,7 @@ module Unipept::Commands
|
|
60
60
|
get_uniprot_entry(accession, 'fasta').lines.map(&:chomp)[1..].join
|
61
61
|
else
|
62
62
|
# other format has been specified, just download and output
|
63
|
-
resp = Typhoeus.get("https://
|
63
|
+
resp = Typhoeus.get("https://rest.uniprot.org/uniprotkb/#{accession}.#{format}")
|
64
64
|
resp.response_body if resp.success?
|
65
65
|
end
|
66
66
|
end
|
data/lib/server_message.rb
CHANGED
@@ -13,7 +13,7 @@ module Unipept
|
|
13
13
|
assert_equal('test_host', runner.options[:host])
|
14
14
|
assert_equal(%w[a b c], runner.arguments)
|
15
15
|
assert(!runner.configuration.nil?)
|
16
|
-
assert_equal('http://test_host/api/
|
16
|
+
assert_equal('http://test_host/api/v2/test.json', runner.url)
|
17
17
|
assert(/Unipept CLI - unipept [0-9]*\.[0-9]*\.[0-9]*/.match runner.user_agent)
|
18
18
|
end
|
19
19
|
|
data/test/support/api_stub.rb
CHANGED
@@ -15,7 +15,7 @@ class ApiStub
|
|
15
15
|
|
16
16
|
def setup_endpoint(name)
|
17
17
|
items = JSON.parse(File.read(File.join(File.dirname(__FILE__), "resources/#{name}.json")))
|
18
|
-
Typhoeus.stub("http://api.unipept.ugent.be/api/
|
18
|
+
Typhoeus.stub("http://api.unipept.ugent.be/api/v2/#{name}.json").and_return do |req|
|
19
19
|
peptides = req.options[:body][:input]
|
20
20
|
|
21
21
|
filtered = items.select { |item| peptides.include? item['peptide'] }
|
@@ -25,7 +25,7 @@ class ApiStub
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def setup_taxa2lca
|
28
|
-
Typhoeus.stub('http://api.unipept.ugent.be/api/
|
28
|
+
Typhoeus.stub('http://api.unipept.ugent.be/api/v2/taxa2lca.json').and_return(
|
29
29
|
Typhoeus::Response.new(code: 200, body: '{
|
30
30
|
"taxon_id": 1678,
|
31
31
|
"taxon_name": "Bifidobacterium",
|
@@ -36,7 +36,7 @@ class ApiStub
|
|
36
36
|
|
37
37
|
def setup_taxonomy
|
38
38
|
items = JSON.parse(File.read(File.join(File.dirname(__FILE__), 'resources/taxonomy.json')))
|
39
|
-
Typhoeus.stub('http://api.unipept.ugent.be/api/
|
39
|
+
Typhoeus.stub('http://api.unipept.ugent.be/api/v2/taxonomy.json').and_return do |req|
|
40
40
|
taxa = req.options[:body][:input].map(&:to_i)
|
41
41
|
|
42
42
|
filtered = items.select { |item| taxa.include? item['taxon_id'] }
|
@@ -47,7 +47,7 @@ class ApiStub
|
|
47
47
|
|
48
48
|
# Expects to be called with taxa "78", "57", "89", "28" and "67"
|
49
49
|
def setup_taxa2tree
|
50
|
-
Typhoeus.stub('http://api.unipept.ugent.be/api/
|
50
|
+
Typhoeus.stub('http://api.unipept.ugent.be/api/v2/taxa2tree.json').and_return do |_|
|
51
51
|
link = req.options[:body][:link] == 'true'
|
52
52
|
if link
|
53
53
|
Typhoeus::Response.new(code: 200, body: JSON.dump(gist: 'https://gist.github.com/8837824df7ef9831a9b4216f3fb547ee'))
|
data/test/test_server_message.rb
CHANGED
@@ -3,7 +3,7 @@ require_relative '../lib/server_message'
|
|
3
3
|
module Unipept
|
4
4
|
class ServerMessageTestCase < Unipept::TestCase
|
5
5
|
def test_init
|
6
|
-
assert_equal('http://test_host/api/
|
6
|
+
assert_equal('http://test_host/api/v2/messages.json', ServerMessage.new('http://test_host').message_url)
|
7
7
|
end
|
8
8
|
|
9
9
|
def test_fetch_server_message
|
data/unipept.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: unipept
|
5
|
+
# stub: unipept 3.0.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "unipept".freeze
|
9
|
-
s.version = "
|
9
|
+
s.version = "3.0.2"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Bart Mesuere".freeze, "Pieter Verschaffelt".freeze, "Toon Willems".freeze, "Tom Naessens".freeze]
|
14
|
-
s.date = "2022-
|
14
|
+
s.date = "2022-07-08"
|
15
15
|
s.description = " Command line interface to the Unipept (http://unipept.ugent.be) web services\n (pept2lca, taxa2lca, pept2taxa, pept2prot and taxonomy) and some utility\n commands for handling proteins using the command line.\n".freeze
|
16
16
|
s.email = "unipept@ugent.be".freeze
|
17
17
|
s.executables = ["unipept".freeze, "prot2pept".freeze, "peptfilter".freeze, "uniprot".freeze]
|
@@ -105,7 +105,7 @@ Gem::Specification.new do |s|
|
|
105
105
|
s.homepage = "http://unipept.ugent.be".freeze
|
106
106
|
s.licenses = ["MIT".freeze]
|
107
107
|
s.required_ruby_version = Gem::Requirement.new(">= 2.6.0".freeze)
|
108
|
-
s.rubygems_version = "3.
|
108
|
+
s.rubygems_version = "3.3.7".freeze
|
109
109
|
s.summary = "Command line interface to Unipept web services.".freeze
|
110
110
|
|
111
111
|
if s.respond_to? :specification_version then
|
@@ -115,12 +115,14 @@ Gem::Specification.new do |s|
|
|
115
115
|
if s.respond_to? :add_runtime_dependency then
|
116
116
|
s.add_runtime_dependency(%q<cri>.freeze, ["~> 2.15.10"])
|
117
117
|
s.add_runtime_dependency(%q<typhoeus>.freeze, ["~> 1.3.1"])
|
118
|
+
s.add_runtime_dependency(%q<psych>.freeze, ["~> 4.0.3"])
|
118
119
|
s.add_development_dependency(%q<minitest>.freeze, ["~> 5.14"])
|
119
120
|
s.add_development_dependency(%q<rake>.freeze, ["~> 13.0.1"])
|
120
121
|
s.add_development_dependency(%q<rubocop>.freeze, ["~> 1.11"])
|
121
122
|
else
|
122
123
|
s.add_dependency(%q<cri>.freeze, ["~> 2.15.10"])
|
123
124
|
s.add_dependency(%q<typhoeus>.freeze, ["~> 1.3.1"])
|
125
|
+
s.add_dependency(%q<psych>.freeze, ["~> 4.0.3"])
|
124
126
|
s.add_dependency(%q<minitest>.freeze, ["~> 5.14"])
|
125
127
|
s.add_dependency(%q<rake>.freeze, ["~> 13.0.1"])
|
126
128
|
s.add_dependency(%q<rubocop>.freeze, ["~> 1.11"])
|
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:
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bart Mesuere
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2022-
|
14
|
+
date: 2022-07-08 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: cri
|
@@ -41,6 +41,20 @@ dependencies:
|
|
41
41
|
- - "~>"
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: 1.3.1
|
44
|
+
- !ruby/object:Gem::Dependency
|
45
|
+
name: psych
|
46
|
+
requirement: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - "~>"
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 4.0.3
|
51
|
+
type: :runtime
|
52
|
+
prerelease: false
|
53
|
+
version_requirements: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - "~>"
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: 4.0.3
|
44
58
|
- !ruby/object:Gem::Dependency
|
45
59
|
name: minitest
|
46
60
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
212
|
- !ruby/object:Gem::Version
|
199
213
|
version: '0'
|
200
214
|
requirements: []
|
201
|
-
rubygems_version: 3.
|
215
|
+
rubygems_version: 3.3.7
|
202
216
|
signing_key:
|
203
217
|
specification_version: 4
|
204
218
|
summary: Command line interface to Unipept web services.
|