Class: Conjure::Command

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Command

Returns a new instance of Command.



8
9
10
11
# File 'lib/conjure/command.rb', line 8

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

Instance Attribute Details

#application_optionsObject

Returns the value of attribute application_options.



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

def application_options
  @application_options
end

Instance Method Details

#consoleObject



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

def console
  application.rails.console
end

#deployObject



17
18
19
20
21
22
23
24
# File 'lib/conjure/command.rb', line 17

def deploy
  self.application_options = {
    :branch => options[:branch],
    :test => options[:test],
    :origin => options[:origin],
  }
  application.deploy
end

#export(file) ⇒ Object



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

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

#import(file) ⇒ Object



27
28
29
# File 'lib/conjure/command.rb', line 27

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

#logObject



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

def log
  application.rails.log :lines => options[:num], :tail => options[:tail]
end

#rake(*arguments) ⇒ Object



44
45
46
# File 'lib/conjure/command.rb', line 44

def rake(*arguments)
  application.rails.rake arguments.join(" ")
end