class Bundler::Audit::Database
def self.update!(options={})
- Since: - 0.3.0
Other tags:
- Note: -
Returns:
-
(Boolean, nil)
-
Parameters:
-
(
Boolean, quiet
) --
def self.update!(options={}) raise "Invalid option(s)" unless (options.keys - [:quiet]).empty? if File.directory?(USER_PATH) if File.directory?(File.join(USER_PATH, ".git")) Dir.chdir(USER_PATH) do command = %w(git pull) command << '--quiet' if options[:quiet] command << 'origin' << 'master' system *command end end else command = %w(git clone) command << '--quiet' if options[:quiet] command << URL << USER_PATH system *command end end