Sha256: 6457c1b30b57a533a82f2b4f145ef77a8af42aaba9c90e8f06325b3b27204ffe

Contents?: true

Size: 1.35 KB

Versions: 12

Compression:

Stored size: 1.35 KB

Contents

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

require 'build-tool/commands'
require 'build-tool/recipe'

require 'fileutils'

module BuildTool; module Commands; module Recipes

    #
    # BuildCommand
    #
    class Info < Standard

        name        "info"
        description "show information about a module."
        long_description [ "Show detailed information about RECIPE." ]

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

        def do_execute( args )
            if ( args.length != 1 )
                return usage( args.length == 0 ?  "Not enough arguments" : "To many arguments" )
            end

            rec = Recipe.new( args[0] )
            info( "Description: #{rec.short_description}" )
            info( "Website: #{rec.website}" ) if rec.website
            info( "Repository: #{rec.repository}" ) if rec.repository
            info( "Browse Repository: #{rec.browse_repository}" ) if rec.browse_repository
            if rec.long_description
                info( "Long Description:" )
                    info( rec.long_description )
                info( "" )
            end

            return 0
        end

    end # class

end; end # module Commands::Recipes

end; # module BuildTool



Version data entries

12 entries across 12 versions & 1 rubygems

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