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.18.4 lib/cc/cli/engines/engine_command.rb
codeclimate-0.18.3 lib/cc/cli/engines/engine_command.rb
codeclimate-0.18.2 lib/cc/cli/engines/engine_command.rb
codeclimate-0.18.1 lib/cc/cli/engines/engine_command.rb
codeclimate-0.18.0 lib/cc/cli/engines/engine_command.rb
codeclimate-0.17.0 lib/cc/cli/engines/engine_command.rb
codeclimate-0.16.6 lib/cc/cli/engines/engine_command.rb
codeclimate-0.16.5 lib/cc/cli/engines/engine_command.rb
codeclimate-0.16.4 lib/cc/cli/engines/engine_command.rb
codeclimate-0.16.3 lib/cc/cli/engines/engine_command.rb
codeclimate-0.16.2 lib/cc/cli/engines/engine_command.rb
codeclimate-0.16.1 lib/cc/cli/engines/engine_command.rb
codeclimate-0.16.0 lib/cc/cli/engines/engine_command.rb
codeclimate-0.15.2 lib/cc/cli/engines/engine_command.rb
codeclimate-0.15.1 lib/cc/cli/engines/engine_command.rb
codeclimate-0.15.0 lib/cc/cli/engines/engine_command.rb
codeclimate-0.14.7 lib/cc/cli/engines/engine_command.rb
codeclimate-0.14.6 lib/cc/cli/engines/engine_command.rb
codeclimate-0.14.5 lib/cc/cli/engines/engine_command.rb
codeclimate-0.14.4 lib/cc/cli/engines/engine_command.rb