aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Fontaine2015-12-27 19:12:27 +0100
committerBaptiste Fontaine2015-12-27 22:16:46 +0100
commitb7e98b129cc19d0d4ce283a358785665ac100212 (patch)
treecf02380494a7da080a02a03655a92cbf300fc6b6
parente224c2fc9eb136b43be9a46f74061dc8a37feb71 (diff)
downloadbrew-b7e98b129cc19d0d4ce283a358785665ac100212.tar.bz2
cmd/options.rb: move common code in options.rb
Closes Homebrew/homebrew#47423. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
-rw-r--r--Library/Homebrew/cmd/info.rb2
-rw-r--r--Library/Homebrew/cmd/options.rb9
-rw-r--r--Library/Homebrew/options.rb10
3 files changed, 12 insertions, 9 deletions
diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb
index fcc0c6710..fb31c0a94 100644
--- a/Library/Homebrew/cmd/info.rb
+++ b/Library/Homebrew/cmd/info.rb
@@ -1,6 +1,6 @@
require "blacklist"
require "caveats"
-require "cmd/options"
+require "options"
require "formula"
require "keg"
require "tab"
diff --git a/Library/Homebrew/cmd/options.rb b/Library/Homebrew/cmd/options.rb
index 9db4f2f9c..f9d3ad793 100644
--- a/Library/Homebrew/cmd/options.rb
+++ b/Library/Homebrew/cmd/options.rb
@@ -1,4 +1,5 @@
require "formula"
+require "options"
module Homebrew
def options
@@ -24,12 +25,4 @@ module Homebrew
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
diff --git a/Library/Homebrew/options.rb b/Library/Homebrew/options.rb
index ba10dca8b..1d92fbf47 100644
--- a/Library/Homebrew/options.rb
+++ b/Library/Homebrew/options.rb
@@ -112,3 +112,13 @@ class Options
"#<#{self.class.name}: #{to_a.inspect}>"
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