Sha256: 70589b66a6c103e518e2bb971e76d39cc7f9e412fffdfba362aeaa6bfcce3160
Contents?: true
Size: 987 Bytes
Versions: 6
Compression:
Stored size: 987 Bytes
Contents
#$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH << "." unless $LOAD_PATH.include? "." # moronic 1.9.2 breaks things bad require 'spec' require 'yaml' require 'amqp-spec/rspec' require 'shared_examples' #require File.join(File.dirname(__FILE__), '..', 'lib', 'amqp-spec', 'rspec.rb') amqp_config = File.dirname(__FILE__) + '/amqp.yml' if File.exists? amqp_config class Hash def symbolize_keys self.inject({}) { |result, (key, value)| new_key = case key when String then key.to_sym else key end new_value = case value when Hash then value.symbolize_keys else value end result[new_key] = new_value result } end end AMQP_OPTS = YAML::load_file(amqp_config).symbolize_keys[:test] end
Version data entries
6 entries across 6 versions & 1 rubygems