Class: Jobshop::CLI::Canary

Inherits:
Thor
  • Object
show all
Defined in:
lib/jobshop/cli/canary.rb

Instance Method Summary collapse

Instance Method Details

#reset(*args) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/jobshop/cli/canary.rb', line 20

def reset(*args)
  FileUtils.rmtree(File.expand_path("spec/canary"))
  Jobshop::Generators::CanaryGenerator.start(
    args.unshift(File.expand_path("spec/canary")),
    jobshop_options: {
      database: "postgresql",
      skip_bundle: true,
      skip_gemfile: true,
      skip_git: true,
      skip_listen: true,
      skip_test: true
    }
  )
end

#seedObject



36
37
38
39
# File 'lib/jobshop/cli/canary.rb', line 36

def seed
  require_environment!
  Jobshop::Engine.load_seed
end