aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorDominyk Tiller2016-08-28 05:01:14 +0100
committerGitHub2016-08-28 05:01:14 +0100
commit8e29cf1b1d39f5d86aaeb702597aa34d97cd763a (patch)
tree1a8e7791775458e32ca73e227d84496898143a13 /Library/Homebrew
parent7c5e149b1b56f59ce36dae145961d5ceb6cd3ac9 (diff)
parentab203a749f050486bd174fc7e29bd2a246333b80 (diff)
downloadbrew-8e29cf1b1d39f5d86aaeb702597aa34d97cd763a.tar.bz2
Merge pull request #812 from DomT4/at
formulary: handle @ formulae.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/search.rb2
-rw-r--r--Library/Homebrew/formulary.rb1
-rw-r--r--Library/Homebrew/test/test_formulary.rb1
3 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb
index 526c7220d..2a100083d 100644
--- a/Library/Homebrew/cmd/search.rb
+++ b/Library/Homebrew/cmd/search.rb
@@ -83,7 +83,7 @@ module Homebrew
end
if $stdout.tty?
- metacharacters = %w[\\ | ( ) [ ] { } ^ $ * + ? .]
+ metacharacters = %w[\\ | ( ) [ ] { } ^ $ * + ?]
bad_regex = metacharacters.any? do |char|
ARGV.any? do |arg|
arg.include?(char) && !arg.start_with?("/")
diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb
index 9d385fc51..162385e60 100644
--- a/Library/Homebrew/formulary.rb
+++ b/Library/Homebrew/formulary.rb
@@ -57,6 +57,7 @@ class Formulary
class_name = name.capitalize
class_name.gsub!(/[-_.\s]([a-zA-Z0-9])/) { $1.upcase }
class_name.tr!("+", "x")
+ class_name.gsub!(/\b@\b/, "AT")
class_name
end
diff --git a/Library/Homebrew/test/test_formulary.rb b/Library/Homebrew/test/test_formulary.rb
index 7a3ab65e0..abc034e14 100644
--- a/Library/Homebrew/test/test_formulary.rb
+++ b/Library/Homebrew/test/test_formulary.rb
@@ -10,6 +10,7 @@ class FormularyTest < Homebrew::TestCase
assert_equal "SLang", Formulary.class_s("s-lang")
assert_equal "PkgConfig", Formulary.class_s("pkg-config")
assert_equal "FooBar", Formulary.class_s("foo_bar")
+ assert_equal "OpensslAT11", Formulary.class_s("openssl@1.1")
end
end