Commit e04936bbd80ef49a631053bbb89d276c4f1abffe
1 parent
9d51326c
Exists in
master
and in
1 other branch
Rubocop; Trim excessive whitespace
Showing
4 changed files
with
9 additions
and
17 deletions
Show diff stats
.rubocop_todo.yml
... | ... | @@ -379,14 +379,6 @@ Style/TrailingComma: |
379 | 379 | - 'spec/initializers/action_mailer_spec.rb' |
380 | 380 | - 'spec/initializers/devise_spec.rb' |
381 | 381 | |
382 | -# Offense count: 9 | |
383 | -# Cop supports --auto-correct. | |
384 | -Style/TrailingWhitespace: | |
385 | - Exclude: | |
386 | - - 'app/models/notification_service.rb' | |
387 | - - 'app/models/notification_services/gtalk_service.rb' | |
388 | - - 'config/initializers/cve-2013-0156.rb' | |
389 | - | |
390 | 382 | # Offense count: 2 |
391 | 383 | Style/UnlessElse: |
392 | 384 | Exclude: | ... | ... |
app/models/notification_service.rb
... | ... | @@ -18,7 +18,7 @@ class NotificationService |
18 | 18 | validate :check_params |
19 | 19 | |
20 | 20 | if Errbit::Config.per_app_notify_at_notices |
21 | - Fields = [[:notify_at_notices, | |
21 | + Fields = [[:notify_at_notices, | |
22 | 22 | { :placeholder => 'comma separated numbers or simply 0 for every notice', |
23 | 23 | :label => 'notify on errors (0 for all errors)' |
24 | 24 | } | ... | ... |
app/models/notification_services/gtalk_service.rb
... | ... | @@ -28,9 +28,9 @@ class NotificationServices::GtalkService < NotificationService |
28 | 28 | ] |
29 | 29 | |
30 | 30 | def check_params |
31 | - if Fields.detect { |f| self[f[0]].blank? && self[f[2]].blank? } | |
32 | - errors.add :base, | |
33 | - """You must specify your Username, Password, service, service_url | |
31 | + if Fields.detect { |f| self[f[0]].blank? && self[f[2]].blank? } | |
32 | + errors.add :base, | |
33 | + """You must specify your Username, Password, service, service_url | |
34 | 34 | and either rooms or users to send to or both""" |
35 | 35 | end |
36 | 36 | end |
... | ... | @@ -58,7 +58,7 @@ class NotificationServices::GtalkService < NotificationService |
58 | 58 | end |
59 | 59 | |
60 | 60 | private |
61 | - | |
61 | + | |
62 | 62 | def send_to_users(client, message) |
63 | 63 | user_id.tr(' ', ",").tr(';', ",").split(",").map(&:strip).reject(&:empty?).each do |user| |
64 | 64 | client.send(Jabber::Message.new(user, message)) |
... | ... | @@ -66,9 +66,9 @@ private |
66 | 66 | end |
67 | 67 | |
68 | 68 | def send_to_muc(client, message) |
69 | - #TODO: set this so that it can send to multiple rooms like users, nb multiple room joins in one send fail randomly so leave as one room for the moment | |
69 | + #TODO: set this so that it can send to multiple rooms like users, nb multiple room joins in one send fail randomly so leave as one room for the moment | |
70 | 70 | muc = Jabber::MUC::SimpleMUCClient.new(client) |
71 | - muc.join(room_id + "/errbit") | |
71 | + muc.join(room_id + "/errbit") | |
72 | 72 | muc.send(Jabber::Message.new(room_id, message)) |
73 | 73 | end |
74 | 74 | end | ... | ... |
config/initializers/cve-2013-0156.rb