cmd/run.rb in bahuvrihi-tap-0.11.2 vs cmd/run.rb in bahuvrihi-tap-0.12.0
- old
+ new
@@ -11,27 +11,25 @@
#
# handle options
#
dump = false
-OptionParser.new do |opts|
+ConfigParser.new do |opts|
opts.separator ""
opts.separator "configurations:"
- Tap::App.configurations.each do |receiver, key, config|
- next if receiver == Tap::Root
-
- opts.on(*config.to_optparse_argv) do |value|
- app.send(config.writer, value)
- end
+ root_keys = Tap::Root.configurations.keys
+ Tap::App.configurations.each_pair do |key, config|
+ next if root_keys.include?(key)
+ opts.define(key, config.default, config.attributes)
end
opts.separator ""
opts.separator "options:"
-
+
opts.on("-h", "--help", "Show this message") do
- opts.banner = Tap::Support::Lazydoc.usage(__FILE__)
Tap::App.lazydoc.resolve
+ puts Lazydoc.usage(__FILE__)
puts opts
exit
end
opts.on('-T', '--manifest', 'Print a list of available tasks') do |v|