diff --git a/ext/gnparser-arm-linux b/ext/gnparser-arm-linux new file mode 100755 index 0000000..faab435 Binary files /dev/null and b/ext/gnparser-arm-linux differ diff --git a/ext/gnparser-linux b/ext/gnparser-arm-mac similarity index 61% rename from ext/gnparser-linux rename to ext/gnparser-arm-mac index b930d13..57e8827 100755 Binary files a/ext/gnparser-linux and b/ext/gnparser-arm-mac differ diff --git a/ext/gnparser-win.exe b/ext/gnparser-x86-linux similarity index 62% rename from ext/gnparser-win.exe rename to ext/gnparser-x86-linux index 9cc6dc3..e848ead 100755 Binary files a/ext/gnparser-win.exe and b/ext/gnparser-x86-linux differ diff --git a/ext/gnparser-x86-mac b/ext/gnparser-x86-mac new file mode 100755 index 0000000..57e8827 Binary files /dev/null and b/ext/gnparser-x86-mac differ diff --git a/ext/gnparser-mac b/ext/gnparser-x86-win.exe similarity index 54% rename from ext/gnparser-mac rename to ext/gnparser-x86-win.exe index 1671e2a..3fa4498 100755 Binary files a/ext/gnparser-mac and b/ext/gnparser-x86-win.exe differ diff --git a/lib/biodiversity/parser/gnparser.rb b/lib/biodiversity/parser/gnparser.rb index f98c618..95d1036 100644 --- a/lib/biodiversity/parser/gnparser.rb +++ b/lib/biodiversity/parser/gnparser.rb @@ -48,8 +48,20 @@ def start_gnparser else raise "Unsupported platform: #{Gem.platforms[1].os}" end + + target_cpu = RbConfig::CONFIG['target_cpu'] + cpu_arch = + case target_cpu + when /x86/ + 'x86' + when /arch|arm/ + 'arm' + else + raise "Unsupported CPU Architecture: #{target_cpu}" + end + path = File.join(__dir__, '..', '..', '..', - 'ext', "gnparser-#{platform_suffix}") + 'ext', "gnparser-#{cpu_arch}-#{platform_suffix}") @stdin, @stdout = Open3.popen2( "#{path} --format #{format} --details --quiet --stream --jobs 1 #{@extra_settings}" diff --git a/lib/biodiversity/version.rb b/lib/biodiversity/version.rb index 710d8b2..4e78851 100644 --- a/lib/biodiversity/version.rb +++ b/lib/biodiversity/version.rb @@ -2,8 +2,8 @@ # Biodiversity module provides a namespace for scientific name parser. module Biodiversity - VERSION = '6.0.0' - GNPARSER_VERSION = 'GNparser 1.10.1' + VERSION = '6.0.1' + GNPARSER_VERSION = 'GNparser 1.10.3' def self.version VERSION