diff options
| author | Jack Nagel | 2013-12-09 13:44:45 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-12-09 13:44:45 -0600 |
| commit | 43091a3c40e36553ac5459974093baeb97e3e0d2 (patch) | |
| tree | dd49561a5269f94b067d246f843650585bcb40f7 | |
| parent | e5853c6cde12f6da423f15a65261520fe56cac62 (diff) | |
| download | homebrew-43091a3c40e36553ac5459974093baeb97e3e0d2.tar.bz2 | |
Silence some Ruby 2.1 warnings
| -rwxr-xr-x | Library/Contributions/cmd/brew-test-bot.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/auctex.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/freediameter.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/fuse4x-kext.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/fwknop.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/ganglia.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/hamsterdb.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/libreadline-java.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/lighttpd.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/nagios.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/nu.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/open-mpi.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/proof-general.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/safe-rm.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/zabbix.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/doctor.rb | 2 |
16 files changed, 17 insertions, 17 deletions
diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb index 6e0ee2ac3..c180db643 100755 --- a/Library/Contributions/cmd/brew-test-bot.rb +++ b/Library/Contributions/cmd/brew-test-bot.rb @@ -98,7 +98,7 @@ class Step @status = success ? :passed : :failed puts_result - return unless File.exists?(log_file_path) + return unless File.exist?(log_file_path) @output = IO.read(log_file_path) if has_output? and (not success or @puts_output_on_success) puts @output diff --git a/Library/Formula/auctex.rb b/Library/Formula/auctex.rb index f2082bbc2..f2991069b 100644 --- a/Library/Formula/auctex.rb +++ b/Library/Formula/auctex.rb @@ -17,7 +17,7 @@ class Auctex < Formula def which_emacs emacs = ARGV.value('with-emacs') || which('emacs').to_s - raise "#{emacs} not found" if not File.exists? emacs + raise "#{emacs} not found" unless File.exist? emacs return emacs end diff --git a/Library/Formula/freediameter.rb b/Library/Formula/freediameter.rb index 936487ecc..ef08311ad 100644 --- a/Library/Formula/freediameter.rb +++ b/Library/Formula/freediameter.rb @@ -38,7 +38,7 @@ class Freediameter < Formula prefix.install 'doc', 'contrib' - unless File.exists?(etc/'freeDiameter.conf') + unless File.exist?(etc/'freeDiameter.conf') cp prefix/'doc/freediameter.conf.sample', etc/'freeDiameter.conf' end diff --git a/Library/Formula/fuse4x-kext.rb b/Library/Formula/fuse4x-kext.rb index a57064e2a..55ed71e09 100644 --- a/Library/Formula/fuse4x-kext.rb +++ b/Library/Formula/fuse4x-kext.rb @@ -59,7 +59,7 @@ class Fuse4xKext < Formula # filesystem layout convention from Apple. # Check if the user has fuse4x kext in the old location. # Remove this check Q4 2012 when it become clear that everyone migrated to 0.9.0+ - if File.exists?('/System/Library/Extensions/fuse4x.kext/') + if File.exist?('/System/Library/Extensions/fuse4x.kext/') message += <<-EOS.undent You have older version of fuse4x installed. Please remove it by running: diff --git a/Library/Formula/fwknop.rb b/Library/Formula/fwknop.rb index effc43c0c..4ef9bb784 100644 --- a/Library/Formula/fwknop.rb +++ b/Library/Formula/fwknop.rb @@ -13,7 +13,7 @@ class Fwknop < Formula depends_on 'gpgme' => :optional def install - system './autogen.sh' if build.head? or !File.exists?('configure') + system './autogen.sh' if build.head? or !File.exist?('configure') system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make install" diff --git a/Library/Formula/ganglia.rb b/Library/Formula/ganglia.rb index e6a71597d..51e27d776 100644 --- a/Library/Formula/ganglia.rb +++ b/Library/Formula/ganglia.rb @@ -33,7 +33,7 @@ class Ganglia < Formula system "make install" # Generate the default config file - system "#{bin}/gmond -t > #{etc}/gmond.conf" unless File.exists? "#{etc}/gmond.conf" + system "#{bin}/gmond -t > #{etc}/gmond.conf" unless File.exist? "#{etc}/gmond.conf" # Install man pages man1.install Dir['mans/*'] diff --git a/Library/Formula/hamsterdb.rb b/Library/Formula/hamsterdb.rb index 88574bb31..09a0b1de8 100644 --- a/Library/Formula/hamsterdb.rb +++ b/Library/Formula/hamsterdb.rb @@ -7,7 +7,7 @@ class JavaRequirement < Requirement [ `/usr/libexec/java_home`.chomp, ENV['JAVA_HOME'] - ].find { |dir| dir && File.exists?("#{dir}/bin/javac") && File.exists?("#{dir}/include") } + ].find { |dir| dir && File.exist?("#{dir}/bin/javac") && File.exist?("#{dir}/include") } end satisfy :build_env => false do diff --git a/Library/Formula/libreadline-java.rb b/Library/Formula/libreadline-java.rb index 386500170..597f5aa03 100644 --- a/Library/Formula/libreadline-java.rb +++ b/Library/Formula/libreadline-java.rb @@ -18,10 +18,10 @@ class LibreadlineJava < Formula # Current Oracle JDKs put the jni.h and jni_md.h in a different place than the # original Apple/Sun JDK used to. - if File.exists? ENV['JAVA_HOME'] + "/include/jni.h" then + if File.exist? ENV['JAVA_HOME'] + "/include/jni.h" then ENV['JAVAINCLUDE'] = ENV['JAVA_HOME'] + "/include" ENV['JAVANATINC'] = ENV['JAVA_HOME'] + "/include/darwin" - elsif File.exists? "/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/jni.h" + elsif File.exist? "/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/jni.h" ENV['JAVAINCLUDE'] = "/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/" ENV['JAVANATINC'] = "/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/" end diff --git a/Library/Formula/lighttpd.rb b/Library/Formula/lighttpd.rb index c90cf7b7d..d55384bdd 100644 --- a/Library/Formula/lighttpd.rb +++ b/Library/Formula/lighttpd.rb @@ -44,7 +44,7 @@ class Lighttpd < Formula mv sbin, bin - unless File.exists? config_path + unless File.exist? config_path config_path.install Dir["doc/config/lighttpd.conf"] config_path.install Dir["doc/config/modules.conf"] (config_path/"conf.d/").install Dir["doc/config/conf.d/*.conf"] diff --git a/Library/Formula/nagios.rb b/Library/Formula/nagios.rb index 67a3ec424..343971607 100644 --- a/Library/Formula/nagios.rb +++ b/Library/Formula/nagios.rb @@ -38,7 +38,7 @@ class Nagios < Formula # Install config system "make install-config" system "make install-webconf" - mkdir HOMEBREW_PREFIX+'var/lib/nagios/rw' unless File.exists? HOMEBREW_PREFIX+'var/lib/nagios/rw' + mkdir HOMEBREW_PREFIX+'var/lib/nagios/rw' unless File.exist? HOMEBREW_PREFIX+'var/lib/nagios/rw' end plist_options :startup => true, :manual => "nagios #{HOMEBREW_PREFIX}/etc/nagios/nagios.cfg" diff --git a/Library/Formula/nu.rb b/Library/Formula/nu.rb index 8fde4e59c..d8de6e5f3 100644 --- a/Library/Formula/nu.rb +++ b/Library/Formula/nu.rb @@ -45,7 +45,7 @@ EOS end def caveats - if self.installed? and File.exists? frameworks+"Nu.framework" + if self.installed? and File.exist? frameworks+"Nu.framework" return <<-EOS.undent Nu.framework was installed to: #{frameworks}/Nu.framework diff --git a/Library/Formula/open-mpi.rb b/Library/Formula/open-mpi.rb index 171a786e2..2e95960fe 100644 --- a/Library/Formula/open-mpi.rb +++ b/Library/Formula/open-mpi.rb @@ -44,7 +44,7 @@ class OpenMpi < Formula # If Fortran bindings were built, there will be a stray `.mod` file # (Fortran header) in `lib` that needs to be moved to `include`. - include.install lib/'mpi.mod' if File.exists? "#{lib}/mpi.mod" + include.install lib/'mpi.mod' if File.exist? "#{lib}/mpi.mod" # Not sure why the wrapped script has a jar extension - adamv libexec.install bin/'vtsetup.jar' diff --git a/Library/Formula/proof-general.rb b/Library/Formula/proof-general.rb index 225c893ca..ca0d0daf6 100644 --- a/Library/Formula/proof-general.rb +++ b/Library/Formula/proof-general.rb @@ -18,7 +18,7 @@ class ProofGeneral < Formula :empty? => true) end - raise "#{emacs_binary} not found" if not File.exists? "#{emacs_binary}" + raise "#{emacs_binary} not found" if not File.exist? "#{emacs_binary}" version_info = `#{emacs_binary} --version` version_info =~ /GNU Emacs (\d+)\./ diff --git a/Library/Formula/safe-rm.rb b/Library/Formula/safe-rm.rb index 3e11df3ec..65ccae7c8 100644 --- a/Library/Formula/safe-rm.rb +++ b/Library/Formula/safe-rm.rb @@ -13,6 +13,6 @@ class SafeRm < Formula file = "a-file" touch file system "#{bin}/safe-rm", file - !File.exists? file + assert !File.exist?(file) end end diff --git a/Library/Formula/zabbix.rb b/Library/Formula/zabbix.rb index da76ee6c1..ead4e3267 100644 --- a/Library/Formula/zabbix.rb +++ b/Library/Formula/zabbix.rb @@ -17,7 +17,7 @@ class Zabbix < Formula def brewed_or_shipped(db_config) brewed_db_config = "#{HOMEBREW_PREFIX}/bin/#{db_config}" - (File.exists?(brewed_db_config) && brewed_db_config) || which(db_config) + (File.exist?(brewed_db_config) && brewed_db_config) || which(db_config) end def install diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 569f44d73..15922275d 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -521,7 +521,7 @@ def check_user_path_3 end def check_user_curlrc - if %w[CURL_HOME HOME].any?{|key| ENV[key] and File.exists? "#{ENV[key]}/.curlrc" } then <<-EOS.undent + if %w[CURL_HOME HOME].any?{|key| ENV[key] and File.exist? "#{ENV[key]}/.curlrc" } then <<-EOS.undent You have a curlrc file If you have trouble downloading packages with Homebrew, then maybe this is the problem? If the following command doesn't work, then try removing |
