diff options
| author | Xu Cheng | 2016-07-13 16:19:51 +0800 |
|---|---|---|
| committer | Xu Cheng | 2016-07-13 19:11:46 +0800 |
| commit | de1049f1f1237a31f8ac6a0b9b31ebdbc78030d4 (patch) | |
| tree | 855fef004b1f4daa618bb922a446bf1e2e183352 /Library/Homebrew/cmd | |
| parent | 91fb49d270f0837e851b3e6e6b0f53848f024f6c (diff) | |
| download | brew-de1049f1f1237a31f8ac6a0b9b31ebdbc78030d4.tar.bz2 | |
various: proper escape dot in regex
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/pull.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index d5ba7df2d..d0b7614e9 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -503,7 +503,7 @@ class FormulaAuditor when %r{^http://[^/]*\.apache\.org}, %r{^http://packages\.debian\.org}, %r{^http://wiki\.freedesktop\.org/}, - %r{^http://((?:www)\.)?gnupg.org/}, + %r{^http://((?:www)\.)?gnupg\.org/}, %r{^http://ietf\.org}, %r{^http://[^/.]+\.ietf\.org}, %r{^http://[^/.]+\.tools\.ietf\.org}, @@ -531,7 +531,7 @@ class FormulaAuditor def audit_github_repository return unless @online - regex = %r{https?://github.com/([^/]+)/([^/]+)/?.*} + regex = %r{https?://github\.com/([^/]+)/([^/]+)/?.*} _, user, repo = *regex.match(formula.stable.url) if formula.stable _, user, repo = *regex.match(formula.homepage) unless user return if !user || !repo diff --git a/Library/Homebrew/cmd/pull.rb b/Library/Homebrew/cmd/pull.rb index c3d8d1e8f..3b3c68930 100644 --- a/Library/Homebrew/cmd/pull.rb +++ b/Library/Homebrew/cmd/pull.rb @@ -51,7 +51,7 @@ module Homebrew issue = arg url = "https://github.com/Homebrew/homebrew-core/pull/#{arg}" tap = CoreTap.instance - elsif (testing_match = arg.match %r{brew.sh/job/Homebrew.*Testing/(\d+)/}) + elsif (testing_match = arg.match %r{brew\.sh/job/Homebrew.*Testing/(\d+)/}) _, testing_job = *testing_match url = "https://github.com/Homebrew/homebrew-core/compare/master...BrewTestBot:testing-#{testing_job}" tap = CoreTap.instance |
