move paths to utils
This commit is contained in:
parent
fa0872a42c
commit
a126946a9b
@ -1,14 +1,4 @@
|
|||||||
module Homebrew extend self
|
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
|
def commands
|
||||||
# Find commands in Homebrew/cmd
|
# Find commands in Homebrew/cmd
|
||||||
cmds = (HOMEBREW_REPOSITORY/"Library/Homebrew/cmd").
|
cmds = (HOMEBREW_REPOSITORY/"Library/Homebrew/cmd").
|
||||||
|
|||||||
@ -41,16 +41,6 @@ end
|
|||||||
class Checks
|
class Checks
|
||||||
|
|
||||||
############# HELPERS
|
############# 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.
|
# Finds files in HOMEBREW_PREFIX *and* /usr/local.
|
||||||
# Specify paths relative to a prefix eg. "include/foo.h".
|
# Specify paths relative to a prefix eg. "include/foo.h".
|
||||||
# Sets @found for your convenience.
|
# Sets @found for your convenience.
|
||||||
|
|||||||
@ -238,6 +238,16 @@ def nostdout
|
|||||||
end
|
end
|
||||||
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
|
module GitHub extend self
|
||||||
ISSUES_URI = URI.parse("https://api.github.com/legacy/issues/search/mxcl/homebrew/open/")
|
ISSUES_URI = URI.parse("https://api.github.com/legacy/issues/search/mxcl/homebrew/open/")
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user