提交 9552878d 编写于 作者: J Joey Marianer

Don't break configurations.each, .first before the deprecation period

上级 ff625636
......@@ -91,6 +91,19 @@ def empty?
end
alias :blank? :empty?
def each
throw_getter_deprecation(:each)
configurations.each { |config|
yield [config.env_name, config.config]
}
end
def first
throw_getter_deprecation(:first)
config = configurations.first
[config.env_name, config.config]
end
private
def env_with_configs(env = nil)
if env
......@@ -174,9 +187,6 @@ def merge_url_with_configs(url, configs)
def method_missing(method, *args, &blk)
case method
when :each, :first
throw_getter_deprecation(method)
configurations.send(method, *args, &blk)
when :fetch
throw_getter_deprecation(method)
configs_for(env_name: args.first)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册