Sha256: 8928f0236d58e910b9b6728a3ed672dc42743de147321d4d0b69d8569784458b

Contents?: true

Size: 1.03 KB

Versions: 8

Compression:

Stored size: 1.03 KB

Contents

#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"
require 'git-style-binary/command'

GitStyleBinary.command do
  banner <<-EOS
Usage: #{$0} #{all_options_string}

  Open an irb session with the clouds.rb loaded
EOS

  short_desc "Open an irb session with clouds.rb loaded"
  
  opt :inst_num, "The number of the instance to run bootstrap on", :type => :int

  run do |command|    
    
    irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'

    libs =  " -r irb/completion"
    # Perhaps use a console_lib to store any extra methods I may want available in the cosole
    # libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
    libs <<  " -r #{File.dirname(__FILE__) + '/../lib/poolparty.rb'}"
    f = command[:clouds_dot_rb]
    File.open("/tmp/console.rb", "w") {|f| f << "require '#{command[:clouds_dot_rb]}'\npool.auto_execute = false" }
    libs <<  " -r /tmp/console.rb"
    
    puts "Loading PoolParty console..."
    exec "#{irb} #{libs} --simple-prompt"
    
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
poolparty-1.4.7 bin/cloud-console
poolparty-1.4.6 bin/cloud-console
poolparty-1.4.5 bin/cloud-console
poolparty-1.4.4 bin/cloud-console
poolparty-1.4.3 bin/cloud-console
poolparty-1.4.2 bin/cloud-console
poolparty-1.4.1 bin/cloud-console
poolparty-1.4.0 bin/cloud-console