aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2015-05-14 00:01:00 -0400
committerJack Nagel2015-05-14 00:01:00 -0400
commitc16a1d9aba841fd69627af9e906d4833ab66a0d3 (patch)
tree3452ef58c5ffa9529d88559f9c41b4adfd98bfaa /Library
parent68a654dd267ff6f0ca7ee5300fccddddaabe803a (diff)
downloadbrew-c16a1d9aba841fd69627af9e906d4833ab66a0d3.tar.bz2
Extend gnome stable/unstable audit to download.gnome.org URLs
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/audit.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index d0f5d5d05..656029efd 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -349,8 +349,9 @@ class FormulaAuditor
end
stable = formula.stable
- if stable && stable.url =~ /#{Regexp.escape("ftp.gnome.org/pub/GNOME/sources")}/i
- minor_version = stable.version.to_s[/\d\.(\d+)/, 1].to_i
+ case stable && stable.url
+ when %r{download\.gnome\.org/sources}, %r{ftp\.gnome\.org/pub/GNOME/sources}i
+ minor_version = Version.parse(stable.url).to_s.split(".", 3)[1].to_i
if minor_version.odd?
problem "#{stable.version} is a development release"