lib/resync/client/mixins/dump.rb in resync-client-0.4.2 vs lib/resync/client/mixins/dump.rb in resync-client-0.4.3
- old
+ new
@@ -1,7 +1,7 @@
require 'resync'
-require 'lazy'
+require 'promise'
require_relative '../zip'
require_relative 'zipped_resource'
module Resync
class Client
@@ -19,13 +19,13 @@
end
end
end
# The {Resync::Client::Zip::ZipPackage}s for each resource, downloaded lazily
- # @return [Array<Lazy::Promise<Resync::Client::Zip::ZipPackage>>] the zip packages for each resource
+ # @return [Array<Promise<Resync::Client::Zip::ZipPackage>>] the zip packages for each resource
def zip_packages
- @zip_packages ||= resources.map { |r| Lazy.promise { r.zip_package } }
+ @zip_packages ||= resources.map { |r| promise { r.zip_package } }
end
end
end
end
@@ -47,14 +47,14 @@
# A list (downloaded lazily) of the {Resync::Client::Zip::ZipPackage}s for each resource
# If a time range parameter is provided, the lists of packages is filtered by +from_time+
# and +until_time+, in non-strict mode (only excluding those lists provably not in the range,
# i.e., including packages without +from_time+ or +until_time+).
# @param in_range [Range<Time>] the range of times to filter by
- # @return [Array<Lazy::Promise<Resync::Client::Zip::ZipPackage>>] the zip packages for each resource
+ # @return [Array<Promise<Resync::Client::Zip::ZipPackage>>] the zip packages for each resource
def zip_packages(in_range: nil)
if in_range
change_lists = change_lists(in_range: in_range, strict: false)
- change_lists.map { |r| Lazy.promise { r.zip_package } }
+ change_lists.map { |r| promise { r.zip_package } }
else
super()
end
end