Fixed a lot of linter warnings
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2023-12-11 13:08:46 -05:00
parent 34741691ed
commit 516f125ea7
14 changed files with 76 additions and 34 deletions

View File

@@ -1,4 +1,8 @@
# frozen_string_literal: true
# /test routes
class GameData < Sinatra::Base
get '/test' do
tests = Test.reverse(:updated_at).limit(10).all()
@@ -30,19 +34,16 @@ class GameData < Sinatra::Base
date_tag = params[:test_date_tag]
# make sure the date tag field is formatting properly
unless date_tag.start_with?('(')
date_tag = '(' + date_tag
end
unless date_tag.end_with?(')')
date_tag = date_tag + ')'
end
date_tag = "(#{date_tag}" unless date_tag.start_with?('(')
date_tag += ')' unless date_tag.end_with?(')')
test = Test.create(
date_tag: params[:test_date_tag],
date_tag: date_tag,
hardware_id: params[:test_hardware],
benchmark_id: params[:test_benchmark]
)
redirect "/test/#{test.id}"
end
end