module Jobshop::CLI
Public Class Methods
application?()
click to toggle source
# File lib/jobshop/cli.rb, line 28 def application? has_executable? && !has_gemspec? end
canary?()
click to toggle source
# File lib/jobshop/cli.rb, line 32 def canary? has_executable? && has_gemspec? end
start(argv = ARGV)
click to toggle source
# File lib/jobshop/cli.rb, line 12 def start(argv = ARGV) if [ "-v", "--version" ].include?(argv[0]) puts "Jobshop #{Jobshop.gem_version}" puts Gem.loaded_specs["jobshop"].full_gem_path exit 0 end if application? Jobshop::CLI::Application.start(argv) elsif canary? Jobshop::CLI::Canary.start(argv) else Jobshop::CLI::AppGenerator.start(argv) end end
Private Class Methods
has_executable?()
click to toggle source
# File lib/jobshop/cli.rb, line 36 def has_executable? @has_executable ||= File.file?("bin/jobshop") end
has_gemspec?()
click to toggle source
# File lib/jobshop/cli.rb, line 40 def has_gemspec? @jobshop_development ||= File.file?("jobshop.gemspec") end