Class: Conjure::Command
- Inherits:
-
Thor
- Object
- Thor
- Conjure::Command
- Defined in:
- lib/conjure/command.rb
Instance Method Summary collapse
- #console ⇒ Object
- #create ⇒ Object
- #deploy ⇒ Object
- #export(file) ⇒ Object
- #import(file) ⇒ Object
-
#initialize(*args) ⇒ Command
constructor
A new instance of Command.
- #log ⇒ Object
- #rake(*arguments) ⇒ Object
- #show ⇒ Object
Constructor Details
Instance Method Details
#console ⇒ Object
55 56 57 58 59 |
# File 'lib/conjure/command.rb', line 55 def console Service::RailsConsole.new(:shell => target.existing_instance.shell) do |stdout| print stdout end end |
#create ⇒ Object
15 16 17 |
# File 'lib/conjure/command.rb', line 15 def create target.new_instance.create end |
#deploy ⇒ Object
23 24 25 |
# File 'lib/conjure/command.rb', line 23 def deploy (target.existing_instance || target.new_instance).deploy end |
#export(file) ⇒ Object
33 34 35 |
# File 'lib/conjure/command.rb', line 33 def export(file) target.existing_instance.database.export file end |
#import(file) ⇒ Object
28 29 30 |
# File 'lib/conjure/command.rb', line 28 def import(file) target.existing_instance.database.import file end |
#log ⇒ Object
40 41 42 43 44 |
# File 'lib/conjure/command.rb', line 40 def log Service::RailsLogView.new(:shell => target.existing_instance.shell, :rails_env => target.existing_instance.rails_env, :lines => [:num], :tail => [:tail]) do |stdout| print stdout end end |
#rake(*arguments) ⇒ Object
47 48 49 50 51 52 |
# File 'lib/conjure/command.rb', line 47 def rake(*arguments) task = arguments.join(" ") Service::RakeTask.new(:task => task, :shell => target.existing_instance.shell) do |stdout| print stdout end end |
#show ⇒ Object
62 63 64 |
# File 'lib/conjure/command.rb', line 62 def show puts View::ApplicationView.new(target.application).render end |