Sha256: f33f96460b67d8bf133f17c7e52ae59b69dc003bce4d341658aad56169bf2168

Contents?: true

Size: 455 Bytes

Versions: 2

Compression:

Stored size: 455 Bytes

Contents

# frozen_string_literal: true

# Helpers for external library dependencies.
module LibraryHelpers
  LIBSECP256K1_ENVVAR = 'SECP256K1_LIB_PATH'.freeze

  # Help configure path to libsecp256k1. Automatically handles setting path to
  # build output if present.
  def self.configure_libsecp256k1
    return if ENV[LIBSECP256K1_ENVVAR]
    return unless File.exist?('secp256k1.so')

    ENV[LIBSECP256K1_ENVVAR] = File.join(Dir.pwd, 'secp256k1.so')
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bitcoin-ruby-0.0.20 spec/helpers/library_helpers.rb
bitcoin-ruby-0.0.19 spec/helpers/library_helpers.rb