genevalidatorapp 2.1.7 → 2.1.8

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: 4281aed95e4b44abf62ad3631347e45568708ac6522124e766e65a540ec32f57
4
- data.tar.gz: e1a05add24deb954ff084539e878ec1a3884d49092a6e0c3d00c0da8bfef5fe2
3
+ metadata.gz: 8c55cdbae6d48fbf506a703f06e2a99d7c06453834dc7d084bc94ad732b0168e
4
+ data.tar.gz: d39e39a309b8f425ae949871f6cf6866003a73fd9e0ca15061d70a824c41622d
5
5
  SHA512:
6
- metadata.gz: 2f7cae72b1489e8615f6293fef6895b2d131a6ed4a189a42d9b5b4f41390a69db982ee245fff6aea4b426e9a7b4f585aa565911af1345d9a96b4289fe95e1bf6
7
- data.tar.gz: a3a27f1e54d2631b720032d6ca41b148f6ca7683aca3c2e5872d3b7f90de9af349376313cefc5b84b14aa5fdd301d54a7f34fdebec78d322da943da361e6fa73
6
+ metadata.gz: 9d6a43a16780ea12b2b58d667f2f6993f297a4d1b3d558d2991ae3b02bbce261374d614514c2a4f77fce4889999231e11796608273e46ea4d074e4969c19e5c8
7
+ data.tar.gz: e4fde6e584511ebd4dfce98b3f8b943da1bf3e8c44dd3d31ae5c881bb2a69742803bcf2e8c548609fda8edbd44598a33065dd3ec1ed52cbf0aecf4ff2829bb12
@@ -12,7 +12,7 @@ require 'genevalidatorapp/version'
12
12
 
13
13
  module GeneValidatorApp
14
14
  # Use a fixed minimum version of BLAST+
15
- MINIMUM_BLAST_VERSION = '2.2.30+'.freeze
15
+ MINIMUM_BLAST_VERSION = '2.11.0+'.freeze
16
16
 
17
17
  class << self
18
18
  def environment
@@ -208,7 +208,8 @@ module GeneValidatorApp
208
208
  def assert_blast_installed_and_compatible
209
209
  raise BLAST_NOT_INSTALLED unless command? 'blastdbcmd'
210
210
  version = `blastdbcmd -version`.split[1]
211
- raise BLAST_NOT_COMPATIBLE, version unless version >= MINIMUM_BLAST_VERSION
211
+ return if is_compatible(version, MINIMUM_BLAST_VERSION)
212
+ raise BLAST_NOT_COMPATIBLE, version
212
213
  end
213
214
 
214
215
  def assert_mafft_installed
@@ -249,5 +250,19 @@ module GeneValidatorApp
249
250
  def command?(command)
250
251
  system("which #{command} > /dev/null 2>&1")
251
252
  end
253
+
254
+ # Returns true if the given version is higher than the minimum expected
255
+ # version string.
256
+ def is_compatible(given, expected)
257
+ # The speceship operator (<=>) below returns -1, 0, 1 depending on
258
+ # on whether the left operand is lower, same, or higher than the
259
+ # right operand. We want the left operand to be the same or higher.
260
+ (parse_version(given) <=> parse_version(expected)) >= 0
261
+ end
262
+
263
+ # Turn version string into an arrary of its component numbers.
264
+ def parse_version(version_string)
265
+ version_string.split('.').map(&:to_i)
266
+ end
252
267
  end
253
268
  end
@@ -1,3 +1,3 @@
1
1
  module GeneValidatorApp
2
- VERSION = '2.1.7'.freeze
2
+ VERSION = '2.1.8'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: genevalidatorapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.7
4
+ version: 2.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Monica Dragan
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2018-09-05 00:00:00.000000000 Z
14
+ date: 2020-12-28 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: capybara
@@ -215,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
215
  version: '0'
216
216
  requirements: []
217
217
  rubyforge_project:
218
- rubygems_version: 2.7.7
218
+ rubygems_version: 2.7.6
219
219
  signing_key:
220
220
  specification_version: 4
221
221
  summary: A Web App wrapper for GeneValidator.