aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2014-04-01 12:43:32 -0500
committerJack Nagel2014-04-01 12:43:32 -0500
commit06813eb9d8341d32c5517b780b699fb78192daf9 (patch)
tree743c42a3bd882f284a7b97104a4581f1e92a8960
parent422872a82f96321aae65cbc20573d7d2c929a6af (diff)
downloadhomebrew-06813eb9d8341d32c5517b780b699fb78192daf9.tar.bz2
Clean up some unnecessary Pathname usage
-rw-r--r--Library/Formula/jena.rb6
-rw-r--r--Library/Formula/luciddb.rb2
-rw-r--r--Library/Formula/node.rb2
-rw-r--r--Library/Formula/zookeeper.rb4
4 files changed, 7 insertions, 7 deletions
diff --git a/Library/Formula/jena.rb b/Library/Formula/jena.rb
index 25722fea1..3477f0fcc 100644
--- a/Library/Formula/jena.rb
+++ b/Library/Formula/jena.rb
@@ -21,9 +21,9 @@ class Jena < Formula
prefix.install %w{ LICENSE ReleaseNotes-Jena.txt NOTICE ReleaseNotes-TDB.txt README ReleaseNotes-ARQ.txt }
doc.install ['javadoc-arq', 'javadoc-core', 'javadoc-sdb', 'javadoc-tdb', 'src-examples']
libexec.install Dir['*']
- Dir["#{libexec}/bin/*"].map { |p| Pathname.new p }.each { |path|
- bin_name = path.basename
+ Dir["#{libexec}/bin/*"].each do |path|
+ bin_name = File.basename(path)
(bin+bin_name).write shim_script(bin_name)
- }
+ end
end
end
diff --git a/Library/Formula/luciddb.rb b/Library/Formula/luciddb.rb
index 24a7d1958..784e92ecf 100644
--- a/Library/Formula/luciddb.rb
+++ b/Library/Formula/luciddb.rb
@@ -24,7 +24,7 @@ class Luciddb < Formula
end
Dir["#{libexec}/bin/*"].each do |b|
next if b =~ /classpath.gen/ or b =~ /defineFarragoRuntime/
- n = Pathname.new(b).basename
+ n = File.basename(b)
(bin+n).write shim_script(n)
end
end
diff --git a/Library/Formula/node.rb b/Library/Formula/node.rb
index 451961ffc..b4796cf8a 100644
--- a/Library/Formula/node.rb
+++ b/Library/Formula/node.rb
@@ -66,7 +66,7 @@ class Node < Formula
(lib/"node_modules/npm/npmrc").write("prefix = #{npm_prefix}\n")
# Link npm manpages
- Pathname.glob("#{lib}/node_modules/npm/man/*").each do |man|
+ Pathname.glob("#{lib}/node_modules/npm/man/*") do |man|
dir = send(man.basename)
man.children.each { |file| dir.install_symlink(file) }
end
diff --git a/Library/Formula/zookeeper.rb b/Library/Formula/zookeeper.rb
index 1aebb89f1..8ec9a6c4b 100644
--- a/Library/Formula/zookeeper.rb
+++ b/Library/Formula/zookeeper.rb
@@ -101,12 +101,12 @@ class Zookeeper < Formula
(var+'run/zookeeper/data').mkpath
# Install shim scripts to bin
- Dir["#{libexec}/bin/*.sh"].map { |p| Pathname.new p }.each { |path|
+ Pathname.glob("#{libexec}/bin/*.sh") do |path|
next if path == libexec+'bin/zkEnv.sh'
script_name = path.basename
bin_name = path.basename '.sh'
(bin+bin_name).write shim_script(script_name)
- }
+ end
# Install default config files
defaults = etc/'zookeeper/defaults'