aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vandenberg2013-09-15 20:11:17 -0700
committerAdam Vandenberg2013-09-17 06:44:25 -0700
commite9d8fcd03ef519022e08e388c353ce3bda0345a4 (patch)
tree59d17e7d0ef6ce6c4ca1ed672ee3f5f582268062
parent5b77eaf15f1276bbafdea8081acd6e4905ca30d1 (diff)
downloadhomebrew-e9d8fcd03ef519022e08e388c353ce3bda0345a4.tar.bz2
move paths to utils
-rw-r--r--Library/Homebrew/cmd/commands.rb10
-rw-r--r--Library/Homebrew/cmd/doctor.rb10
-rw-r--r--Library/Homebrew/utils.rb10
3 files changed, 10 insertions, 20 deletions
diff --git a/Library/Homebrew/cmd/commands.rb b/Library/Homebrew/cmd/commands.rb
index b9bbb12ec..1d765f57b 100644
--- a/Library/Homebrew/cmd/commands.rb
+++ b/Library/Homebrew/cmd/commands.rb
@@ -1,14 +1,4 @@
module Homebrew extend self
- def paths
- @paths ||= ENV['PATH'].split(File::PATH_SEPARATOR).collect do |p|
- begin
- File.expand_path(p).chomp('/')
- rescue ArgumentError
- onoe "The following PATH component is invalid: #{p}"
- end
- end.uniq.compact
- end
-
def commands
# Find commands in Homebrew/cmd
cmds = (HOMEBREW_REPOSITORY/"Library/Homebrew/cmd").
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index a39b19349..e7123fd7c 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -41,16 +41,6 @@ end
class Checks
############# HELPERS
- def paths
- @paths ||= ENV['PATH'].split(File::PATH_SEPARATOR).collect do |p|
- begin
- File.expand_path(p).chomp('/')
- rescue ArgumentError
- onoe "The following PATH component is invalid: #{p}"
- end
- end.uniq.compact
- end
-
# Finds files in HOMEBREW_PREFIX *and* /usr/local.
# Specify paths relative to a prefix eg. "include/foo.h".
# Sets @found for your convenience.
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index f99b0a03e..8a266ef7a 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -238,6 +238,16 @@ def nostdout
end
end
+def paths
+ @paths ||= ENV['PATH'].split(File::PATH_SEPARATOR).collect do |p|
+ begin
+ File.expand_path(p).chomp('/')
+ rescue ArgumentError
+ onoe "The following PATH component is invalid: #{p}"
+ end
+ end.uniq.compact
+end
+
module GitHub extend self
ISSUES_URI = URI.parse("https://api.github.com/legacy/issues/search/mxcl/homebrew/open/")