diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 7faf3c1..68178d8 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -185,16 +185,6 @@ Style/IfUnlessModifier: - 'app/models/notice.rb' - 'app/models/user.rb' -# Offense count: 5 -# Cop supports --auto-correct. -Style/IndentArray: - Exclude: - - 'app/models/notification_services/gtalk_service.rb' - - 'app/models/notification_services/hoiio_service.rb' - - 'app/models/notification_services/pushover_service.rb' - - 'app/models/notification_services/slack_service.rb' - - 'spec/models/notification_service/slack_service_spec.rb' - # Offense count: 27 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. diff --git a/app/models/notification_services/gtalk_service.rb b/app/models/notification_services/gtalk_service.rb index d63d9a0..bc8619c 100644 --- a/app/models/notification_services/gtalk_service.rb +++ b/app/models/notification_services/gtalk_service.rb @@ -1,30 +1,30 @@ class NotificationServices::GtalkService < NotificationService Label = "gtalk" Fields += [ - [:subdomain, { - :placeholder => "username@example.com", - :label => "Username" - }], - [:api_token, { - :placeholder => "password", - :label => "Password" - }], - [:user_id, { - :placeholder => "touser@example.com, anotheruser@example.com", - :label => "Send To User(s)" - }, :room_id], - [:room_id, { - :placeholder => "toroom@conference.example.com", - :label => "Send To Room (one only)" - }, :user_id], - [ :service, { - :placeholder => "talk.google.com", - :label => "Jabber Service" - }], - [ :service_url, { - :placeholder => "http://www.google.com/talk/", - :label => "Link To Jabber Service" - }] + [:subdomain, { + :placeholder => "username@example.com", + :label => "Username" + }], + [:api_token, { + :placeholder => "password", + :label => "Password" + }], + [:user_id, { + :placeholder => "touser@example.com, anotheruser@example.com", + :label => "Send To User(s)" + }, :room_id], + [:room_id, { + :placeholder => "toroom@conference.example.com", + :label => "Send To Room (one only)" + }, :user_id], + [ :service, { + :placeholder => "talk.google.com", + :label => "Jabber Service" + }], + [ :service_url, { + :placeholder => "http://www.google.com/talk/", + :label => "Link To Jabber Service" + }] ] def check_params diff --git a/app/models/notification_services/hoiio_service.rb b/app/models/notification_services/hoiio_service.rb index d733d1a..dfc349d 100644 --- a/app/models/notification_services/hoiio_service.rb +++ b/app/models/notification_services/hoiio_service.rb @@ -1,18 +1,18 @@ class NotificationServices::HoiioService < NotificationService Label = "hoiio" Fields += [ - [:api_token, { - :placeholder => "App ID", - :label => "App ID" - }], - [:subdomain, { - :placeholder => "Access Token", - :label => "Access Token" - }], - [:room_id, { - :placeholder => "+6511111111, +6511111111", - :label => "Recipient's phone numbers seperated by comma. Phone numbers should start with a \"+\" and country code." - }] + [:api_token, { + :placeholder => "App ID", + :label => "App ID" + }], + [:subdomain, { + :placeholder => "Access Token", + :label => "Access Token" + }], + [:room_id, { + :placeholder => "+6511111111, +6511111111", + :label => "Recipient's phone numbers seperated by comma. Phone numbers should start with a \"+\" and country code." + }] ] def check_params diff --git a/app/models/notification_services/pushover_service.rb b/app/models/notification_services/pushover_service.rb index cdec60d..a1867f9 100644 --- a/app/models/notification_services/pushover_service.rb +++ b/app/models/notification_services/pushover_service.rb @@ -1,14 +1,14 @@ class NotificationServices::PushoverService < NotificationService Label = "pushover" Fields += [ - [:api_token, { - :placeholder => "User Key", - :label => "User Key" - }], - [:subdomain, { - :placeholder => "Application API Token", - :label => "Application API Token" - }] + [:api_token, { + :placeholder => "User Key", + :label => "User Key" + }], + [:subdomain, { + :placeholder => "Application API Token", + :label => "Application API Token" + }] ] def check_params diff --git a/app/models/notification_services/slack_service.rb b/app/models/notification_services/slack_service.rb index 46a7d29..f16457b 100644 --- a/app/models/notification_services/slack_service.rb +++ b/app/models/notification_services/slack_service.rb @@ -25,37 +25,37 @@ class NotificationServices::SlackService < NotificationService :pretext => "<#{problem_url(problem)}|Errbit - #{problem.app.name}: #{problem.error_class}>", :color => "#D00000", :fields => [ - { - :title => "Environment", - :value => problem.environment, - :short => false - }, - { - :title => "Location", - :value => problem.where, - :short => false - }, - { - :title => "Message", - :value => problem.message.to_s, - :short => false - }, - { - :title => "First Noticed", - :value => problem.first_notice_at, - :short => false - }, - { - :title => "Last Noticed", - :value => problem.last_notice_at, - :short => false - }, - { - :title => "Times Occurred", - :value => problem.notices_count, - :short => false - } - ] + { + :title => "Environment", + :value => problem.environment, + :short => false + }, + { + :title => "Location", + :value => problem.where, + :short => false + }, + { + :title => "Message", + :value => problem.message.to_s, + :short => false + }, + { + :title => "First Noticed", + :value => problem.first_notice_at, + :short => false + }, + { + :title => "Last Noticed", + :value => problem.last_notice_at, + :short => false + }, + { + :title => "Times Occurred", + :value => problem.notices_count, + :short => false + } + ] } ] }.to_json diff --git a/spec/models/notification_service/slack_service_spec.rb b/spec/models/notification_service/slack_service_spec.rb index 6be0c5f..4d252f5 100644 --- a/spec/models/notification_service/slack_service_spec.rb +++ b/spec/models/notification_service/slack_service_spec.rb @@ -13,37 +13,37 @@ describe NotificationServices::SlackService, type: 'model' do :pretext => "<#{notification_service.problem_url(problem)}|Errbit - #{problem.app.name}: #{problem.error_class}>", :color => "#D00000", :fields => [ - { - :title => "Environment", - :value => problem.environment, - :short => false - }, - { - :title => "Location", - :value => problem.where, - :short => false - }, - { - :title => "Message", - :value => problem.message.to_s, - :short => false - }, - { - :title => "First Noticed", - :value => problem.first_notice_at, - :short => false - }, - { - :title => "Last Noticed", - :value => problem.last_notice_at, - :short => false - }, - { - :title => "Times Occurred", - :value => problem.notices_count, - :short => false - } - ] + { + :title => "Environment", + :value => problem.environment, + :short => false + }, + { + :title => "Location", + :value => problem.where, + :short => false + }, + { + :title => "Message", + :value => problem.message.to_s, + :short => false + }, + { + :title => "First Noticed", + :value => problem.first_notice_at, + :short => false + }, + { + :title => "Last Noticed", + :value => problem.last_notice_at, + :short => false + }, + { + :title => "Times Occurred", + :value => problem.notices_count, + :short => false + } + ] } ] }.to_json -- libgit2 0.21.2