Module: Wagn::Commands

Defined in:
lib/wagn/commands.rb,
lib/wagn/commands/command.rb,
lib/wagn/commands/rake_command.rb,
lib/wagn/commands/rspec_command.rb,
lib/wagn/commands/cucumber_command.rb,
lib/wagn/commands/rake_command/parser.rb,
lib/wagn/commands/rspec_command/parser.rb,
lib/wagn/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/wagn/commands.rb', line 52

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

.run_db_task(command) ⇒ Object



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

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

.run_jasmineObject



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

def run_jasmine
  require "wagn/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/wagn/commands.rb', line 36

def run_new
  if ARGV.first.in?(["-h", "--help"])
    require "wagn/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 'wagn' for help."
    exit(1)
  end
end

.run_rspecObject



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

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