lib/rake/funnel/integration/teamcity/service_messages.rb in rake-funnel-0.6.1.pre vs lib/rake/funnel/integration/teamcity/service_messages.rb in rake-funnel-0.7.0.pre

- old
+ new

@@ -19,10 +19,11 @@ puts "##teamcity[#{args.join(' ')}]" end def escape(string) string + .to_s .gsub(/\|/, '||') .gsub(/'/, "|'") .gsub(/\r/, '|r') .gsub(/\n/, '|n') .gsub(/\u0085/, '|x') @@ -33,11 +34,11 @@ end def escaped_array_of(args) return [] if args.nil? - return "'#{escape args}'" unless args.is_a?(Hash) - args.map { |key, value| "#{key.camelize}='#{escape value.to_s}'" } + return "'#{escape(args)}'" unless args.is_a?(Hash) + args.map { |key, value| "#{key.camelize}='#{escape(value.to_s)}'" } end end end end end