genevalidatorapp 2.1.7 → 2.1.8
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 +4 -4
- data/lib/genevalidatorapp.rb +17 -2
- data/lib/genevalidatorapp/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8c55cdbae6d48fbf506a703f06e2a99d7c06453834dc7d084bc94ad732b0168e
|
|
4
|
+
data.tar.gz: d39e39a309b8f425ae949871f6cf6866003a73fd9e0ca15061d70a824c41622d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9d6a43a16780ea12b2b58d667f2f6993f297a4d1b3d558d2991ae3b02bbce261374d614514c2a4f77fce4889999231e11796608273e46ea4d074e4969c19e5c8
|
|
7
|
+
data.tar.gz: e4fde6e584511ebd4dfce98b3f8b943da1bf3e8c44dd3d31ae5c881bb2a69742803bcf2e8c548609fda8edbd44598a33065dd3ec1ed52cbf0aecf4ff2829bb12
|
data/lib/genevalidatorapp.rb
CHANGED
|
@@ -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.
|
|
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
|
-
|
|
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
|
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.
|
|
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:
|
|
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.
|
|
218
|
+
rubygems_version: 2.7.6
|
|
219
219
|
signing_key:
|
|
220
220
|
specification_version: 4
|
|
221
221
|
summary: A Web App wrapper for GeneValidator.
|