Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

vistahigherlearning / logstash   deb

Repository URL to install this package:

/ opt / logstash / vendor / bundle / jruby / 1.9 / gems / rbnacl-2.0.0 / lib / rbnacl / sodium / version.rb

require 'rbnacl/sodium'

module RbNaCl
  module Sodium
    module Version
      MINIMUM_LIBSODIUM_VERSION = "0.4.3"

      extend Sodium
      attach_function :sodium_version_string, [], :string

      STRING = sodium_version_string
      MAJOR, MINOR, PATCH = STRING.split(".").map(&:to_i)

      installed_version = [MAJOR, MINOR, PATCH]
      minimum_version   = MINIMUM_LIBSODIUM_VERSION.split(".").map(&:to_i)

      case installed_version <=> minimum_version
      when -1
        raise "Sorry, you need to install libsodium #{MINIMUM_LIBSODIUM_VERSION}+. You have #{Version::STRING} installed"
      end
    end
  end
end