Sha256: c94b7ec7fa23240988080527a4e6c3a41e835f7e35e2ad1164171c6f31c40f66

Contents?: true

Size: 656 Bytes

Versions: 1

Compression:

Stored size: 656 Bytes

Contents

# -*- ruby -*-

require 'laag/library' # MIT License

module LAAG
  XZ_GEM_ROOT = File.expand_path(File.join(__dir__, %w[.. ..]))
  XZ_ORIGIN  = 'git.tukaani.org/xz'
  XZ_VERSION = (
    $LOADED_FEATURES
      .map { |f| f.match %r{/laag-xz-(?<version>[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)} }
      .compact
      .map { |gem| gem['version'] }
      .uniq
      .first
  ) || (
    File
      .basename(XZ_GEM_ROOT)
      .match(%r{^laag-xz-(?<version>[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)})['version']
  )

  def self.xz
    @@xz ||= Library.new(
      gem_root: XZ_GEM_ROOT,
      origin:   XZ_ORIGIN,
      version:  XZ_VERSION
    )
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
laag-xz-5.2.4.0 lib/laag/xz.rb