lib/rake/funnel/integration/teamcity/service_messages.rb in rake-funnel-0.22.2 vs lib/rake/funnel/integration/teamcity/service_messages.rb in rake-funnel-0.22.3
- old
+ new
@@ -1,16 +1,18 @@
+# frozen_string_literal: true
+
module Rake
module Funnel
module Integration
module TeamCity
class ServiceMessages
class << self
def respond_to_missing?(_method, _include_private = false)
true
end
- def method_missing(method, *args, &_block) # rubocop:disable Style/MethodMissing
+ def method_missing(method, *args, &_block) # rubocop:disable Style/MethodMissingSuper
return unless Rake::Funnel::Integration::TeamCity.running?
message_name = method.camelize
publish(message_name, args[0])
end
@@ -40,9 +42,10 @@
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)}'" }
end
end
end
end