Sha256: 8708101cf5932d0da5a1800d0da49c7417208933096eff43f63a99c9a7bacbf4

Contents?: true

Size: 936 Bytes

Versions: 26

Compression:

Stored size: 936 Bytes

Contents

require "ftools"
module PoolParty
  module Binary
    
    class << self
            
      def list_binaries_for(ty="pool")
        available_binaries_for(ty).join(", ")
      end
      def available_binaries_for(ty="pool")
        Dir["#{binary_directory}/#{ty}-*"].map {|a| File.basename(a.gsub(/#{ty}-/, '')) }.sort
      end
      def binary_directory
        "#{::File.dirname(__FILE__)}/../../../bin"
      end
      def get_existing_spec_location
        [                            
            "#{Base.base_config_directory}/#{Base.default_specfile_name}",
            "#{Base.remote_storage_path}/#{Base.default_specfile_name}", 
            ENV["POOL_SPEC"],
            "#{Base.default_specfile_name}",
            "#{Base.storage_directory}/#{Base.default_specfile_name}",            
        ].reject {|a| a.nil?}.reject do |f|
          f unless ::File.file?(f)
        end.first
      end
      
    end
    
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
auser-poolparty-0.2.15 lib/poolparty/helpers/binary.rb
auser-poolparty-0.2.16 lib/poolparty/helpers/binary.rb
auser-poolparty-0.2.20 lib/poolparty/helpers/binary.rb
auser-poolparty-0.2.21 lib/poolparty/helpers/binary.rb
auser-poolparty-0.2.22 lib/poolparty/helpers/binary.rb
auser-poolparty-0.2.23 lib/poolparty/helpers/binary.rb
auser-poolparty-0.2.24 lib/poolparty/helpers/binary.rb
auser-poolparty-0.2.25 lib/poolparty/helpers/binary.rb
auser-poolparty-0.2.26 lib/poolparty/helpers/binary.rb
auser-poolparty-0.2.3 lib/poolparty/helpers/binary.rb
auser-poolparty-0.2.35 lib/poolparty/helpers/binary.rb
auser-poolparty-0.2.36 lib/poolparty/helpers/binary.rb
auser-poolparty-0.2.37 lib/poolparty/helpers/binary.rb
auser-poolparty-0.2.38 lib/poolparty/helpers/binary.rb
auser-poolparty-0.2.39 lib/poolparty/helpers/binary.rb
auser-poolparty-0.2.4 lib/poolparty/helpers/binary.rb
auser-poolparty-0.2.40 lib/poolparty/helpers/binary.rb
auser-poolparty-0.2.41 lib/poolparty/helpers/binary.rb
auser-poolparty-0.2.42 lib/poolparty/helpers/binary.rb
auser-poolparty-0.2.44 lib/poolparty/helpers/binary.rb