diff --git a/lib/app_profiler/middleware.rb b/lib/app_profiler/middleware.rb index 232ead57..8f684cdf 100644 --- a/lib/app_profiler/middleware.rb +++ b/lib/app_profiler/middleware.rb @@ -41,7 +41,7 @@ def profile(env, params) profile, response: response, autoredirect: params.autoredirect, - async: params.async + async: params.async, ) response diff --git a/lib/app_profiler/middleware/upload_action.rb b/lib/app_profiler/middleware/upload_action.rb index a3364666..c2d9d0f5 100644 --- a/lib/app_profiler/middleware/upload_action.rb +++ b/lib/app_profiler/middleware/upload_action.rb @@ -14,7 +14,7 @@ def call(profile, response: nil, autoredirect: nil, async: false) append_headers( response, upload: profile_upload, - autoredirect: autoredirect.nil? ? AppProfiler.autoredirect : autoredirect + autoredirect: autoredirect.nil? ? AppProfiler.autoredirect : autoredirect, ) if response end end diff --git a/lib/app_profiler/profile.rb b/lib/app_profiler/profile.rb index 9fa323bb..e5afa6ce 100644 --- a/lib/app_profiler/profile.rb +++ b/lib/app_profiler/profile.rb @@ -41,7 +41,7 @@ def upload AppProfiler.storage.upload(self).tap do |upload| if upload && defined?(upload.url) AppProfiler.logger.info( - <<~INFO.squish + <<~INFO.squish, [Profiler] data uploaded: profile_url=#{upload.url} profile_viewer_url=#{AppProfiler.profile_url(upload)} @@ -51,7 +51,7 @@ def upload end rescue => error AppProfiler.logger.info( - "[Profiler] failed to upload profile error_class=#{error.class} error_message=#{error.message}" + "[Profiler] failed to upload profile error_class=#{error.class} error_message=#{error.message}", ) nil end diff --git a/lib/app_profiler/profiler.rb b/lib/app_profiler/profiler.rb index bbb922df..45da916c 100644 --- a/lib/app_profiler/profiler.rb +++ b/lib/app_profiler/profiler.rb @@ -33,7 +33,7 @@ def start(params = {}) StackProf.start(**DEFAULTS, **params) rescue => error AppProfiler.logger.info( - "[Profiler] failed to start the profiler error_class=#{error.class} error_message=#{error.message}" + "[Profiler] failed to start the profiler error_class=#{error.class} error_message=#{error.message}", ) # This is a boolean instead of nil because StackProf#start returns a # boolean as well. @@ -52,7 +52,7 @@ def results Profile.from_stackprof(stackprof_profile) rescue => error AppProfiler.logger.info( - "[Profiler] failed to obtain the profile error_class=#{error.class} error_message=#{error.message}" + "[Profiler] failed to obtain the profile error_class=#{error.class} error_message=#{error.message}", ) nil end diff --git a/lib/app_profiler/server.rb b/lib/app_profiler/server.rb index 0a34ebd1..147dc592 100644 --- a/lib/app_profiler/server.rb +++ b/lib/app_profiler/server.rb @@ -280,7 +280,7 @@ def initialize(transport, logger) @listen_thread = nil @logger.info( - "[AppProfiler::Server] listening on addr=#{@transport.socket.addr}" + "[AppProfiler::Server] listening on addr=#{@transport.socket.addr}", ) @pid = Process.pid end @@ -342,7 +342,7 @@ def serve end rescue => e @logger.error( - "[AppProfiler::Server] exception #{e} responding to request #{request}: #{e.message}" + "[AppProfiler::Server] exception #{e} responding to request #{request}: #{e.message}", ) ensure session.close diff --git a/lib/app_profiler/viewer/speedscope_remote_viewer/base_middleware.rb b/lib/app_profiler/viewer/speedscope_remote_viewer/base_middleware.rb index 8d8397df..c45ef1bc 100644 --- a/lib/app_profiler/viewer/speedscope_remote_viewer/base_middleware.rb +++ b/lib/app_profiler/viewer/speedscope_remote_viewer/base_middleware.rb @@ -125,7 +125,7 @@ def index(_env)

HTML end - end + end, ) end diff --git a/lib/app_profiler/viewer/speedscope_remote_viewer/middleware.rb b/lib/app_profiler/viewer/speedscope_remote_viewer/middleware.rb index 516f83b9..75fb4227 100644 --- a/lib/app_profiler/viewer/speedscope_remote_viewer/middleware.rb +++ b/lib/app_profiler/viewer/speedscope_remote_viewer/middleware.rb @@ -12,7 +12,7 @@ class Middleware < BaseMiddleware def initialize(app) super @speedscope = Rack::File.new( - File.join(AppProfiler.root, "node_modules/speedscope/dist/release") + File.join(AppProfiler.root, "node_modules/speedscope/dist/release"), ) end @@ -33,7 +33,7 @@ def show(_env, name) end || raise(ArgumentError) render( - <<~HTML + <<~HTML, }, html[-200..-1], - message: "The generated HTML was incomplete" + message: "The generated HTML was incomplete", ) end diff --git a/test/app_profiler/viewer/speedscope_remote_viewer_test.rb b/test/app_profiler/viewer/speedscope_remote_viewer_test.rb index 5b2cd71e..8d5d8ecf 100644 --- a/test/app_profiler/viewer/speedscope_remote_viewer_test.rb +++ b/test/app_profiler/viewer/speedscope_remote_viewer_test.rb @@ -19,7 +19,7 @@ class SpeedscopeRemoteViewerTest < TestCase id = SpeedscopeRemoteViewer::Middleware.id(profile.file) AppProfiler.logger.expects(:info).with( - "[Profiler] Profile available at /app_profiler/#{id}\n" + "[Profiler] Profile available at /app_profiler/#{id}\n", ) viewer.view