Sha256: 6cc226762bee6885f96598b401681cc8543a2a47caa393b94aa7b17ac72b4860
Contents?: true
Size: 343 Bytes
Versions: 3
Compression:
Stored size: 343 Bytes
Contents
require 'shellwords' module Mate module Bin class << self def v2 mate_version(/^mate 2.\d+/) or abort 'Can\'t find mate binary v2' end private def mate_version(regexp) IO.popen('which -a mate', &:readlines).map(&:strip).find{ |bin| `#{bin.shellescape} -v` =~ regexp } end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mate-3.2.0 | lib/mate/bin.rb |
mate-3.1.0 | lib/mate/bin.rb |
mate-3.0.0 | lib/mate/bin.rb |