From de1049f1f1237a31f8ac6a0b9b31ebdbc78030d4 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Wed, 13 Jul 2016 16:19:51 +0800 Subject: various: proper escape dot in regex --- Library/Homebrew/cmd/audit.rb | 4 ++-- Library/Homebrew/cmd/pull.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Library/Homebrew/cmd') 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 -- cgit v1.2.3