Sha256: 0d18341553b8848e67c3c2ff45a3ee4bc78f989d5a837c9c1e03a5866b9fa9f5

Contents?: true

Size: 653 Bytes

Versions: 145

Compression:

Stored size: 653 Bytes

Contents

require "cc/analyzer"

module CC
  module CLI
    module Engines
      class Remove < 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."
          else
            remove_engine
            update_yaml
            say "Engine removed from .codeclimate.yml."
          end
        end

        private

        def remove_engine
          parsed_yaml.remove_engine(engine_name)
        end
      end
    end
  end
end

Version data entries

145 entries across 145 versions & 1 rubygems

Version Path
codeclimate-0.14.3 lib/cc/cli/engines/remove.rb
codeclimate-0.14.2 lib/cc/cli/engines/remove.rb
codeclimate-0.14.1 lib/cc/cli/engines/remove.rb
codeclimate-0.14.0 lib/cc/cli/engines/remove.rb
codeclimate-0.13.0 lib/cc/cli/engines/remove.rb
codeclimate-0.11.0 lib/cc/cli/engines/remove.rb
codeclimate-0.10.1 lib/cc/cli/engines/remove.rb
codeclimate-0.10.0 lib/cc/cli/engines/remove.rb
codeclimate-0.9.7 lib/cc/cli/engines/remove.rb
codeclimate-0.9.6 lib/cc/cli/engines/remove.rb
codeclimate-0.9.5 lib/cc/cli/engines/remove.rb
codeclimate-0.9.4 lib/cc/cli/engines/remove.rb
codeclimate-0.9.3 lib/cc/cli/engines/remove.rb
codeclimate-0.9.2 lib/cc/cli/engines/remove.rb
codeclimate-0.9.1 lib/cc/cli/engines/remove.rb
codeclimate-0.9.0 lib/cc/cli/engines/remove.rb
codeclimate-0.8.1 lib/cc/cli/engines/remove.rb
codeclimate-0.8.0 lib/cc/cli/engines/remove.rb
codeclimate-0.7.2 lib/cc/cli/engines/remove.rb
codeclimate-0.7.0 lib/cc/cli/engines/remove.rb