2010-09-21 14:11:15 -04:00
|
|
|
class Local < Fog::Bin
|
2010-05-02 01:10:11 -04:00
|
|
|
class << self
|
|
|
|
|
2010-09-21 14:11:15 -04:00
|
|
|
def [](service)
|
|
|
|
@@connections ||= Hash.new do |hash, key|
|
|
|
|
hash[key] = case key
|
|
|
|
when :files
|
|
|
|
location = caller.first
|
|
|
|
warning = "[yellow][WARN] Local[:files] is deprecated, use Local[:storage] instead[/]"
|
|
|
|
warning << " [light_black](" << location << ")[/] "
|
|
|
|
Formatador.display_line(warning)
|
|
|
|
Fog::Local::Storage.new
|
|
|
|
when :storage
|
|
|
|
Fog::Local::Storage.new
|
2010-05-02 01:10:11 -04:00
|
|
|
end
|
|
|
|
end
|
2010-09-21 14:11:15 -04:00
|
|
|
@@connections[service]
|
|
|
|
end
|
2010-05-02 01:10:11 -04:00
|
|
|
|
2010-09-21 14:11:15 -04:00
|
|
|
def services
|
|
|
|
[:storage]
|
2010-05-02 01:10:11 -04:00
|
|
|
end
|
2010-09-21 14:11:15 -04:00
|
|
|
|
2010-05-02 01:10:11 -04:00
|
|
|
end
|
|
|
|
end
|