Module: PoolParty::Binary
- Defined in:
- lib/poolparty/helpers/binary.rb
Class Method Summary collapse
- .available_binaries_for(ty = "pool") ⇒ Object
- .binary_directory ⇒ Object
-
.daemonize(&block) ⇒ Object
Daemonize the process.
-
.get_existing_spec_location ⇒ Object
These are the locations the spec file can be before the cloud aborts because it cannot load the cloud.
- .list_binaries_for(ty = "pool") ⇒ Object
Class Method Details
.available_binaries_for(ty = "pool") ⇒ Object
41 42 43 |
# File 'lib/poolparty/helpers/binary.rb', line 41 def available_binaries_for(ty="pool") Dir["#{binary_directory}/#{ty}-*"].map {|a| File.basename(a.gsub(/#{ty}-/, '')) }.sort end |
.binary_directory ⇒ Object
44 45 46 |
# File 'lib/poolparty/helpers/binary.rb', line 44 def binary_directory "#{::File.dirname(__FILE__)}/../../../bin" end |
.daemonize(&block) ⇒ Object
Daemonize the process
63 64 65 |
# File 'lib/poolparty/helpers/binary.rb', line 63 def daemonize(&block) Daemonize.daemonize(&block) end |
.get_existing_spec_location ⇒ Object
These are the locations the spec file can be before the cloud aborts because it cannot load the cloud
49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/poolparty/helpers/binary.rb', line 49 def get_existing_spec_location [ "#{Dir.pwd}/#{Default.default_specfile_name}", Dir["#{Dir.pwd}/*/#{Default.default_specfile_name}"], "#{Default.remote_storage_path}/#{Default.default_specfile_name}", "#{Default.default_specfile_name}", "#{Default.base_config_directory}/#{Default.default_specfile_name}", "#{Default.poolparty_home_path}/#{Default.default_specfile_name}", ENV["POOL_SPEC"] ].flatten.reject {|a| a.nil?}.reject do |f| f unless ::File.readable?(f) end.first end |
.list_binaries_for(ty = "pool") ⇒ Object
38 39 40 |
# File 'lib/poolparty/helpers/binary.rb', line 38 def list_binaries_for(ty="pool") available_binaries_for(ty).join(", ") end |