Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed Oct 4, 2024
1 parent 505b4bb commit 58f3133
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 19 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ gem 'vega', '~> 0.3.0'

group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "debug", platforms: %i[ mri windows ], require: "debug/prelude"
gem 'debug', platforms: [ :mri, :windows ], require: 'debug/prelude'
gem 'annotate'
gem 'bullet'
gem 'memory_profiler'
Expand All @@ -70,7 +70,7 @@ group :development do

# this was commented out in the default build, so doing the same..
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
#gem 'rack-mini-profiler'
# gem 'rack-mini-profiler'

gem 'derailed_benchmarks'
gem 'letter_opener'
Expand Down
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,5 @@
},
"scripts": {
},
"stack": "heroku-22"
"stack": "heroku-24"
}
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class ApplicationController < ActionController::Base
include Authentication::CurrentUserManager
include Authentication::CurrentCaseManager
include Authentication::CurrentBookManager

# Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has.
allow_browser versions: :modern

Expand Down
8 changes: 4 additions & 4 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
config.action_controller.perform_caching = true

config.cache_store = :memory_store
config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" }
config.public_file_server.headers = { 'Cache-Control' => "public, max-age=#{2.days.to_i}" }
else
config.action_controller.perform_caching = false

Expand All @@ -41,9 +41,9 @@

# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false

# Disable caching for Action Mailer templates even if Action Controller
# caching is enabled.
# caching is enabled.
config.action_mailer.perform_caching = false

# Print deprecation notices to the Rails logger.
Expand Down Expand Up @@ -113,7 +113,7 @@
:transmissions,
:state_updates
]

# Apply autocorrection by RuboCop to files generated by `bin/rails generate`.
# config.generators.apply_rubocop_autocorrect_after_generate!
end
Expand Down
8 changes: 4 additions & 4 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
config.eager_load = ENV['CI'].present?

# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{1.hour.to_i}" }
config.public_file_server.headers = { 'Cache-Control' => "public, max-age=#{1.hour.to_i}" }

# Show full error reports and disable caching.
config.consider_all_requests_local = true
Expand All @@ -37,7 +37,7 @@
config.active_storage.service = :test

# Disable caching for Action Mailer templates even if Action Controller
# caching is enabled.
# caching is enabled.
config.action_mailer.perform_caching = false

# Tell Action Mailer not to deliver emails to the real world.
Expand All @@ -48,7 +48,7 @@
# Unlike controllers, the mailer instance doesn't have any context about the
# incoming request so you'll need to provide the :host parameter yourself.
config.action_mailer.default_url_options = { host: 'localhost', port: '3000' }

# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr

Expand Down Expand Up @@ -78,7 +78,7 @@

# Raise error when a before_action's only/except options reference missing actions.
config.action_controller.raise_on_missing_callback_actions = true

config.active_job.queue_adapter = :test

ENV['TC_URL'] = 'https://quepid.com/agreement'
Expand Down
2 changes: 2 additions & 0 deletions config/initializers/new_framework_defaults_7_2.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Be sure to restart your server when you modify this file.
#
# This file eases your Rails 7.2 framework defaults upgrade.
Expand Down
8 changes: 4 additions & 4 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
apipie
mount ActiveStorageDB::Engine => '/active_storage_db'
Healthcheck.routes(self)

# Render dynamic PWA files from app/views/pwa/*
get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker
get "manifest" => "rails/pwa#manifest", as: :pwa_manifest
get 'service-worker' => 'rails/pwa#service_worker', as: :pwa_service_worker
get 'manifest' => 'rails/pwa#manifest', as: :pwa_manifest

# Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
# Can be used by load balancers and uptime monitors to verify that the app is live.
get 'up' => 'rails/health#show', as: :rails_health_check
Expand Down
5 changes: 2 additions & 3 deletions test/controllers/proxy_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@

# rubocop:disable Layout/LineLength
class ProxyControllerTest < ActionDispatch::IntegrationTest

test 'should require a url query parameter' do
get proxy_fetch_path
assert_response :bad_request

post proxy_fetch_path
assert_response :bad_request
assert_response :bad_request
end

test 'should be able to handle a get' do
Expand Down

0 comments on commit 58f3133

Please sign in to comment.