fix lint errors
Some checks failed
Gitea Actions Demo / lint (push) Successful in 2m12s
Gitea Actions Demo / test (push) Failing after 2m4s
Gitea Actions Demo / release-image (push) Has been skipped

This commit is contained in:
Ryan Cavicchioni 2025-03-09 16:08:50 -05:00
parent 93e86e0f17
commit 5c2c7ec3b7
Signed by: ryanc
SSH Key Fingerprint: SHA256:KbXiwUnZnHFwFtt3Bytd+F3FN9pPHn1Z1cxMIE1TPbg
3 changed files with 5 additions and 6 deletions

2
app.rb
View File

@ -432,7 +432,7 @@ get "/chunked/:delay" do
delay = Float(params[:delay]) delay = Float(params[:delay])
stream do |out| stream do |out|
30.times do |i| 30.times do |i|
out << jsonify({id: i, message: i % 2 == 0 ? "tick" : "tock"}) out << jsonify({id: i, message: (i % 2).zero? ? "tick" : "tock"})
sleep delay sleep delay
end end
end end

View File

@ -31,8 +31,7 @@ class Config
end end
def to_json(options = nil) def to_json(options = nil)
if options && if options&.key?(:pretty) &&
options.key?(:pretty) &&
options[:pretty] == true options[:pretty] == true
JSON.pretty_generate as_json(options) JSON.pretty_generate as_json(options)
else else

View File

@ -4,7 +4,7 @@ $LOAD_PATH.unshift File.dirname(__FILE__) + "/../lib"
require "sensitive" require "sensitive"
ALPHABET = ('a' .. 'z').reduce(:concat) ALPHABET = ("a".."z").reduce(:concat)
describe "Sensitive" do describe "Sensitive" do
before do before do