lib/rake/funnel/tasks/msdeploy.rb in rake-funnel-0.18.0 vs lib/rake/funnel/tasks/msdeploy.rb in rake-funnel-0.19.0

- old
+ new

@@ -14,28 +14,29 @@ define(args, &task_block) end private + def setup_ivars(args) @name = args.shift || :msdeploy @msdeploy = 'msdeploy' @args = {} @log_file = "#{@name}.log" end - def define(args, &task_block) + def define(args, &task_block) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize desc 'Deploy application' unless Rake.application.last_description task(name, *args) do |_, task_args| - task_block.call(*[self, task_args].slice(0, task_block.arity)) if task_block + yield(*[self, task_args].slice(0, task_block.arity)) if task_block mapper = Mapper.new(:MSDeploy) cmd = [quote(msdeploy), mapper.map(@args)] - .flatten - .join(' ') + .flatten + .join(' ') RegistryPatch.new do shell(cmd, log_file: log_file, error_lines: /^(error|[\w\.]*exception)/i) end end @@ -43,10 +44,10 @@ self end def quote(value) value = value.gsub(/"/, '""') if value.is_a?(String) - return %Q{"#{value}"} if value =~ /\s/ + return %("#{value}") if value =~ /\s/ value end end end end