aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorJack Nagel2014-06-22 15:00:15 -0500
committerJack Nagel2014-06-22 15:03:17 -0500
commitf7b71472fe139f6351af9871a889c78f9e13a1c5 (patch)
treebaed819539e34ad9d6e1197b4591848708948bb2 /Library/Homebrew/cmd
parent5cf83594155571ca67a85839d5c2cacc77fee4ea (diff)
downloadhomebrew-f7b71472fe139f6351af9871a889c78f9e13a1c5.tar.bz2
Move deprecated Formula class methods to compat
These have all been moved to Formulary.
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/bottle.rb2
-rw-r--r--Library/Homebrew/cmd/cleanup.rb4
-rw-r--r--Library/Homebrew/cmd/create.rb2
-rw-r--r--Library/Homebrew/cmd/diy.rb2
-rw-r--r--Library/Homebrew/cmd/doctor.rb8
-rw-r--r--Library/Homebrew/cmd/edit.rb2
-rw-r--r--Library/Homebrew/cmd/info.rb2
-rw-r--r--Library/Homebrew/cmd/irb.rb4
-rw-r--r--Library/Homebrew/cmd/link.rb2
-rw-r--r--Library/Homebrew/cmd/readall.rb2
-rw-r--r--Library/Homebrew/cmd/uninstall.rb4
11 files changed, 17 insertions, 17 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb
index 993f73466..f8b79734f 100644
--- a/Library/Homebrew/cmd/bottle.rb
+++ b/Library/Homebrew/cmd/bottle.rb
@@ -229,7 +229,7 @@ module Homebrew
puts output
if ARGV.include? '--write'
- f = Formula.factory formula_name
+ f = Formulary.factory(formula_name)
update_or_add = nil
Utils::Inreplace.inreplace(f.path) do |s|
diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb
index 3db9cca78..42ef7b329 100644
--- a/Library/Homebrew/cmd/cleanup.rb
+++ b/Library/Homebrew/cmd/cleanup.rb
@@ -39,7 +39,7 @@ module Homebrew
def cleanup_cellar
HOMEBREW_CELLAR.subdirs.each do |rack|
begin
- cleanup_formula Formula.factory(rack.basename.to_s)
+ cleanup_formula Formulary.factory(rack.basename.to_s)
rescue FormulaUnavailableError
# Don't complain about directories from DIY installs
end
@@ -80,7 +80,7 @@ module Homebrew
next unless (name = file.basename.to_s[/(.*)-(?:#{Regexp.escape(version)})/, 1])
begin
- f = Formula.factory(name)
+ f = Formulary.factory(name)
rescue FormulaUnavailableError
next
end
diff --git a/Library/Homebrew/cmd/create.rb b/Library/Homebrew/cmd/create.rb
index 3997cfb4a..2ea098e0c 100644
--- a/Library/Homebrew/cmd/create.rb
+++ b/Library/Homebrew/cmd/create.rb
@@ -51,7 +51,7 @@ module Homebrew
end
if Formula.aliases.include? fc.name
- realname = Formula.canonical_name fc.name
+ realname = Formulary.canonical_name(fc.name)
raise <<-EOS.undent
The formula #{realname} is already aliased to #{fc.name}
Please check that you are not creating a duplicate.
diff --git a/Library/Homebrew/cmd/diy.rb b/Library/Homebrew/cmd/diy.rb
index 98d57c819..736971a89 100644
--- a/Library/Homebrew/cmd/diy.rb
+++ b/Library/Homebrew/cmd/diy.rb
@@ -37,7 +37,7 @@ module Homebrew
def detected_name(path, version)
basename = path.basename.to_s
detected_name = basename[/(.*?)-?#{Regexp.escape(version)}/, 1] || basename
- canonical_name = Formula.canonical_name(detected_name)
+ canonical_name = Formulary.canonical_name(detected_name)
odie <<-EOS.undent if detected_name != canonical_name
The detected name #{detected_name.inspect} exists in Homebrew as an alias
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index eaf380c59..59bf59c45 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -570,7 +570,7 @@ def check_for_gettext
return if @found.empty?
# Our gettext formula will be caught by check_linked_keg_only_brews
- f = Formula.factory("gettext") rescue nil
+ f = Formulary.factory("gettext") rescue nil
return if f and f.linked_keg.directory? and @found.all? do |path|
Pathname.new(path).realpath.to_s.start_with? "#{HOMEBREW_CELLAR}/gettext"
end
@@ -585,7 +585,7 @@ end
def check_for_iconv
unless find_relative_paths("lib/libiconv.dylib", "include/iconv.h").empty?
- if (f = Formula.factory("libiconv") rescue nil) and f.linked_keg.directory?
+ if (f = Formulary.factory("libiconv") rescue nil) and f.linked_keg.directory?
if not f.keg_only? then <<-EOS.undent
A libiconv formula is installed and linked
This will break stuff. For serious. Unlink it.
@@ -993,7 +993,7 @@ def check_for_bad_python_symlink
end
def check_for_non_prefixed_coreutils
- gnubin = "#{Formula.factory('coreutils').prefix}/libexec/gnubin"
+ gnubin = "#{Formulary.factory('coreutils').prefix}/libexec/gnubin"
if paths.include? gnubin then <<-EOS.undent
Putting non-prefixed coreutils in your path can cause gmp builds to fail.
EOS
@@ -1051,7 +1051,7 @@ def check_for_unlinked_but_not_keg_only
true
elsif not (HOMEBREW_REPOSITORY/"Library/LinkedKegs"/rack.basename).directory?
begin
- Formula.factory(rack.basename.to_s).keg_only?
+ Formulary.factory(rack.basename.to_s).keg_only?
rescue FormulaUnavailableError
false
end
diff --git a/Library/Homebrew/cmd/edit.rb b/Library/Homebrew/cmd/edit.rb
index 08c730d79..a81280004 100644
--- a/Library/Homebrew/cmd/edit.rb
+++ b/Library/Homebrew/cmd/edit.rb
@@ -26,7 +26,7 @@ module Homebrew
else
# Don't use ARGV.formulae as that will throw if the file doesn't parse
paths = ARGV.named.map do |name|
- name = Formula.canonical_name name
+ name = Formulary.canonical_name(name)
Formula.path(name)
end
unless ARGV.force?
diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb
index 1e82bbaf1..23efe4b49 100644
--- a/Library/Homebrew/cmd/info.rb
+++ b/Library/Homebrew/cmd/info.rb
@@ -28,7 +28,7 @@ module Homebrew
ARGV.named.each_with_index do |f,i|
puts unless i == 0
begin
- info_formula Formula.factory(f)
+ info_formula Formulary.factory(f)
rescue FormulaUnavailableError
# No formula with this name, try a blacklist lookup
if (blacklist = blacklisted?(f))
diff --git a/Library/Homebrew/cmd/irb.rb b/Library/Homebrew/cmd/irb.rb
index 15c976e85..32a3bfc6d 100644
--- a/Library/Homebrew/cmd/irb.rb
+++ b/Library/Homebrew/cmd/irb.rb
@@ -4,12 +4,12 @@ require 'irb'
class Symbol
def f
- Formula.factory(self.to_s)
+ Formulary.factory(to_s)
end
end
class String
def f
- Formula.factory(self)
+ Formulary.factory(self)
end
end
diff --git a/Library/Homebrew/cmd/link.rb b/Library/Homebrew/cmd/link.rb
index 21c2379cf..bd36ec25a 100644
--- a/Library/Homebrew/cmd/link.rb
+++ b/Library/Homebrew/cmd/link.rb
@@ -49,7 +49,7 @@ module Homebrew
private
def keg_only?(name)
- Formula.factory(name).keg_only?
+ Formulary.factory(name).keg_only?
rescue FormulaUnavailableError
false
end
diff --git a/Library/Homebrew/cmd/readall.rb b/Library/Homebrew/cmd/readall.rb
index fa65d8cf2..f43b30bfd 100644
--- a/Library/Homebrew/cmd/readall.rb
+++ b/Library/Homebrew/cmd/readall.rb
@@ -22,7 +22,7 @@ module Homebrew
formulae.sort.each do |n|
begin
- Formula.factory(n)
+ Formulary.factory(n)
rescue Exception => e
onoe "problem in #{Formula.path(n)}"
puts e
diff --git a/Library/Homebrew/cmd/uninstall.rb b/Library/Homebrew/cmd/uninstall.rb
index f26f38fde..bfc521ff0 100644
--- a/Library/Homebrew/cmd/uninstall.rb
+++ b/Library/Homebrew/cmd/uninstall.rb
@@ -17,7 +17,7 @@ module Homebrew
end
else
ARGV.named.each do |name|
- name = Formula.canonical_name(name)
+ name = Formulary.canonical_name(name)
rack = HOMEBREW_CELLAR/name
if rack.directory?
@@ -41,6 +41,6 @@ module Homebrew
end
def rm_pin name
- Formula.factory(name).unpin rescue nil
+ Formulary.factory(name).unpin rescue nil
end
end