Sha256: a4fd5076b5d31b29d6e5a77d5a2cb94d7ac1852ca2763acaba1dc4dd1f8e41c9

Contents?: true

Size: 708 Bytes

Versions: 1

Compression:

Stored size: 708 Bytes

Contents

# -*- ruby -*-

require 'laag/library' # MIT License

module LAAG
  LIBZMQ_GEM_ROOT = File.expand_path(File.join(__dir__, %w[.. ..]))
  LIBZMQ_ORIGIN   = 'github.com/zeromq/libzmq'
  LIBZMQ_VERSION  = (
    $LOADED_FEATURES
      .map { |f| f.match %r{/laag-libzmq-(?<version>[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)} }
      .compact
      .map { |gem| gem['version'] }
      .uniq
      .first
  ) || (
    File
      .basename(LIBZMQ_GEM_ROOT)
      .match(%r{^laag-libzmq-(?<version>[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)})['version']
  )

  def self.libzmq
    @@libzmq ||= Library.new(
      gem_root: LIBZMQ_GEM_ROOT,
      origin:   LIBZMQ_ORIGIN,
      version:  LIBZMQ_VERSION
    )
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
laag-libzmq-4.2.3.2 lib/laag/libzmq.rb