lib/fulmar/domain/service/file_sync_service.rb in fulmar-1.10.1 vs lib/fulmar/domain/service/file_sync_service.rb in fulmar-2.0.0
- old
+ new
@@ -1,20 +1,20 @@
-require 'fulmar/infrastructure/service/transfer/rsync'
-require 'fulmar/infrastructure/service/transfer/rsync_with_versions'
-require 'fulmar/infrastructure/service/transfer/tar'
+require 'fulmar/infrastructure/model/transfer/rsync'
+require 'fulmar/infrastructure/model/transfer/rsync_with_versions'
+require 'fulmar/infrastructure/model/transfer/tar'
module Fulmar
# Creates the required transfer model from the configuration
class FileSync
- def self.create_transfer(config)
+ def self.get_model(config)
case config[:type]
when 'rsync_with_versions'
- transfer_model = Fulmar::Infrastructure::Service::Transfer::RsyncWithVersions.new(config)
+ transfer_model = Fulmar::Infrastructure::Model::Transfer::RsyncWithVersions.new(config)
when 'rsync'
- transfer_model = Fulmar::Infrastructure::Service::Transfer::Rsync.new(config)
+ transfer_model = Fulmar::Infrastructure::Model::Transfer::Rsync.new(config)
when 'tar'
- transfer_model = Fulmar::Infrastructure::Service::Transfer::Tar.new(config)
+ transfer_model = Fulmar::Infrastructure::Model::Transfer::Tar.new(config)
else
help = config[:type] == '' ? 'Add a "type: " field to your deployment yaml file. ' : ''
transfer_model = nil
fail "Transfer type '#{config[:type]}' is not valid. #{help}Valid values are: rsync, rsync_with_versions."
end