lib/fulmar/infrastructure/model/transfer/base.rb in fulmar-2.1.2 vs lib/fulmar/infrastructure/model/transfer/base.rb in fulmar-2.2.0

- old
+ new

@@ -11,11 +11,11 @@ user: '', password: '', remote_path: nil, local_path: '.', type: :rsync_with_versions - } + }.freeze attr_accessor :config # @param [Fulmar::Domain::Service::ConfigurationService] config def initialize(config) @@ -29,12 +29,12 @@ @prepared = false end # Test the supplied config for required parameters def test_config - required = [:host, :remote_path, :local_path] - required.each { |key| fail "Configuration is missing required setting '#{key}'." if @config.blank? } - fail ':remote_path must be absolute' if @config[:remote_path][0, 1] != '/' + required = %i[host remote_path local_path] + required.each { |key| raise "Configuration is missing required setting '#{key}'." if @config.blank? } + raise ':remote_path must be absolute' if @config[:remote_path][0, 1] != '/' end def prepare @local_shell = Fulmar::Shell.new @config[:local_path] @local_shell.strict = true