Class: Conjure::Command

Inherits:
Thor
  • Object
show all
Defined in:
lib/conjure/command.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Command

Returns a new instance of Command.



6
7
8
9
# File 'lib/conjure/command.rb', line 6

def initialize(*args)
  super
  Log.level = :debug if options[:verbose]
end

Instance Method Details

#consoleObject



47
48
49
50
51
# File 'lib/conjure/command.rb', line 47

def console
  Service::RailsConsole.new(:shell => deployment.shell) do |stdout|
    print stdout
  end
end

#deployObject



15
16
17
# File 'lib/conjure/command.rb', line 15

def deploy
  deployment.deploy
end

#export(file) ⇒ Object



25
26
27
# File 'lib/conjure/command.rb', line 25

def export(file)
  deployment.database.export file
end

#import(file) ⇒ Object



20
21
22
# File 'lib/conjure/command.rb', line 20

def import(file)
  deployment.database.import file
end

#logObject



32
33
34
35
36
# File 'lib/conjure/command.rb', line 32

def log
  Service::RailsLogView.new(:shell => deployment.shell, :lines => options[:num], :tail => options[:tail]) do |stdout|
    print stdout
  end
end

#rake(*arguments) ⇒ Object



39
40
41
42
43
44
# File 'lib/conjure/command.rb', line 39

def rake(*arguments)
  task = arguments.join(" ")
  Service::RakeTask.new(:task => task, :shell => deployment.shell) do |stdout|
    print stdout
  end
end