Sha256: 50ebd25ff8979e0e12957a77a86ee6cf15128da0f2b0483f7ad7d57b6e72cf0a
Contents?: true
Size: 897 Bytes
Versions: 7
Compression:
Stored size: 897 Bytes
Contents
class Local < Fog::Bin class << self def class_for(key) case key when :files, :storage Fog::Local::Storage else raise ArgumentError, "Unsupported #{self} service: #{key}" end end 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::Storage.new(:provider => 'Local') when :storage Fog::Storage.new(:provider => 'Local') else raise ArgumentError, "Unrecognized service: #{service}" end end @@connections[service] end def services [:storage] end end end
Version data entries
7 entries across 7 versions & 2 rubygems