Sha256: 3bf7c5482d1eb10c4ff2c8be765d1e329697bec1f2c996b582efdd8a344539b0
Contents?: true
Size: 426 Bytes
Versions: 4
Compression:
Stored size: 426 Bytes
Contents
require 'yaml' class TestConfiguration attr_reader :resque_redis_port, :rabbit_port def initialize(docker_compose_file) yaml = YAML.load_file(docker_compose_file) @resque_redis_port = (ENV["PWWKA_RESQUE_REDIS_PORT"] || yaml["services"]["resque"]["ports"].first.split(/:/)[0]).to_i @rabbit_port = (ENV["PWWKA_RABBIT_PORT"] || yaml["services"]["rabbit"]["ports"].first.split(/:/)[0]).to_i end end
Version data entries
4 entries across 4 versions & 1 rubygems