Sha256: d73733fb7feb62710b2240c717248d5466081a90c1239373d01478b7022fc380
Contents?: true
Size: 1.39 KB
Versions: 12
Compression:
Stored size: 1.39 KB
Contents
# -*- coding: UTF-8 -*- require 'build-tool/commands' module BuildTool; module Commands; module Configuration # # BuildCommand # class List < Standard name "list" description "Print a alphabetically sorted list of configuration options." long_description [ "Prints an alphabetically sorted list of configuration options. If no arguments are given it lists all, if arguments are specified it prints those matching them." ] def initialize_options options.banner = "Usage: #{self.fullname} [OPTIONS]... NAMES..." options.separator( "" ) options.separator( "Options" ) super end def applicable? BuildTool::Application.instance.has_recipe? end def do_execute( args ) return show_config_options( args ) end def show_config_options( only ) for option in BuildTool::Setting::export( BuildTool::Application.instance.configuration.settings, only ) verbose( blue( "# #{option[:description].split( "\n" ).join( "\n# " ) }" ) ) info( '%-30s: %s' % [ option[:name], option[:value] ] ) verbose( "" ) end return 0 end end # class end; end; end # module BuildTool::Commands::Configuration
Version data entries
12 entries across 12 versions & 1 rubygems