Run rubocop on all files

This commit is contained in:
2023-06-08 21:57:54 +10:00
parent 6a2bc82e3b
commit 9d9d8ccf6d
65 changed files with 114 additions and 158 deletions

View File

@@ -4,7 +4,6 @@ module Adamantium
module Actions
module Trips
class Show < Adamantium::Action
include Deps["views.trips.show"]
def handle(req, res)

View File

@@ -5,9 +5,9 @@ module Adamantium
include Deps["geo.gpx_parser", "commands.workouts.create"]
def handle(req, res)
tempfile = Tempfile.new(%w/path .gpx/)
tempfile = Tempfile.new(%w[path .gpx])
if req.params.to_h.dig(:file, :tempfile) != nil
if !req.params.to_h.dig(:file, :tempfile).nil?
tempfile.write req.params[:file][:tempfile].read
else
tempfile.write req.params[:file]
@@ -15,7 +15,6 @@ module Adamantium
tempfile.rewind
gpxfile = gpx_parser.call(path: tempfile.path)
if gpxfile.success?