cmd/options.rb: move common code in options.rb
Closes Homebrew/homebrew#47423. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
This commit is contained in:
parent
e224c2fc9e
commit
b7e98b129c
@ -1,6 +1,6 @@
|
|||||||
require "blacklist"
|
require "blacklist"
|
||||||
require "caveats"
|
require "caveats"
|
||||||
require "cmd/options"
|
require "options"
|
||||||
require "formula"
|
require "formula"
|
||||||
require "keg"
|
require "keg"
|
||||||
require "tab"
|
require "tab"
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
require "formula"
|
require "formula"
|
||||||
|
require "options"
|
||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
def options
|
def options
|
||||||
@ -24,12 +25,4 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def dump_options_for_formula(f)
|
|
||||||
f.options.sort_by(&:flag).each do |opt|
|
|
||||||
puts "#{opt.flag}\n\t#{opt.description}"
|
|
||||||
end
|
|
||||||
puts "--devel\n\tInstall development version #{f.devel.version}" if f.devel
|
|
||||||
puts "--HEAD\n\tInstall HEAD version" if f.head
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@ -112,3 +112,13 @@ class Options
|
|||||||
"#<#{self.class.name}: #{to_a.inspect}>"
|
"#<#{self.class.name}: #{to_a.inspect}>"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
module Homebrew
|
||||||
|
def dump_options_for_formula(f)
|
||||||
|
f.options.sort_by(&:flag).each do |opt|
|
||||||
|
puts "#{opt.flag}\n\t#{opt.description}"
|
||||||
|
end
|
||||||
|
puts "--devel\n\tInstall development version #{f.devel.version}" if f.devel
|
||||||
|
puts "--HEAD\n\tInstall HEAD version" if f.head
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user