Sha256: 9650b9df7b172f59629ddb64ec435eccf96de5c732dc640d8e3c5a1d1e43ad0f

Contents?: true

Size: 912 Bytes

Versions: 118

Compression:

Stored size: 912 Bytes

Contents

require "cc/analyzer"

module CC
  module CLI
    module Engines
      class EngineCommand < Command
        include CC::Analyzer

        private

        def engine_name
          @engine_name ||= @args.first
        end

        def parsed_yaml
          @parsed_yaml ||= CC::Analyzer::Config.new(yaml_content)
        end

        def yaml_content
          filesystem.read_path(CODECLIMATE_YAML).freeze
        end

        def update_yaml
          filesystem.write_path(CODECLIMATE_YAML, parsed_yaml.to_yaml)
        end

        def engine_present_in_yaml?
          parsed_yaml.engine_present?(engine_name)
        end

        def engine_enabled?
          parsed_yaml.engine_enabled?(engine_name)
        end

        def engine_exists?
          engine_registry.exists?(engine_name)
        end

        def engine_registry_list
          engine_registry.list
        end
      end
    end
  end
end

Version data entries

118 entries across 118 versions & 1 rubygems

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