5 Commits

Author SHA1 Message Date
64941e86f0 only build container for the main branch
All checks were successful
Gitea Actions Demo / lint (push) Successful in 18s
Gitea Actions Demo / test (push) Successful in 21s
Gitea Actions Demo / release-image (push) Successful in 1m44s
2025-03-11 05:09:22 -05:00
38f92507f6 run tests with rake 2025-03-11 05:09:22 -05:00
70cd5d6247 fix frozen string literal warning 2025-03-11 05:07:43 -05:00
45862025cf add Rakefile 2025-03-11 04:53:38 -05:00
9a19b6bae0 clean up temporary files
All checks were successful
Gitea Actions Demo / lint (push) Successful in 23s
Gitea Actions Demo / test (push) Successful in 13s
Gitea Actions Demo / release-image (push) Successful in 1m44s
2025-03-11 00:49:19 -05:00
6 changed files with 20 additions and 3 deletions

View File

@ -38,11 +38,11 @@ jobs:
ruby-version: '3.4' ruby-version: '3.4'
bundler-cache: true bundler-cache: true
- run: bundle exec rspec - run: bundle exec rake
release-image: release-image:
needs: test needs: test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: catthehacker/ubuntu:act-latest image: catthehacker/ubuntu:act-latest

View File

@ -22,4 +22,5 @@ group :development do
gem "rspec" gem "rspec"
gem "standard" gem "standard"
gem "minitest" gem "minitest"
gem "rake"
end end

View File

@ -48,6 +48,7 @@ GEM
rackup (2.2.1) rackup (2.2.1)
rack (>= 3) rack (>= 3)
rainbow (3.1.1) rainbow (3.1.1)
rake (13.2.1)
rbs (3.8.1) rbs (3.8.1)
logger logger
regexp_parser (2.10.0) regexp_parser (2.10.0)
@ -135,6 +136,7 @@ DEPENDENCIES
puma puma
rack-test rack-test
rackup rackup
rake
rbs rbs
rspec rspec
rubocop rubocop

11
Rakefile Normal file
View File

@ -0,0 +1,11 @@
begin
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)
rescue LoadError
end
require "minitest/test_task"
Minitest::TestTask.create
task default: [:test, :spec]

3
app.rb
View File

@ -530,5 +530,8 @@ get "/kitty" do
out << f.read(CHUNK_SIZE) out << f.read(CHUNK_SIZE)
end end
end end
ensure
f.close
f.unlink
end end
end end

View File

@ -10,7 +10,7 @@ class Sensitive
end end
def mask(v) def mask(v)
"".concat(v[0, @head], @ch * (v.length - (@head + @tail)), v[-@tail, @tail]) +"".concat(v[0, @head], @ch * (v.length - (@head + @tail)), v[-@tail, @tail])
end end
def unwrap def unwrap