diff options
| author | BrewTestBot | 2015-08-03 13:09:07 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2015-08-03 13:22:35 +0100 |
| commit | 13d544e11e92ba8ea3788723432046f8dfe4adf9 (patch) | |
| tree | e6da18436d9ce956e6fbe80e3185c67cf3b58808 /Library/Homebrew/cmd/update.rb | |
| parent | 3b68215be793774fafd9ce124a2065f5968f50e5 (diff) | |
| download | brew-13d544e11e92ba8ea3788723432046f8dfe4adf9.tar.bz2 | |
Core files style updates.
Closes Homebrew/homebrew#42354.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew/cmd/update.rb')
| -rw-r--r-- | Library/Homebrew/cmd/update.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Library/Homebrew/cmd/update.rb b/Library/Homebrew/cmd/update.rb index 189a911db..e50443fad 100644 --- a/Library/Homebrew/cmd/update.rb +++ b/Library/Homebrew/cmd/update.rb @@ -1,4 +1,4 @@ -require 'cmd/tap' +require "cmd/tap" module Homebrew def update @@ -10,7 +10,7 @@ module Homebrew end # ensure GIT_CONFIG is unset as we need to operate on .git/config - ENV.delete('GIT_CONFIG') + ENV.delete("GIT_CONFIG") cd HOMEBREW_REPOSITORY git_init_if_necessary @@ -36,7 +36,7 @@ module Homebrew rescue onoe "Failed to update tap: #{tap}" else - report.update(updater.report) do |key, oldval, newval| + report.update(updater.report) do |_key, oldval, newval| oldval.concat(newval) end end @@ -48,14 +48,14 @@ module Homebrew next unless (HOMEBREW_CELLAR/f).exist? migration = TAP_MIGRATIONS[f] next unless migration - tap_user, tap_repo = migration.split '/' + tap_user, tap_repo = migration.split "/" install_tap tap_user, tap_repo end if load_tap_migrations if report.empty? puts "Already up-to-date." else - puts "Updated Homebrew from #{master_updater.initial_revision[0,8]} to #{master_updater.current_revision[0,8]}." + puts "Updated Homebrew from #{master_updater.initial_revision[0, 8]} to #{master_updater.current_revision[0, 8]}." report.dump end end @@ -111,7 +111,7 @@ module Homebrew end def load_tap_migrations - require 'tap_migrations' + require "tap_migrations" rescue LoadError false end @@ -125,7 +125,7 @@ class Updater @stashed = false end - def pull!(options={}) + def pull!(options = {}) quiet = [] quiet << "--quiet" unless ARGV.verbose? @@ -184,12 +184,13 @@ class Updater end def report - map = Hash.new{ |h,k| h[k] = [] } + map = Hash.new { |h, k| h[k] = [] } if initial_revision && initial_revision != current_revision diff.each_line do |line| status, *paths = line.split - src, dst = paths.first, paths.last + src = paths.first + dst = paths.last next unless File.extname(dst) == ".rb" next unless paths.any? { |p| File.dirname(p) == formula_directory } @@ -255,7 +256,6 @@ class Updater end end - class Report def initialize @hash = {} @@ -281,7 +281,7 @@ class Report dump_formula_report :D, "Deleted Formulae" end - def select_formula key + def select_formula(key) fetch(key, []).map do |path| case path.to_s when HOMEBREW_TAP_PATH_REGEX @@ -292,7 +292,7 @@ class Report end.sort end - def dump_formula_report key, title + def dump_formula_report(key, title) formula = select_formula(key) unless formula.empty? ohai title |
