mirror of
https://github.com/jimeh/amqp-failover.git
synced 2026-02-19 02:46:43 +00:00
removed yaml dependency by getting rid of now
useless #load_yaml and #load_file methods from Failover::Configurations
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
# encoding: utf-8
|
||||
|
||||
require 'yaml'
|
||||
|
||||
require 'amqp/failover_client'
|
||||
require 'amqp/failover/config'
|
||||
require 'amqp/failover/configurations'
|
||||
|
||||
@@ -66,15 +66,6 @@ module AMQP
|
||||
self[(current+1 == self.size) ? 0 : current+1] if current
|
||||
end
|
||||
|
||||
def load_file(file, env = nil)
|
||||
raise ArgumentError, "Can't find #{file}" unless File.exists?(file)
|
||||
load(YAML.load_file(file)[env || "development"])
|
||||
end
|
||||
|
||||
def load_yaml(data, env = nil)
|
||||
load(YAML.load(data)[env || "development"])
|
||||
end
|
||||
|
||||
def load(conf)
|
||||
if conf.is_a?(Array)
|
||||
load_array(conf)
|
||||
|
||||
Reference in New Issue
Block a user