Sha256: c99f25c7302d6013cf2b4baefc92899972984cee4f9879ec0f40c89e0f3052d8

Contents?: true

Size: 781 Bytes

Versions: 57

Compression:

Stored size: 781 Bytes

Contents

require "rainbow"

module CC
  module CLI
    class Help < Command
      def run
        say "Usage: codeclimate COMMAND ...\n\nAvailable commands:\n"
        commands.each do |command|
          say "    #{command}"
        end
      end

      private

      def commands
        [
          "analyze [-f format]",
          "console",
          "engines:disable #{underline('engine_name')}",
          "engines:enable #{underline('engine_name')}",
          "engines:install",
          "engines:list",
          "engines:remove #{underline('engine_name')}",
          "help",
          "init",
          "validate-config",
          "version"
        ].freeze
      end

      def underline(string)
        return Rainbow.new.wrap(string).underline
      end
    end
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
codeclimate-0.9.7 lib/cc/cli/help.rb
codeclimate-0.9.6 lib/cc/cli/help.rb
codeclimate-0.9.5 lib/cc/cli/help.rb
codeclimate-0.9.4 lib/cc/cli/help.rb
codeclimate-0.9.3 lib/cc/cli/help.rb
codeclimate-0.9.2 lib/cc/cli/help.rb
codeclimate-0.9.1 lib/cc/cli/help.rb
codeclimate-0.9.0 lib/cc/cli/help.rb
codeclimate-0.8.1 lib/cc/cli/help.rb
codeclimate-0.8.0 lib/cc/cli/help.rb
codeclimate-0.7.2 lib/cc/cli/help.rb
codeclimate-0.7.0 lib/cc/cli/help.rb
codeclimate-0.6.4 lib/cc/cli/help.rb
codeclimate-0.6.3 lib/cc/cli/help.rb
codeclimate-0.6.2 lib/cc/cli/help.rb
codeclimate-0.6.1 lib/cc/cli/help.rb
codeclimate-0.6.0 lib/cc/cli/help.rb
codeclimate-0.5.0 lib/cc/cli/help.rb
codeclimate-0.4.4 lib/cc/cli/help.rb
codeclimate-0.4.3 lib/cc/cli/help.rb