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.4.1 lib/cc/cli/help.rb
codeclimate-0.4.0 lib/cc/cli/help.rb
codeclimate-0.3.2 lib/cc/cli/help.rb
codeclimate-0.3.1 lib/cc/cli/help.rb
codeclimate-0.3.0 lib/cc/cli/help.rb
codeclimate-0.2.12 lib/cc/cli/help.rb
codeclimate-0.2.11 lib/cc/cli/help.rb
codeclimate-0.2.9 lib/cc/cli/help.rb
codeclimate-0.2.7 lib/cc/cli/help.rb
codeclimate-0.2.6 lib/cc/cli/help.rb
codeclimate-0.2.4 lib/cc/cli/help.rb
codeclimate-0.2.2 lib/cc/cli/help.rb
codeclimate-0.2.1 lib/cc/cli/help.rb
codeclimate-0.2 lib/cc/cli/help.rb
codeclimate-0.1.5 lib/cc/cli/help.rb
codeclimate-0.1.4 lib/cc/cli/help.rb
codeclimate-0.1.3 lib/cc/cli/help.rb
codeclimate-0.1.2 lib/cc/cli/help.rb
codeclimate-0.1.0 lib/cc/cli/help.rb
codeclimate-0.0.25 lib/cc/cli/help.rb