Sha256: c2ea0f95c2cd74770abbb40bf605b965c576b1408a9c87adf0357351c258bf17
Contents?: true
Size: 896 Bytes
Versions: 39
Compression:
Stored size: 896 Bytes
Contents
require "cc/cli/config_generator" module CC module CLI class UpgradeConfigGenerator < ConfigGenerator def can_generate? errors.blank? end def errors existing_yaml.errors end def exclude_paths (existing_yaml.exclude_paths || []).map(&:to_s) end def post_generation_verb "upgraded" end private def engine_eligible?(engine) base_eligible = super if engine["upgrade_languages"].present? base_eligible && (engine["upgrade_languages"] & classic_languages).any? else base_eligible end end def classic_languages @classic_languages ||= existing_yaml.languages.reject { |_, v| !v }.map(&:first) end def existing_yaml @existing_yaml ||= CC::Yaml.parse(File.read(CODECLIMATE_YAML)) end end end end
Version data entries
39 entries across 39 versions & 1 rubygems