Commit ee0cf25e2db71d423b5317e10d988e1dc4ba0926
1 parent
07916269
Exists in
master
and in
1 other branch
Rubocop: remove trailing comma after last element
Showing
12 changed files
with
13 additions
and
30 deletions
Show diff stats
.rubocop_todo.yml
| @@ -362,23 +362,6 @@ Style/SymbolProc: | @@ -362,23 +362,6 @@ Style/SymbolProc: | ||
| 362 | - 'app/models/deploy.rb' | 362 | - 'app/models/deploy.rb' |
| 363 | - 'spec/models/deploy_spec.rb' | 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 | # Offense count: 2 | 365 | # Offense count: 2 |
| 383 | Style/UnlessElse: | 366 | Style/UnlessElse: |
| 384 | Exclude: | 367 | Exclude: |
app/controllers/deploys_controller.rb
| @@ -36,7 +36,7 @@ private | @@ -36,7 +36,7 @@ private | ||
| 36 | :username => params[:user], | 36 | :username => params[:user], |
| 37 | :environment => params[:rack_env].try(:downcase) || params[:app], | 37 | :environment => params[:rack_env].try(:downcase) || params[:app], |
| 38 | :repository => "git@heroku.com:#{params[:app]}.git", | 38 | :repository => "git@heroku.com:#{params[:app]}.git", |
| 39 | - :revision => params[:head], | 39 | + :revision => params[:head] |
| 40 | } | 40 | } |
| 41 | end | 41 | end |
| 42 | end | 42 | end |
app/helpers/problems_helper.rb
| @@ -20,7 +20,7 @@ module ProblemsHelper | @@ -20,7 +20,7 @@ module ProblemsHelper | ||
| 20 | return nil unless email.present? | 20 | return nil unless email.present? |
| 21 | 21 | ||
| 22 | default_options = { | 22 | default_options = { |
| 23 | - :d => Errbit::Config.gravatar_default, | 23 | + :d => Errbit::Config.gravatar_default |
| 24 | } | 24 | } |
| 25 | options.reverse_merge! default_options | 25 | options.reverse_merge! default_options |
| 26 | params = options.extract!(:s, :d).delete_if { |_k, v| v.blank? } | 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,7 +17,7 @@ if defined? HipChat | ||
| 17 | [:room_id, { | 17 | [:room_id, { |
| 18 | :placeholder => "Room name", | 18 | :placeholder => "Room name", |
| 19 | :label => "Room name" | 19 | :label => "Room name" |
| 20 | - }], | 20 | + }] |
| 21 | ] | 21 | ] |
| 22 | Mandatory_fields = [:service, :api_token, :room_id] | 22 | Mandatory_fields = [:service, :api_token, :room_id] |
| 23 | API_versions = %w(v1 v2) | 23 | API_versions = %w(v1 v2) |
app/models/problem.rb
| @@ -94,13 +94,13 @@ class Problem | @@ -94,13 +94,13 @@ class Problem | ||
| 94 | 'where' => notice.where, | 94 | 'where' => notice.where, |
| 95 | "messages.#{message_digest}.value" => notice.message, | 95 | "messages.#{message_digest}.value" => notice.message, |
| 96 | "hosts.#{host_digest}.value" => notice.host, | 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 | '$inc' => { | 99 | '$inc' => { |
| 100 | 'notices_count' => 1, | 100 | 'notices_count' => 1, |
| 101 | "messages.#{message_digest}.count" => 1, | 101 | "messages.#{message_digest}.count" => 1, |
| 102 | "hosts.#{host_digest}.count" => 1, | 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 | }, return_document: :after) | 105 | }, return_document: :after) |
| 106 | end | 106 | end |
config/deploy.example.rb
| @@ -46,7 +46,7 @@ namespace :errbit do | @@ -46,7 +46,7 @@ namespace :errbit do | ||
| 46 | 46 | ||
| 47 | { | 47 | { |
| 48 | 'config/newrelic.example.yml' => 'config/newrelic.yml', | 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 | }.each do |src, target| | 50 | }.each do |src, target| |
| 51 | unless test("[ -f #{shared_path}/#{target} ]") | 51 | unless test("[ -f #{shared_path}/#{target} ]") |
| 52 | upload! src, "#{shared_path}/#{target}" | 52 | upload! src, "#{shared_path}/#{target}" |
config/initializers/action_mailer.rb
| @@ -7,7 +7,7 @@ if Errbit::Config.email_delivery_method == :smtp | @@ -7,7 +7,7 @@ if Errbit::Config.email_delivery_method == :smtp | ||
| 7 | :authentication => Errbit::Config.smtp_authentication, | 7 | :authentication => Errbit::Config.smtp_authentication, |
| 8 | :user_name => Errbit::Config.smtp_user_name, | 8 | :user_name => Errbit::Config.smtp_user_name, |
| 9 | :password => Errbit::Config.smtp_password, | 9 | :password => Errbit::Config.smtp_password, |
| 10 | - :domain => Errbit::Config.smtp_domain, | 10 | + :domain => Errbit::Config.smtp_domain |
| 11 | } | 11 | } |
| 12 | end | 12 | end |
| 13 | 13 |
config/load.rb
| @@ -59,5 +59,5 @@ Errbit::Config = Configurator.run({ | @@ -59,5 +59,5 @@ Errbit::Config = Configurator.run({ | ||
| 59 | sendmail_location: ['SENDMAIL_LOCATION'], | 59 | sendmail_location: ['SENDMAIL_LOCATION'], |
| 60 | sendmail_arguments: ['SENDMAIL_ARGUMENTS'], | 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,7 +50,7 @@ namespace :errbit do | ||
| 50 | :request => { | 50 | :request => { |
| 51 | 'component' => 'main', | 51 | 'component' => 'main', |
| 52 | 'action' => 'error', | 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 | :server_environment => {'environment-name' => Rails.env.to_s}, | 55 | :server_environment => {'environment-name' => Rails.env.to_s}, |
| 56 | :notifier => {:name => "seeds.rb"}, | 56 | :notifier => {:name => "seeds.rb"}, |
spec/decorators/issue_tracker_type_decorator_spec.rb
| @@ -14,7 +14,7 @@ describe IssueTrackerDecorator do | @@ -14,7 +14,7 @@ describe IssueTrackerDecorator do | ||
| 14 | def self.icons | 14 | def self.icons |
| 15 | { | 15 | { |
| 16 | one: ['text/plain', 'all your base are belong to us'], | 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 | end | 19 | end |
| 20 | end | 20 | end |
spec/initializers/action_mailer_spec.rb
| @@ -40,7 +40,7 @@ describe 'initializers/action_mailer' do | @@ -40,7 +40,7 @@ describe 'initializers/action_mailer' do | ||
| 40 | authentication: :login, | 40 | authentication: :login, |
| 41 | user_name: 'my-username', | 41 | user_name: 'my-username', |
| 42 | password: 'my-password', | 42 | password: 'my-password', |
| 43 | - domain: 'someotherdomain.com', | 43 | + domain: 'someotherdomain.com' |
| 44 | }) | 44 | }) |
| 45 | end | 45 | end |
| 46 | end | 46 | end |
spec/initializers/devise_spec.rb
| @@ -17,7 +17,7 @@ describe 'initializers/devise' do | @@ -17,7 +17,7 @@ describe 'initializers/devise' do | ||
| 17 | expect(options[:client_options]).to eq({ | 17 | expect(options[:client_options]).to eq({ |
| 18 | site: 'https://api.github.com', | 18 | site: 'https://api.github.com', |
| 19 | authorize_url: 'https://github.com/login/oauth/authorize', | 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 | end | 22 | end |
| 23 | 23 | ||
| @@ -31,7 +31,7 @@ describe 'initializers/devise' do | @@ -31,7 +31,7 @@ describe 'initializers/devise' do | ||
| 31 | expect(options[:client_options]).to eq({ | 31 | expect(options[:client_options]).to eq({ |
| 32 | site: 'https://github.example.com/api/v3', | 32 | site: 'https://github.example.com/api/v3', |
| 33 | authorize_url: 'https://github.example.com/login/oauth/authorize', | 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 | end | 36 | end |
| 37 | end | 37 | end |