Sha256: 679bb26d81b71e5247870f0cc16a6ba4ce73c96d9b8ad78d9b609251d2bc9fa2

Contents?: true

Size: 951 Bytes

Versions: 21

Compression:

Stored size: 951 Bytes

Contents

Execute.define_task do
desc "console [environment]", "Run rhoconnect console"
  def console(environment=nil)
    ENV['RACK_ENV'] = environment || 'development'
    controller_file = (File.exist?(File.join(Dir.pwd, 'controllers', 'ruby', 'application_controller.rb'))) ?
      File.join(Dir.pwd, 'controllers', 'ruby', 'application_controller.rb') :
      File.join(File.dirname(__FILE__), '..', '..', 'generators', 'templates', 'application', 'controllers', 'ruby', 'application_controller.rb')

    if RedisRunner.running?
      system "irb -rubygems -r #{File.join(File.dirname(__FILE__),'console_helper')} " +
        "-r #{File.join(File.dirname(__FILE__), '..', '..', 'lib', 'rhoconnect') } " +
        "-r #{File.join(File.dirname(__FILE__), '..', '..', 'lib', 'rhoconnect', 'server') } " +
        "-r #{controller_file}"
    else
      puts "Redis is not running. Please start it by running 'rhoconnect redis-start' command."
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
rhoconnect-7.6.0 commands/rhoconnect_console/console.rb
rhoconnect-7.5.1 commands/rhoconnect_console/console.rb
rhoconnect-7.4.1 commands/rhoconnect_console/console.rb
rhoconnect-7.1.17 commands/rhoconnect_console/console.rb
rhoconnect-6.2.0 commands/rhoconnect_console/console.rb
rhoconnect-6.0.11 commands/rhoconnect_console/console.rb
rhoconnect-5.5.18 commands/rhoconnect_console/console.rb
rhoconnect-5.5.17 commands/rhoconnect_console/console.rb
rhoconnect-5.5.15 commands/rhoconnect_console/console.rb
rhoconnect-5.5.0.22 commands/rhoconnect_console/console.rb
rhoconnect-5.5.2 commands/rhoconnect_console/console.rb
rhoconnect-5.5.0.7 commands/rhoconnect_console/console.rb
rhoconnect-5.5.0.3 commands/rhoconnect_console/console.rb
rhoconnect-5.5.0 commands/rhoconnect_console/console.rb
rhoconnect-5.1.1 commands/rhoconnect_console/console.rb
rhoconnect-4.0.4 commands/rhoconnect_console/console.rb
rhoconnect-4.0.3 commands/rhoconnect_console/console.rb
rhoconnect-4.0.2 commands/rhoconnect_console/console.rb
rhoconnect-4.0.1 commands/rhoconnect_console/console.rb
rhoconnect-4.0.0 commands/rhoconnect_console/console.rb