Sha256: df58949ce591711ad1c0a616894e550c5c0d7e6428b4b6895cc8d044feb380c8

Contents?: true

Size: 1.35 KB

Versions: 12

Compression:

Stored size: 1.35 KB

Contents

# -*- coding: UTF-8 -*-

require 'build-tool/commands'

module BuildTool; module Commands;

    #
    # BuildCommand
    #
    class Info < Standard

        name        "info"
        description "show info"
        long_description [ "Show information about the currently used recipe" ]

        def initialize_options
            options.banner = "Usage: #{self.fullname} [OPTIONS]..."
            options.separator( "" )
            options.separator( "Options" )
            super
        end

        def applicable?
            BuildTool::Application.instance.has_recipe?
        end

        def do_execute( args )
            if args.length != 0
                # *TODO* print better message
                warn( "Arguments ignored." )
            end

            recipe = configuration.recipe
            info( "Recipe" )
            info( "------" )
            info( "Name:      #{recipe.name}" )
            info( "Short:     #{recipe.short_description}" )
            info( "Long:      #{recipe.long_description}" )
            info( "Full Path: #{recipe.global_config_file_path('recipe')}" )
            info( "" )
            info( "Configuration" )
            info( "-------------" )
            info( "Overrides: #{ recipe.local_config_file_path( 'recipe' ) }" )

            return 0
        end

    end # class Info

end; end # module BuildTool::Commands



Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
build-tool-0.6.9 lib/build-tool/commands/info.rb
build-tool-0.6.8 lib/build-tool/commands/info.rb
build-tool-0.6.7 lib/build-tool/commands/info.rb
build-tool-0.6.6 lib/build-tool/commands/info.rb
build-tool-0.6.5 lib/build-tool/commands/info.rb
build-tool-0.6.4 lib/build-tool/commands/info.rb
build-tool-0.6.3 lib/build-tool/commands/info.rb
build-tool-0.6.2 lib/build-tool/commands/info.rb
build-tool-0.6.1 lib/build-tool/commands/info.rb
build-tool-0.6.0 lib/build-tool/commands/info.rb
build-tool-0.6.0.rc2 lib/build-tool/commands/info.rb
build-tool-0.6.0.rc1 lib/build-tool/commands/info.rb