diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 4ca68ff..756237e 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -33,13 +33,6 @@ Metrics/MethodLength: Metrics/PerceivedComplexity: Max: 12 -# Offense count: 2 -# Cop supports --auto-correct. -Performance/StringReplacement: - Exclude: - - 'app/models/notification_services/gtalk_service.rb' - - 'lib/hoptoad/v2.rb' - # Offense count: 4 # Cop supports --auto-correct. # Configuration parameters: Include. diff --git a/app/models/notification_services/gtalk_service.rb b/app/models/notification_services/gtalk_service.rb index a209925..71fd68c 100644 --- a/app/models/notification_services/gtalk_service.rb +++ b/app/models/notification_services/gtalk_service.rb @@ -60,7 +60,7 @@ class NotificationServices::GtalkService < NotificationService private def send_to_users client, message - user_id.gsub(/ /i, ",").gsub(/;/i, ",").split(",").map(&:strip).reject(&:empty?).each do |user| + user_id.tr(' ', ",").tr(';', ",").split(",").map(&:strip).reject(&:empty?).each do |user| client.send(Jabber::Message.new(user, message)) end end diff --git a/lib/hoptoad/v2.rb b/lib/hoptoad/v2.rb index 40bd937..73099f3 100644 --- a/lib/hoptoad/v2.rb +++ b/lib/hoptoad/v2.rb @@ -36,7 +36,7 @@ module Hoptoad end def self.normalize_key(key) - key.gsub('.', '_') + key.tr('.', '_') end def self.normalize(notice) -- libgit2 0.21.2