Class: Inferno::CLI::Main

Inherits:
Thor
  • Object
show all
Defined in:
lib/inferno/apps/cli/main.rb

Instance Method Summary collapse

Instance Method Details

#consoleObject



13
14
15
16
# File 'lib/inferno/apps/cli/main.rb', line 13

def console
  Migration.new.run(Logger::INFO)
  Console.new.run
end

#migrateObject



19
20
21
# File 'lib/inferno/apps/cli/main.rb', line 19

def migrate
  Migration.new.run
end

#startObject



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/inferno/apps/cli/main.rb', line 28

def start
  Migration.new.run(Logger::INFO)

  without_bundler do
    command = 'foreman start --env=/dev/null'

    if `gem list -i foreman`.chomp == 'false'
      puts "You must install foreman with 'gem install foreman' prior to running Inferno."
    end

    if options[:watch]
      if `gem list -i rerun`.chomp == 'false'
        puts "You must install 'rerun' with 'gem install rerun' to restart on file changes."
      end

      command = "rerun \"#{command}\" --background"
    end

    exec command
  end
end

#suitesObject



51
52
53
# File 'lib/inferno/apps/cli/main.rb', line 51

def suites
  Suites.new.run
end

#versionObject



64
65
66
# File 'lib/inferno/apps/cli/main.rb', line 64

def version
  puts "Inferno Core v#{Inferno::VERSION}"
end