Sha256: c7ec7e90f1c9e9ca8948e7d812aaa5745f8e955bac4e44aaed867f37b7f6aaff

Contents?: true

Size: 844 Bytes

Versions: 1

Compression:

Stored size: 844 Bytes

Contents

# frozen_string_literal: true

require 'xezat'

module Xezat
  module Command
    class Bump
      def get_compilers(languages, _variables)
        Xezat.logger.debug('  Collect compilers')
        compiler_file = File.expand_path(File.join(DATA_DIR, 'compilers.yaml'))
        compiler_candidates = YAML.safe_load(File.open(compiler_file), [Symbol])
        compilers = []
        languages.uniq.each do |language|
          next unless compiler_candidates.key?(language)

          compiler_candidate = compiler_candidates[language]
          compilers << compiler_candidate['package'].intern
          next unless compiler_candidate.key?('dependencies')

          compiler_candidate['dependencies'].each do |dependency|
            compilers << dependency.intern
          end
        end
        compilers.uniq
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xezat-0.2.3 lib/xezat/command/bump/compiler.rb