Commit ee0cf25e2db71d423b5317e10d988e1dc4ba0926

Authored by Laust Rud Jacobsen
1 parent 07916269
Exists in master and in 1 other branch production

Rubocop: remove trailing comma after last element

.rubocop_todo.yml
... ... @@ -362,23 +362,6 @@ Style/SymbolProc:
362 362 - 'app/models/deploy.rb'
363 363 - 'spec/models/deploy_spec.rb'
364 364  
365   -# Offense count: 13
366   -# Cop supports --auto-correct.
367   -# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
368   -Style/TrailingComma:
369   - Exclude:
370   - - 'app/controllers/deploys_controller.rb'
371   - - 'app/helpers/problems_helper.rb'
372   - - 'app/models/notification_services/hipchat_service.rb'
373   - - 'app/models/problem.rb'
374   - - 'config/deploy.example.rb'
375   - - 'config/initializers/action_mailer.rb'
376   - - 'config/load.rb'
377   - - 'lib/tasks/errbit/demo.rake'
378   - - 'spec/decorators/issue_tracker_type_decorator_spec.rb'
379   - - 'spec/initializers/action_mailer_spec.rb'
380   - - 'spec/initializers/devise_spec.rb'
381   -
382 365 # Offense count: 2
383 366 Style/UnlessElse:
384 367 Exclude:
... ...
app/controllers/deploys_controller.rb
... ... @@ -36,7 +36,7 @@ private
36 36 :username => params[:user],
37 37 :environment => params[:rack_env].try(:downcase) || params[:app],
38 38 :repository => "git@heroku.com:#{params[:app]}.git",
39   - :revision => params[:head],
  39 + :revision => params[:head]
40 40 }
41 41 end
42 42 end
... ...
app/helpers/problems_helper.rb
... ... @@ -20,7 +20,7 @@ module ProblemsHelper
20 20 return nil unless email.present?
21 21  
22 22 default_options = {
23   - :d => Errbit::Config.gravatar_default,
  23 + :d => Errbit::Config.gravatar_default
24 24 }
25 25 options.reverse_merge! default_options
26 26 params = options.extract!(:s, :d).delete_if { |_k, v| v.blank? }
... ...
app/models/notification_services/hipchat_service.rb
... ... @@ -17,7 +17,7 @@ if defined? HipChat
17 17 [:room_id, {
18 18 :placeholder => "Room name",
19 19 :label => "Room name"
20   - }],
  20 + }]
21 21 ]
22 22 Mandatory_fields = [:service, :api_token, :room_id]
23 23 API_versions = %w(v1 v2)
... ...
app/models/problem.rb
... ... @@ -94,13 +94,13 @@ class Problem
94 94 'where' => notice.where,
95 95 "messages.#{message_digest}.value" => notice.message,
96 96 "hosts.#{host_digest}.value" => notice.host,
97   - "user_agents.#{user_agent_digest}.value" => notice.user_agent_string,
  97 + "user_agents.#{user_agent_digest}.value" => notice.user_agent_string
98 98 },
99 99 '$inc' => {
100 100 'notices_count' => 1,
101 101 "messages.#{message_digest}.count" => 1,
102 102 "hosts.#{host_digest}.count" => 1,
103   - "user_agents.#{user_agent_digest}.count" => 1,
  103 + "user_agents.#{user_agent_digest}.count" => 1
104 104 }
105 105 }, return_document: :after)
106 106 end
... ...
config/deploy.example.rb
... ... @@ -46,7 +46,7 @@ namespace :errbit do
46 46  
47 47 {
48 48 'config/newrelic.example.yml' => 'config/newrelic.yml',
49   - 'config/unicorn.default.rb' => 'config/unicorn.rb',
  49 + 'config/unicorn.default.rb' => 'config/unicorn.rb'
50 50 }.each do |src, target|
51 51 unless test("[ -f #{shared_path}/#{target} ]")
52 52 upload! src, "#{shared_path}/#{target}"
... ...
config/initializers/action_mailer.rb
... ... @@ -7,7 +7,7 @@ if Errbit::Config.email_delivery_method == :smtp
7 7 :authentication => Errbit::Config.smtp_authentication,
8 8 :user_name => Errbit::Config.smtp_user_name,
9 9 :password => Errbit::Config.smtp_password,
10   - :domain => Errbit::Config.smtp_domain,
  10 + :domain => Errbit::Config.smtp_domain
11 11 }
12 12 end
13 13  
... ...
config/load.rb
... ... @@ -59,5 +59,5 @@ Errbit::Config = Configurator.run({
59 59 sendmail_location: ['SENDMAIL_LOCATION'],
60 60 sendmail_arguments: ['SENDMAIL_ARGUMENTS'],
61 61  
62   - devise_modules: ['DEVISE_MODULES'],
  62 + devise_modules: ['DEVISE_MODULES']
63 63 })
... ...
lib/tasks/errbit/demo.rake
... ... @@ -50,7 +50,7 @@ namespace :errbit do
50 50 :request => {
51 51 'component' => 'main',
52 52 'action' => 'error',
53   - 'url' => "http://example.com/post/#{[111, 222, 333].sample}",
  53 + 'url' => "http://example.com/post/#{[111, 222, 333].sample}"
54 54 },
55 55 :server_environment => {'environment-name' => Rails.env.to_s},
56 56 :notifier => {:name => "seeds.rb"},
... ...
spec/decorators/issue_tracker_type_decorator_spec.rb
... ... @@ -14,7 +14,7 @@ describe IssueTrackerDecorator do
14 14 def self.icons
15 15 {
16 16 one: ['text/plain', 'all your base are belong to us'],
17   - two: ['application/xml', '<root></root>'],
  17 + two: ['application/xml', '<root></root>']
18 18 }
19 19 end
20 20 end
... ...
spec/initializers/action_mailer_spec.rb
... ... @@ -40,7 +40,7 @@ describe &#39;initializers/action_mailer&#39; do
40 40 authentication: :login,
41 41 user_name: 'my-username',
42 42 password: 'my-password',
43   - domain: 'someotherdomain.com',
  43 + domain: 'someotherdomain.com'
44 44 })
45 45 end
46 46 end
... ...
spec/initializers/devise_spec.rb
... ... @@ -17,7 +17,7 @@ describe &#39;initializers/devise&#39; do
17 17 expect(options[:client_options]).to eq({
18 18 site: 'https://api.github.com',
19 19 authorize_url: 'https://github.com/login/oauth/authorize',
20   - token_url: 'https://github.com/login/oauth/access_token',
  20 + token_url: 'https://github.com/login/oauth/access_token'
21 21 })
22 22 end
23 23  
... ... @@ -31,7 +31,7 @@ describe &#39;initializers/devise&#39; do
31 31 expect(options[:client_options]).to eq({
32 32 site: 'https://github.example.com/api/v3',
33 33 authorize_url: 'https://github.example.com/login/oauth/authorize',
34   - token_url: 'https://github.example.com/login/oauth/access_token',
  34 + token_url: 'https://github.example.com/login/oauth/access_token'
35 35 })
36 36 end
37 37 end
... ...