Sha256: 554af088bf2b48c76a7d0b32e3d3ec2995b96f41cc045e0dd44291f4af150689

Contents?: true

Size: 830 Bytes

Versions: 2

Compression:

Stored size: 830 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.json'))
        compiler_candidates = JSON.parse(File.read(compiler_file))
        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

2 entries across 2 versions & 1 rubygems

Version Path
xezat-0.2.2 lib/xezat/command/bump/compiler.rb
xezat-0.2.1 lib/xezat/command/bump/compiler.rb