module Spout

Launch spout commands from command line.

Constants

COMMANDS

Public Class Methods

coverage_report(argv) click to toggle source
# File lib/spout.rb, line 32
def self.coverage_report(argv)
  require "spout/commands/coverage"
  Spout::Commands::Coverage.new(standard_version, argv)
rescue NoMemoryError
  puts "[NoMemoryError] You made Spout cry... Spout doesn't run on potatoes :'-("
end
deploy(argv) click to toggle source
# File lib/spout.rb, line 55
def self.deploy(argv)
  require "spout/commands/deploy"
  Spout::Commands::Deploy.new(argv, standard_version)
end
exporter(argv) click to toggle source
# File lib/spout.rb, line 39
def self.exporter(argv)
  require "spout/commands/exporter"
  Spout::Commands::Exporter.new(standard_version, argv)
end
generate_charts_and_tables(argv) click to toggle source
# File lib/spout.rb, line 44
def self.generate_charts_and_tables(argv)
  argv = argv.last(argv.size - 1)
  require "spout/commands/graphs"
  Spout::Commands::Graphs.new(argv, standard_version)
end
help(argv) click to toggle source
# File lib/spout.rb, line 50
def self.help(argv)
  require "spout/commands/help"
  Spout::Commands::Help.new(argv)
end
importer(argv) click to toggle source
# File lib/spout.rb, line 60
def self.importer(argv)
  require "spout/commands/importer"
  Spout::Commands::Importer.new(argv)
end
launch(argv) click to toggle source
# File lib/spout.rb, line 23
def self.launch(argv)
  send((Spout::COMMANDS[argv.first.to_s.scan(/\w/).first] || :help), argv)
end
new_project(argv) click to toggle source
# File lib/spout.rb, line 27
def self.new_project(argv)
  require "spout/commands/project_generator"
  Spout::Commands::ProjectGenerator.new(argv)
end
outliers_report(argv) click to toggle source
# File lib/spout.rb, line 65
def self.outliers_report(argv)
  require "spout/commands/outliers"
  Spout::Commands::Outliers.new(standard_version, argv)
end
standard_version() click to toggle source
# File lib/spout.rb, line 84
def self.standard_version
  version = File.open("VERSION", &:readline).strip
  version == "" ? "1.0.0" : version
rescue
  "1.0.0"
end
test(_argv) click to toggle source
# File lib/spout.rb, line 70
def self.test(_argv)
  require "spout/commands/test_runner"
  Spout::Commands::TestRunner.run
end
update(argv) click to toggle source
# File lib/spout.rb, line 75
def self.update(argv)
  require "spout/commands/update"
  Spout::Commands::Update.start(argv)
end
version(_argv) click to toggle source
# File lib/spout.rb, line 80
def self.version(_argv)
  puts "Spout #{Spout::VERSION::STRING}"
end