class Matrixeval::Config
Public Class Methods
all_mounts()
click to toggle source
# File lib/matrixeval/config.rb, line 83 def all_mounts mounts + all_variant_mounts end
commands()
click to toggle source
# File lib/matrixeval/config.rb, line 64 def commands cmds = YAML["commands"] || [] COMMANDS + target.support_commands + cmds end
docker_compose_extend_raw()
click to toggle source
# File lib/matrixeval/config.rb, line 69 def docker_compose_extend_raw DockerCompose::ExtendRaw.new( YAML["docker-compose-extend"] || {} ) end
env()
click to toggle source
# File lib/matrixeval/config.rb, line 75 def env YAML["env"] || {} end
exclusions()
click to toggle source
# File lib/matrixeval/config.rb, line 56 def exclusions YAML["exclude"] || [] end
main_vector()
click to toggle source
# File lib/matrixeval/config.rb, line 36 def main_vector vectors.find(&:main?) end
main_vector_variants()
click to toggle source
# File lib/matrixeval/config.rb, line 48 def main_vector_variants main_vector.variants end
mounts()
click to toggle source
# File lib/matrixeval/config.rb, line 79 def mounts YAML["mounts"] || [] end
parallel_workers()
click to toggle source
# File lib/matrixeval/config.rb, line 60 def parallel_workers YAML["parallel_workers"] || "number_of_processors" end
project_name()
click to toggle source
# File lib/matrixeval/config.rb, line 20 def project_name name = YAML["project_name"] if name.nil? || name.strip.empty? raise Error.new('missing project_name') end name end
rest_vector_variants_matrix()
click to toggle source
# File lib/matrixeval/config.rb, line 52 def rest_vector_variants_matrix rest_vectors.map(&:variants) end
rest_vectors()
click to toggle source
# File lib/matrixeval/config.rb, line 40 def rest_vectors vectors.reject(&:main?) end
target()
click to toggle source
# File lib/matrixeval/config.rb, line 16 def target @target ||= target_klass.new end
target_name()
click to toggle source
# File lib/matrixeval/config.rb, line 12 def target_name YAML["target"] end
variant_combinations()
click to toggle source
# File lib/matrixeval/config.rb, line 44 def variant_combinations main_vector_variants.product(*rest_vector_variants_matrix) end
vectors()
click to toggle source
# File lib/matrixeval/config.rb, line 30 def vectors @vectors = YAML["matrix"].map do |key, vector_config| Vector.new(key, vector_config) end end
version()
click to toggle source
# File lib/matrixeval/config.rb, line 8 def version YAML["version"] end
Private Class Methods
all_variant_mounts()
click to toggle source
# File lib/matrixeval/config.rb, line 89 def all_variant_mounts Config.vectors .map(&:variants).flatten .map(&:mounts).flatten end
target_klass()
click to toggle source
# File lib/matrixeval/config.rb, line 95 def target_klass Matrixeval.targets[target_name&.to_sym] || Target end