unipept 2.2.2 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/commands/unipept/api_runner.rb +1 -1
- data/lib/commands/unipept/taxa2tree.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 +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1dfd4f81d97870e20ecaeea0cc3e047667a70e556d0ea3c1d39b729dcd6dd7b2
|
4
|
+
data.tar.gz: f2227172f0b5cfb7ec80d2ae00181749d7e00667ec88332fb43775be42e3c6fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07f29c4d733ebe355d922ab199eaf092ad63b010cfe9aa079167f83384fc4c20255e7ca3caad619c8dabff5a4646a4aa742084eb6df25bb90b591435160a6473
|
7
|
+
data.tar.gz: 7f166594e85b531205ed3044125f2dc6782fdd461404feac059ea616ebc08a80887f991bbb39310aa75de248494c493454b937099558a2234fec666e9afba462
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.0.0
|
@@ -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/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.0 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.0"
|
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-04-
|
14
|
+
s.date = "2022-04-14"
|
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]
|
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.0
|
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-04-
|
14
|
+
date: 2022-04-14 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: cri
|