Sha256: 47207b673b08f6fcc588364afd519b01e1a2fbcae3b7a02f4cacf04137fcfb00

Contents?: true

Size: 712 Bytes

Versions: 145

Compression:

Stored size: 712 Bytes

Contents

require "cc/analyzer"

module CC
  module CLI
    module Engines
      class Disable < EngineCommand
        def run
          require_codeclimate_yml

          if !engine_exists?
            say "Engine not found. Run 'codeclimate engines:list' for a list of valid engines."
          elsif !engine_present_in_yaml?
            say "Engine not found in .codeclimate.yml."
          elsif !engine_enabled?
            say "Engine already disabled."
          else
            disable_engine
            update_yaml
            say "Engine disabled."
          end
        end

        private

        def disable_engine
          parsed_yaml.disable_engine(engine_name)
        end
      end
    end
  end
end

Version data entries

145 entries across 145 versions & 1 rubygems

Version Path
codeclimate-0.34.0 lib/cc/cli/engines/disable.rb
codeclimate-0.33.0 lib/cc/cli/engines/disable.rb
codeclimate-0.32.1 lib/cc/cli/engines/disable.rb
codeclimate-0.32.0 lib/cc/cli/engines/disable.rb
codeclimate-0.32.0.rc1 lib/cc/cli/engines/disable.rb
codeclimate-0.31.1 lib/cc/cli/engines/disable.rb
codeclimate-0.31.0 lib/cc/cli/engines/disable.rb
codeclimate-0.30.1 lib/cc/cli/engines/disable.rb
codeclimate-0.30.0 lib/cc/cli/engines/disable.rb
codeclimate-0.29.0 lib/cc/cli/engines/disable.rb
codeclimate-0.28.0 lib/cc/cli/engines/disable.rb
codeclimate-0.27.2 lib/cc/cli/engines/disable.rb
codeclimate-0.27.1 lib/cc/cli/engines/disable.rb
codeclimate-0.27.0 lib/cc/cli/engines/disable.rb
codeclimate-0.27.0.rc1 lib/cc/cli/engines/disable.rb
codeclimate-0.26.0 lib/cc/cli/engines/disable.rb
codeclimate-0.25.1 lib/cc/cli/engines/disable.rb
codeclimate-0.25.0 lib/cc/cli/engines/disable.rb
codeclimate-0.24.3 lib/cc/cli/engines/disable.rb
codeclimate-0.24.2 lib/cc/cli/engines/disable.rb