Pull tap list into a constant
This commit is contained in:
parent
c30f00c37c
commit
e0fba99699
@ -29,19 +29,11 @@ module Homebrew extend self
|
|||||||
if query
|
if query
|
||||||
found = search_results.length
|
found = search_results.length
|
||||||
|
|
||||||
threads = []
|
|
||||||
results = []
|
results = []
|
||||||
threads << Thread.new { search_tap "josegonzalez", "php", rx }
|
|
||||||
threads << Thread.new { search_tap "samueljohn", "python", rx }
|
|
||||||
threads << Thread.new { search_tap "Homebrew", "apache", rx }
|
|
||||||
threads << Thread.new { search_tap "Homebrew", "versions", rx }
|
|
||||||
threads << Thread.new { search_tap "Homebrew", "dupes", rx }
|
|
||||||
threads << Thread.new { search_tap "Homebrew", "games", rx }
|
|
||||||
threads << Thread.new { search_tap "Homebrew", "science", rx }
|
|
||||||
threads << Thread.new { search_tap "Homebrew", "completions", rx }
|
|
||||||
threads << Thread.new { search_tap "Homebrew", "x11", rx }
|
|
||||||
|
|
||||||
threads.each do |t|
|
SEARCHABLE_TAPS.map do |user, repo|
|
||||||
|
Thread.new { search_tap(user, repo, rx) }
|
||||||
|
end.each do |t|
|
||||||
results.concat(t.value)
|
results.concat(t.value)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -56,6 +48,18 @@ module Homebrew extend self
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
SEARCHABLE_TAPS = [
|
||||||
|
%w{josegonzalez php},
|
||||||
|
%w{samueljohn python},
|
||||||
|
%w{Homebrew apache},
|
||||||
|
%w{Homebrew versions},
|
||||||
|
%w{Homebrew dupes},
|
||||||
|
%w{Homebrew games},
|
||||||
|
%w{Homebrew science},
|
||||||
|
%w{Homebrew completions},
|
||||||
|
%w{Homebrew x11},
|
||||||
|
]
|
||||||
|
|
||||||
def query_regexp(query)
|
def query_regexp(query)
|
||||||
case query
|
case query
|
||||||
when nil then ""
|
when nil then ""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user