class Gisdatigo::Runner::Updater
Public Instance Methods
update()
click to toggle source
# File lib/gisdatigo/runner/updater.rb, line 4 def update puts "Running conservative updates:" update_gems_with_options(['--conservative']) puts "\nRunning default updates:" update_gems_with_options([]) end
Private Instance Methods
commit(gem_name)
click to toggle source
# File lib/gisdatigo/runner/updater.rb, line 34 def commit(gem_name) if @git_manager.has_changes? test("ERROR: Failed to update #{gem_name}! Tests were broken!") @git_manager.commit(gem_name) end end
fetch_outdated_list()
click to toggle source
# File lib/gisdatigo/runner/updater.rb, line 26 def fetch_outdated_list print "\tFetching outdated list..." outdated_list = BundlerManager.gem_name_list print "OK!\n" outdated_list end
update_gems_with_options(options)
click to toggle source
# File lib/gisdatigo/runner/updater.rb, line 14 def update_gems_with_options(options) current_package = 1 outdated_list = fetch_outdated_list outdated_list.each do |gem_name| puts "\t#{current_package}/#{outdated_list.count} - Updating #{gem_name}" BundlerManager.update_gem(gem_name, options) commit(gem_name) current_package = current_package + 1 end end