Module: Decko::Commands

Defined in:
lib/decko/commands.rb,
lib/decko/commands/command.rb,
lib/decko/commands/rake_command.rb,
lib/decko/commands/rspec_command.rb,
lib/decko/commands/cucumber_command.rb,
lib/decko/commands/rake_command/parser.rb,
lib/decko/commands/rspec_command/parser.rb,
lib/decko/commands/cucumber_command/parser.rb

Defined Under Namespace

Classes: Command, CucumberCommand, RakeCommand, RspecCommand

Class Method Summary collapse

Class Method Details

.run_cucumberObject



52
53
54
55
# File 'lib/decko/commands.rb', line 52

def run_cucumber
  require "decko/commands/cucumber_command"
  CucumberCommand.new(ARGV).run
end

.run_db_task(command) ⇒ Object



57
58
59
60
# File 'lib/decko/commands.rb', line 57

def run_db_task command
  require "decko/commands/rake_command"
  RakeCommand.new("decko:#{command}", ARGV).run
end

.run_jasmineObject



62
63
64
65
# File 'lib/decko/commands.rb', line 62

def run_jasmine
  require "decko/commands/rake_command"
  RakeCommand.new("spec:javascript", envs: "test").run
end

.run_newObject



36
37
38
39
40
41
42
43
44
45
# File 'lib/decko/commands.rb', line 36

def run_new
  if ARGV.first.in?(["-h", "--help"])
    require "decko/commands/application"
  else
    puts "Can't initialize a new deck within the directory of another, " \
     "please change to a non-deck directory first.\n"
    puts "Type 'decko' for help."
    exit(1)
  end
end

.run_rspecObject



47
48
49
50
# File 'lib/decko/commands.rb', line 47

def run_rspec
  require "decko/commands/rspec_command"
  RspecCommand.new(ARGV).run
end