Sha256: a94fc9b2d099a20b333a09896e301b18e40e96ff061e1b2316a8433384710729

Contents?: true

Size: 1.31 KB

Versions: 12

Compression:

Stored size: 1.31 KB

Contents

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: #{Pathname.new($0).basename} #{self.fullname}"
            super
        end

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

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

            recipe = configuration.recipe
            say "Recipe"
            say "------"
            say "Name:      #{recipe.name}"
            say "Short:     #{recipe.short_description}"
            say "Long:      #{recipe.long_description}"
            say "Full Path: #{recipe.global_config_file_path('recipe')}"
            say ""
            say "Configuration"
            say "-------------"
            say "Settings:  #{ Application::instance.local_settings_file_path }"
            say "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.5.7 lib/build-tool/commands/info.rb
build-tool-0.5.6 lib/build-tool/commands/info.rb
build-tool-0.5.5 lib/build-tool/commands/info.rb
build-tool-0.5.4 lib/build-tool/commands/info.rb
build-tool-0.5.3 lib/build-tool/commands/info.rb
build-tool-0.5.2 lib/build-tool/commands/info.rb
build-tool-0.4.6 lib/build-tool/commands/info.rb
build-tool-0.5.1 lib/build-tool/commands/info.rb
build-tool-0.4.5 lib/build-tool/commands/info.rb
build-tool-0.5.0 lib/build-tool/commands/info.rb
build-tool-0.4.4 lib/build-tool/commands/info.rb
build-tool-0.4.3 lib/build-tool/commands/info.rb