class Guard::CLI


Do not put any logic in here, create a class and delegate instead.
This is the main interface to Guard that is called by the Guard binary ‘bin/guard`.
Facade for the Guard command line interface managed by [Thor](github.com/wycats/thor).

def _verify_bundler_presence


shows a hint to do so if not.
Verifies if Guard is run with `bundle exec` and
def _verify_bundler_presence
  if File.exists?('Gemfile') && !ENV['BUNDLE_GEMFILE']
    ::Guard::UI.info <<EOF
d here! It looks like your project has a Gemfile, yet you are running
rd` outside of Bundler. If this is your intent, feel free to ignore this
age. Otherwise, consider using `bundle exec guard` to ensure your
ndencies are loaded correctly.
 can run `guard` with --no-bundler-warning to get rid of this message.)
  end
end

def init(*plugin_names)

Parameters:
  • plugin_names (Array) -- the name of the Guard plugins to initialize

Other tags:
    See: Guard::Guardfile.initialize_all_templates -
    See: Guard::Guardfile.initialize_template -
def init(*plugin_names)
  _verify_bundler_presence
  ::Guard::Guardfile.create_guardfile(abort_on_existence: options[:bare])
  return if options[:bare]
  if plugin_names.empty?
    ::Guard::Guardfile.initialize_all_templates
  else
    plugin_names.each do |plugin_name|
      ::Guard::Guardfile.initialize_template(plugin_name)
    end
  end
end

def list

Other tags:
    See: Guard::DslDescriber.list -
def list
  ::Guard::DslDescriber.new(options).list
end

def notifiers

Other tags:
    See: Guard::DslDescriber.notifiers -
def notifiers
  ::Guard::DslDescriber.new(options).notifiers
end

def show

Other tags:
    See: Guard::DslDescriber.show -
def show
  ::Guard::DslDescriber.new(options).show
end

def start

Other tags:
    See: Guard.start -
def start
  _verify_bundler_presence unless options[:no_bundler_warning]
  ::Guard.start(options)
  return if ENV['GUARD_ENV'] == 'test'
  while ::Guard.running do
    sleep 0.5
  end
end

def version

Other tags:
    See: Guard::VERSION -
def version
  puts "Guard version #{ ::Guard::VERSION }"
end