Sha256: bfbafa744e4c2e6dee7301081b8266c607130df656b91d154aa51d244b599fbf

Contents?: true

Size: 699 Bytes

Versions: 4

Compression:

Stored size: 699 Bytes

Contents

Execute.define_task do
desc "console [environment]", "run rhoconnect console"
  def console(environment=nil)
    ENV['RACK_ENV'] = environment || 'development'
    application_file = ruby19? ? './application' : 'application'    
    invoke :config
    if RedisRunner.running?
      system "irb -rubygems -r #{File.join(File.dirname(__FILE__),'console_helper')} " +
        "-r #{File.join(File.dirname(__FILE__), '..', '..', 'lib', 'rhoconnect') } " +
        "-r #{application_file}"
    else
      redis_config = "#{$redis_options[:host]}:#{$redis_options[:port]}"
      puts "Redis is not running on #{redis_config}. Please start it by running 'rhoconnect redis-start' command."
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rhoconnect-3.4.5 commands/rhoconnect_console/console.rb
rhoconnect-3.4.4 commands/rhoconnect_console/console.rb
rhoconnect-3.4.3 commands/rhoconnect_console/console.rb
rhoconnect-3.4.2 commands/rhoconnect_console/console.rb