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/extend/fileutils.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/extend/fileutils.rb')
| -rw-r--r-- | Library/Homebrew/extend/fileutils.rb | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/Library/Homebrew/extend/fileutils.rb b/Library/Homebrew/extend/fileutils.rb index 4778d9039..741fca57f 100644 --- a/Library/Homebrew/extend/fileutils.rb +++ b/Library/Homebrew/extend/fileutils.rb @@ -3,10 +3,9 @@ require "tmpdir" # We enhance FileUtils to make our Formula code more readable. module FileUtils - # Create a temporary directory then yield. When the block returns, # recursively delete the temporary directory. - def mktemp(prefix=name) + def mktemp(prefix = name) prev = pwd tmp = Dir.mktmpdir(prefix, HOMEBREW_TEMP) @@ -26,7 +25,7 @@ module FileUtils # A version of mkdir that also changes to that folder in a block. alias_method :old_mkdir, :mkdir - def mkdir name, &block + def mkdir(name, &_block) old_mkdir(name) if block_given? chdir name do @@ -46,8 +45,8 @@ module FileUtils class Entry_ alias_method :old_copy_metadata, :copy_metadata def copy_metadata(path) - st = lstat() - if !st.symlink? + st = lstat + unless st.symlink? File.utime st.atime, st.mtime, path end begin @@ -87,20 +86,20 @@ module FileUtils # Run scons using a Homebrew-installed version, instead of whatever # is in the user's PATH - def scons *args + def scons(*args) system Formulary.factory("scons").opt_bin/"scons", *args end - def rake *args - system RUBY_BIN/'rake', *args + def rake(*args) + system RUBY_BIN/"rake", *args end alias_method :old_ruby, :ruby if method_defined?(:ruby) - def ruby *args + def ruby(*args) system RUBY_PATH, *args end - def xcodebuild *args + def xcodebuild(*args) removed = ENV.remove_cc_etc system "xcodebuild", *args ensure |
