Class: Padrino::Cli::Base
- Inherits:
-
Thor
- Object
- Thor
- Padrino::Cli::Base
- Includes:
- Thor::Actions, Thor::RakeCompat
- Defined in:
- lib/kharites/mixins/server.rb
Instance Method Summary collapse
Instance Method Details
#console ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/kharites/mixins/server.rb', line 53 def console prepare :console require File.(File.dirname(__FILE__) + "/../version") ARGV.clear puts "=> Loading #{.environment} console (Padrino v.#{Padrino.version})" require 'irb' require "irb/completion" require 'config/boot' require File.(File.dirname(__FILE__) + '/console') IRB.start end |
#rake(*args) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/kharites/mixins/server.rb', line 37 def rake(*args) prepare :rake args << "-T" if [:list] args << [:list] unless [:list].nil? || [:list].to_s == "list" args << "--trace" if [:trace] args << "--verbose" if [:verbose] ARGV.clear ARGV.concat(args) puts "=> Executing Rake #{ARGV.join(' ')} ..." ENV['PADRINO_LOG_LEVEL'] ||= "test" require File.(File.dirname(__FILE__) + '/rake') silence(:stdout) { require 'config/boot' } PadrinoTasks.init end |
#start ⇒ Object
19 20 21 22 23 24 |
# File 'lib/kharites/mixins/server.rb', line 19 def start prepare :start require File.(File.dirname(__FILE__) + "/adapter") require 'config/boot' Padrino::Cli::Adapter.start() end |
#stop ⇒ Object
27 28 29 30 |
# File 'lib/kharites/mixins/server.rb', line 27 def stop require File.(File.dirname(__FILE__) + "/adapter") Padrino::Cli::Adapter.stop end |
#version ⇒ Object
67 68 69 70 |
# File 'lib/kharites/mixins/server.rb', line 67 def version require 'padrino-core/version' puts "Padrino v. #{Padrino.version}" end |