aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2014-05-31 10:05:36 -0500
committerJack Nagel2014-05-31 10:08:36 -0500
commit5300700c58000121d1fa1963fd241f268e65a806 (patch)
tree7f856c6e71e13d85ea99e933c88cbbb20cad2b4e /Library/Formula
parentf536ce0738f5d302a66f389c44b0ce7f38138f3c (diff)
downloadhomebrew-5300700c58000121d1fa1963fd241f268e65a806.tar.bz2
Address style issues related to use of Dir[]
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/isc-dhcp.rb4
-rw-r--r--Library/Formula/play.rb6
-rw-r--r--Library/Formula/salt.rb4
-rw-r--r--Library/Formula/sbcl.rb4
-rw-r--r--Library/Formula/sleepwatcher.rb2
-rw-r--r--Library/Formula/typesafe-activator.rb6
-rw-r--r--Library/Formula/uru.rb2
7 files changed, 10 insertions, 18 deletions
diff --git a/Library/Formula/isc-dhcp.rb b/Library/Formula/isc-dhcp.rb
index 29e4a8bae..4b8212f17 100644
--- a/Library/Formula/isc-dhcp.rb
+++ b/Library/Formula/isc-dhcp.rb
@@ -55,10 +55,10 @@ class IscDhcp < Formula
# rename all the installed sample etc/* files so they don't clobber
# any existing config files at symlink time.
- Dir.open(prefix+'etc') do |dir|
+ Dir.open("#{prefix}/etc") do |dir|
dir.each do |f|
file = "#{dir.path}/#{f}"
- File.rename(file, "#{file}.sample") if File.stat(file).file?
+ File.rename(file, "#{file}.sample") if File.file?(file)
end
end
diff --git a/Library/Formula/play.rb b/Library/Formula/play.rb
index c3787edb5..7c1060ed9 100644
--- a/Library/Formula/play.rb
+++ b/Library/Formula/play.rb
@@ -10,11 +10,7 @@ class Play < Formula
def install
system "./framework/build", "publish-local" if build.head?
-
- # remove Windows .bat files
- rm Dir['*.bat']
- rm Dir["#{buildpath}/**/*.bat"] if build.head?
-
+ rm_rf Dir["**/*.bat"]
libexec.install Dir['*']
bin.install_symlink libexec/'play'
end
diff --git a/Library/Formula/salt.rb b/Library/Formula/salt.rb
index 98aa51ad8..d2d0dc6ae 100644
--- a/Library/Formula/salt.rb
+++ b/Library/Formula/salt.rb
@@ -24,7 +24,7 @@ class Salt < Formula
ENV.deparallelize
# the libgfortran.a path needs to be set explicitly
libgfortran = `$FC --print-file-name libgfortran.a`.chomp
- ENV.append 'LDFLAGS', "-L#{File.dirname libgfortran} -lgfortran"
+ ENV.append 'LDFLAGS', "-L#{File.dirname(libgfortran)} -lgfortran"
system "./configure", "--prefix=#{prefix}", "--disable-static"
system "make install"
# install all the model data
@@ -35,7 +35,7 @@ class Salt < Formula
test do
ENV['SALTPATH'] = "#{prefix}/data"
- cp_r Dir[prefix + '03d4ag' + '*'], '.'
+ cp_r Dir["#{prefix}/03d4ag*"], '.'
system bin/"snfit", testpath/"lc-03D4ag.list"
assert File.exist?("result_salt2.dat")
end
diff --git a/Library/Formula/sbcl.rb b/Library/Formula/sbcl.rb
index b0c92bdb2..b2fb6eb96 100644
--- a/Library/Formula/sbcl.rb
+++ b/Library/Formula/sbcl.rb
@@ -84,8 +84,8 @@ class Sbcl < Formula
bootstrap = (build.build_32_bit? || !MacOS.prefer_64_bit?) ? "bootstrap32" : "bootstrap64"
resource(bootstrap).stage do
# We only need the binaries for bootstrapping, so don't install anything:
- command = Dir.pwd + "/src/runtime/sbcl"
- core = Dir.pwd + "/output/sbcl.core"
+ command = "#{Dir.pwd}/src/runtime/sbcl"
+ core = "#{Dir.pwd}/output/sbcl.core"
xc_cmdline = "#{command} --core #{core} --disable-debugger --no-userinit --no-sysinit"
cd buildpath do
diff --git a/Library/Formula/sleepwatcher.rb b/Library/Formula/sleepwatcher.rb
index 713906f47..e05db4e73 100644
--- a/Library/Formula/sleepwatcher.rb
+++ b/Library/Formula/sleepwatcher.rb
@@ -48,7 +48,7 @@ class Sleepwatcher < Formula
but read information regarding setup of the launchd files which
are installed here:
- #{Dir[(prefix + '*.plist')].join("\n ")}
+ #{Dir["#{prefix}/*.plist"].join("\n ")}
These are the examples provided by the author.
EOS
diff --git a/Library/Formula/typesafe-activator.rb b/Library/Formula/typesafe-activator.rb
index b4aa28374..8c126cdb2 100644
--- a/Library/Formula/typesafe-activator.rb
+++ b/Library/Formula/typesafe-activator.rb
@@ -6,12 +6,8 @@ class TypesafeActivator < Formula
sha1 '01accd921068a4f8dae4a6304aa98f837b110602'
def install
- # remove Windows .bat files
- rm Dir['*.bat']
- rm Dir["#{buildpath}/**/*.bat"]
-
+ rm Dir["*.bat"] # Remove Windows .bat files
prefix.install_metafiles
-
libexec.install Dir['*']
bin.write_exec_script libexec/'activator'
end
diff --git a/Library/Formula/uru.rb b/Library/Formula/uru.rb
index f26de4d30..c2f741ccd 100644
--- a/Library/Formula/uru.rb
+++ b/Library/Formula/uru.rb
@@ -9,7 +9,7 @@ class Uru < Formula
def install
ENV["GOPATH"] = buildpath
- (buildpath/"src/bitbucket.org/jonforums/uru").install Dir[buildpath/"*"]
+ (buildpath/"src/bitbucket.org/jonforums/uru").install Dir["*"]
system "go", "build", "-ldflags", "-s", "bitbucket.org/jonforums/uru"
bin.install "uru" => "uru_rt"
end