diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 746cebe..5bb263a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -110,16 +110,6 @@ Style/IfUnlessModifier: Style/MultilineOperationIndentation: Enabled: false -# Offense count: 5 -# Cop supports --auto-correct. -# Configuration parameters: PreferredDelimiters. -Style/PercentLiteralDelimiters: - Exclude: - - 'app/controllers/api/v1/notices_controller.rb' - - 'app/controllers/api/v1/problems_controller.rb' - - 'app/controllers/problems_searcher.rb' - - 'spec/models/notice_spec.rb' - # Offense count: 1 # Configuration parameters: Methods. Style/SingleLineBlockParams: diff --git a/app/controllers/api/v1/notices_controller.rb b/app/controllers/api/v1/notices_controller.rb index e9a82cf..cfacaca 100644 --- a/app/controllers/api/v1/notices_controller.rb +++ b/app/controllers/api/v1/notices_controller.rb @@ -3,7 +3,7 @@ class Api::V1::NoticesController < ApplicationController def index query = {} - fields = %w{created_at message error_class} + fields = %w(created_at message error_class) if params.key?(:start_date) && params.key?(:end_date) start_date = Time.zone.parse(params[:start_date]).utc diff --git a/app/controllers/api/v1/problems_controller.rb b/app/controllers/api/v1/problems_controller.rb index 5a94033..d4c9ad4 100644 --- a/app/controllers/api/v1/problems_controller.rb +++ b/app/controllers/api/v1/problems_controller.rb @@ -1,6 +1,6 @@ class Api::V1::ProblemsController < ApplicationController respond_to :json, :xml - FIELDS = %w{_id app_id app_name environment message where first_notice_at last_notice_at resolved resolved_at notices_count} + FIELDS = %w(_id app_id app_name environment message where first_notice_at last_notice_at resolved resolved_at notices_count) def show result = benchmark("[api/v1/problems_controller/show] query time") do diff --git a/app/controllers/problems_searcher.rb b/app/controllers/problems_searcher.rb index 270a5ab..8c634e0 100644 --- a/app/controllers/problems_searcher.rb +++ b/app/controllers/problems_searcher.rb @@ -6,7 +6,7 @@ module ProblemsSearcher included do expose(:params_sort) { - if %w{app message last_notice_at last_deploy_at count}.member?(params[:sort]) + if %w(app message last_notice_at last_deploy_at count).member?(params[:sort]) params[:sort] else "last_notice_at" @@ -14,7 +14,7 @@ module ProblemsSearcher } expose(:params_order) { - if %w{asc desc}.member?(params[:order]) + if %w(asc desc).member?(params[:order]) params[:order] else 'desc' -- libgit2 0.21.2