unipept 2.2.2 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8f3ce5867e19149483ab70e24d4cc5da97d8ba9e62e38491b714abc89078ee0
4
- data.tar.gz: '09cfcdbc3608ee36a75825e7f7555add797b002e3abccc5caada703efc8d0b86'
3
+ metadata.gz: b4684d01b8ed753c705e56cc82f59783cd8f4bdf2ebb6fd9d5ddc5e2cb6ff84b
4
+ data.tar.gz: 3ce7f3443ba3047aa4f54e09b9ad872b34a9f72df0a32d929c3967294a821ff7
5
5
  SHA512:
6
- metadata.gz: e29aa64adf5a502377c2fdedb63969d29fa6f8d517262d65ec0a99b40746bf0a1d3d5a26552dd25cd425008d0f8a0f4ed7bd69ec6786d77ef2c688ce0e5b7c5d
7
- data.tar.gz: 9d6d08532a96fb85423a7843745df5fe75f125e6f7119f6ba2b76f525b75bd057aac7d27a0a5c1e6357df5aed0af42bb00a9fd260aa3be58f623dc75dc3da7b4
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.8.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.15.0)
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.4)
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.1.0)
60
+ parser (3.1.2.0)
60
61
  ast (~> 2.4.1)
61
- psych (4.0.3)
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.3.0)
72
+ regexp_parser (2.5.0)
72
73
  rexml (3.2.5)
73
- rubocop (1.27.0)
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.16.0, < 2.0)
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.17.0)
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.1)
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.1.0)
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
- 2.2.2
1
+ 3.0.2
@@ -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
@@ -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://www.uniprot.org/uniprot/#{accession}.#{format}")
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
@@ -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.2 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.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-04-13"
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.1.4".freeze
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: 2.2.2
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-04-13 00:00:00.000000000 Z
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.1.4
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.