lib/fog/atmos/models/storage/directories.rb in fog-1.8.0 vs lib/fog/atmos/models/storage/directories.rb in fog-1.9.0

- old
+ new

@@ -12,11 +12,11 @@ model Fog::Storage::Atmos::Directory def all directory ? ns = directory.key : ns = '' ns = ns + '/' unless ns =~ /\/$/ - data = connection.get_namespace(ns).body[:DirectoryList] + data = service.get_namespace(ns).body[:DirectoryList] data = {:DirectoryEntry => []} if data.kind_of? String data[:DirectoryEntry] = [data[:DirectoryEntry]] if data[:DirectoryEntry].kind_of? Hash dirs = data[:DirectoryEntry].select {|de| de[:FileType] == 'directory'} dirs.each do |d| d[:Filename] = ns + d[:Filename] if directory @@ -26,10 +26,10 @@ end def get(key, options = {}) return nil if key == '' # Root dir shouldn't be retrieved like this. key =~ /\/$/ ? ns = key : ns = key + '/' - res = connection.get_namespace ns + res = service.get_namespace ns emc_meta = res.headers['x-emc-meta'] obj_id = emc_meta.scan(/objectid=(\w+),/).flatten[0] new(:objectid => obj_id, :key => ns) rescue Fog::Storage::Atmos::NotFound nil