diff options
| author | Jack Nagel | 2014-02-12 13:59:18 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-02-12 13:59:18 -0500 |
| commit | 490f7d052693f1e7ad488fde05b62e88ac263c75 (patch) | |
| tree | 35a3710700617ca7b36ab3fee488c81a9d738939 | |
| parent | 82a7415227e775f31a717b8b78093c6eb46a88b9 (diff) | |
| download | homebrew-490f7d052693f1e7ad488fde05b62e88ac263c75.tar.bz2 | |
Pass the string instead of reconstructing it from a regexp
| -rw-r--r-- | Library/Homebrew/cmd/search.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/utils.rb | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb index e7eb26377..52a13516b 100644 --- a/Library/Homebrew/cmd/search.rb +++ b/Library/Homebrew/cmd/search.rb @@ -62,7 +62,7 @@ module Homebrew extend self if count == 0 and not blacklisted? query puts "No formula found for #{query.inspect}." begin - GitHub.find_pull_requests(rx) { |pull| puts pull } + GitHub.find_pull_requests(query) { |pull| puts pull } rescue GitHub::Error => e opoo e.message end diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 8852d93b8..13861a6de 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -308,12 +308,10 @@ module GitHub extend self issues_matching(name).select { |issue| issue["state"] == "open" } end - def find_pull_requests rx + def find_pull_requests query return if ENV['HOMEBREW_NO_GITHUB_API'] puts "Searching pull requests..." - query = rx.source.delete('.*').gsub('\\', '') - open_or_closed_prs = issues_matching(query).select do |issue| issue["pull_request"]["html_url"] end |
