Sha256: 3dfe60a7e7c9658a4805e74940aa37f86661c36e064246e71bc23a930b89ff31

Contents?: true

Size: 1.01 KB

Versions: 19

Compression:

Stored size: 1.01 KB

Contents

# Requirements
# =====================================================================

# package


# Declarations
# =======================================================================

module QB; end


# Definitions
# =======================================================================

module QB::CLI 
  
  # Show the help message.
  # 
  # @todo 
  #   We should have more types of help.
  # 
  # @return [1]
  #   Error exit status - we don't want `qb ... && ...` to move on to the 
  #   second command when we end up falling back to `help`.
  # 
  def self.help args = []
    metadata = if QB.gemspec.metadata && !QB.gemspec.metadata.empty?
      "metadata:\n" + QB.gemspec.metadata.map {|key, value|
        "  #{ key }: #{ value }"
      }.join("\n")
    end
    
    puts <<-END
version: #{ QB::VERSION }

#{ metadata }

syntax:

  qb ROLE [OPTIONS] DIRECTORY

use `qb ROLE -h` for role options.

available roles:

    END
    puts QB::Role.available
    puts
    
    return 1
  end # .help
  
end # module QB::CLI


Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
qb-0.4.5 lib/qb/cli/help.rb
qb-0.4.4 lib/qb/cli/help.rb
qb-0.4.3 lib/qb/cli/help.rb
qb-0.4.2 lib/qb/cli/help.rb
qb-0.4.1 lib/qb/cli/help.rb
qb-0.4.0 lib/qb/cli/help.rb
qb-0.3.25 lib/qb/cli/help.rb
qb-0.3.24 lib/qb/cli/help.rb
qb-0.3.23 lib/qb/cli/help.rb
qb-0.3.22 lib/qb/cli/help.rb
qb-0.3.21 lib/qb/cli/help.rb
qb-0.3.20 lib/qb/cli/help.rb
qb-0.3.19 lib/qb/cli/help.rb
qb-0.3.18 lib/qb/cli/help.rb
qb-0.3.17 lib/qb/cli/help.rb
qb-0.3.16 lib/qb/cli/help.rb
qb-0.3.15 lib/qb/cli/help.rb
qb-0.3.14 lib/qb/cli/help.rb
qb-0.3.13 lib/qb/cli/help.rb