Skip to content

Commit 2a896e8

Browse files
committed
correct rubocop offenses after upgrading rails and rubocop
This also fixes the CI Lint test failed first time
1 parent 5d8d5a5 commit 2a896e8

25 files changed

+59
-26
lines changed

app/controllers/pages_controller.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ def comments_json_string
5050
end
5151

5252
def render_html
53-
respond_to do |format|
54-
format.html
55-
end
53+
respond_to(&:html)
5654
end
5755
end

config/application.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require_relative "boot"
24

35
require "rails/all"

config/boot.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
24

35
require "bundler/setup" # Set up gems listed in the Gemfile.

config/environment.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Load the Rails application.
24
require_relative "application"
35

config/environments/development.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require "active_support/core_ext/integer/time"
24

35
Rails.application.configure do

config/environments/production.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require "active_support/core_ext/integer/time"
24

35
Rails.application.configure do
@@ -34,8 +36,8 @@
3436
# config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } }
3537

3638
# Log to STDOUT with the current request id as a default log tag.
37-
config.log_tags = [ :request_id ]
38-
config.logger = ActiveSupport::TaggedLogging.logger(STDOUT)
39+
config.log_tags = [:request_id]
40+
config.logger = ActiveSupport::TaggedLogging.logger($stdout)
3941

4042
# Change to "debug" to log everything (including potentially personally-identifiable information!)
4143
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
@@ -76,7 +78,7 @@
7678
config.active_record.dump_schema_after_migration = false
7779

7880
# Only use :id for inspections in production.
79-
config.active_record.attributes_for_inspect = [ :id ]
81+
config.active_record.attributes_for_inspect = [:id]
8082

8183
# Enable DNS rebinding protection and other `Host` header attacks.
8284
# config.hosts = [

config/environments/test.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# The test environment is used exclusively to run your application's
24
# test suite. You never need to work with it otherwise. Remember that
35
# your test database is "scratch space" for the test suite and is wiped

config/initializers/application_controller_renderer.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# frozen_string_literal: true
2+
23
# Be sure to restart your server when you modify this file.
34

45
# ActiveSupport::Reloader.to_prepare do

config/initializers/assets.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Be sure to restart your server when you modify this file.
24

35
# Version of your assets, change this if you want to expire all your assets.

config/initializers/content_security_policy.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Be sure to restart your server when you modify this file.
24

35
# Define an application-wide content security policy.

0 commit comments

Comments
 (0)