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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8f3ce5867e19149483ab70e24d4cc5da97d8ba9e62e38491b714abc89078ee0
4
- data.tar.gz: '09cfcdbc3608ee36a75825e7f7555add797b002e3abccc5caada703efc8d0b86'
3
+ metadata.gz: 1dfd4f81d97870e20ecaeea0cc3e047667a70e556d0ea3c1d39b729dcd6dd7b2
4
+ data.tar.gz: f2227172f0b5cfb7ec80d2ae00181749d7e00667ec88332fb43775be42e3c6fa
5
5
  SHA512:
6
- metadata.gz: e29aa64adf5a502377c2fdedb63969d29fa6f8d517262d65ec0a99b40746bf0a1d3d5a26552dd25cd425008d0f8a0f4ed7bd69ec6786d77ef2c688ce0e5b7c5d
7
- data.tar.gz: 9d6d08532a96fb85423a7843745df5fe75f125e6f7119f6ba2b76f525b75bd057aac7d27a0a5c1e6357df5aed0af42bb00a9fd260aa3be58f623dc75dc3da7b4
6
+ metadata.gz: 07f29c4d733ebe355d922ab199eaf092ad63b010cfe9aa079167f83384fc4c20255e7ca3caad619c8dabff5a4646a4aa742084eb6df25bb90b591435160a6473
7
+ data.tar.gz: 7f166594e85b531205ed3044125f2dc6782fdd461404feac059ea616ebc08a80887f991bbb39310aa75de248494c493454b937099558a2234fec666e9afba462
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.2
1
+ 3.0.0
@@ -10,7 +10,7 @@ module Unipept
10
10
 
11
11
  @host = host
12
12
  @user_agent = "Unipept CLI - unipept #{Unipept::VERSION}"
13
- @url = "#{@host}/api/v1/#{cmd.name}.json"
13
+ @url = "#{@host}/api/v2/#{cmd.name}.json"
14
14
  @fasta = false
15
15
  end
16
16
 
@@ -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/v1/#{cmd.name}.html"
17
+ @url = "#{@host}/api/v2/#{cmd.name}.html"
18
18
  elsif args[:format] == 'url'
19
19
  @link = true
20
20
  end
@@ -7,7 +7,7 @@ module Unipept
7
7
  attr_reader :message_url, :configuration
8
8
 
9
9
  def initialize(host)
10
- @message_url = "#{host}/api/v1/messages.json"
10
+ @message_url = "#{host}/api/v2/messages.json"
11
11
  @configuration = Unipept::Configuration.new
12
12
  end
13
13
 
@@ -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/v1/test.json', runner.url)
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
 
@@ -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/v1/#{name}.json").and_return do |req|
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/v1/taxa2lca.json').and_return(
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/v1/taxonomy.json').and_return do |req|
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/v1/taxa2tree.json').and_return do |_|
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'))
@@ -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/v1/messages.json', ServerMessage.new('http://test_host').message_url)
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 2.2.2 ruby lib
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 = "2.2.2"
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-13"
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: 2.2.2
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-13 00:00:00.000000000 Z
14
+ date: 2022-04-14 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: cri