Watch
1
0
Fork
You've already forked play-test
0
mirror of https://github.com/chobbledotcom/play-test.git synced 2026-11-10 19:53:39 +00:00
The website for play-test.co.uk - a system for logging play equipment inspections (BS EN 19460) https://play-test.co.uk
  • Ruby 73.2%
  • C# 10%
  • JavaScript 5.2%
  • HTML 4.9%
  • Shell 2.5%
  • Other 4.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
stefan burke 4afb729b33
Fix Sorbet abstract-obligation errors in ControllerContext (#584)
ControllerContext declared params/session/cookies/request/flash/render/
redirect_to/respond_to as abstract sigs. Tapioca's generated controller
RBIs include the helper modules into every controller, so all 31
controllers became concrete classes inheriting eight unimplemented
abstract methods: 33 'Missing definitions for abstract methods' (5023)
errors, 964 vs the 919 baseline. The gate was reconciled by raising the
baseline instead of fixing the cause.

The concern's declarations are also the only static source of the Rails
context methods for controllers (this project ships no actionpack gem
RBIs), so they cannot simply be deleted - removing any of them turns
every controller's flash/respond_to/render/redirect_to call into new
7003 errors.

Declare the eight methods as plain super-forwarding methods instead:
statically identical resolution, no abstract obligation, and one less
runtime indirection than the abstract stub. Errors drop 964 -> 931;
lower the baseline accordingly.
2026-11-01 23:46:46 +00:00
.claude Rubocop everything 2025-07-17 17:26:42 +01:00
.github Increase test coverage and raise baseline (#580) 2026-10-31 10:10:05 +00:00
.helix Rubocop everything 2025-07-17 17:26:42 +01:00
.licenses/bundler Update annotations and attributions (#574) 2026-10-30 22:14:31 +00:00
app Fix Sorbet abstract-obligation errors in ControllerContext (#584) 2026-11-01 23:46:46 +00:00
bin Add a Jev code grader for source and spec files (#562) 2026-10-30 22:46:08 +00:00
config Replace "Not Applicable" with "N/A" on inspection edit pages (#583) 2026-10-31 14:40:35 +00:00
db Add unit configuration-aware checklists and bouncing pillow assessments (#577) 2026-10-30 22:14:00 +00:00
gems Use the turbo_response partial in chobble-forms to update the users_at_* fields 2025-08-12 19:54:25 +01:00
hooks Ignore sorbet/rbi/* 2025-08-13 01:23:08 +01:00
lib Increase test coverage and raise baseline (#580) 2026-10-31 10:10:05 +00:00
log Loads of refactoring - turning things into factories to reduce duplicate code 2025-06-09 15:15:49 +01:00
public Remove PWA stuff 2025-08-09 23:50:19 +01:00
sorbet Fix Sorbet abstract-obligation errors in ControllerContext (#584) 2026-11-01 23:46:46 +00:00
spec Replace "Not Applicable" with "N/A" on inspection edit pages (#583) 2026-10-31 14:40:35 +00:00
spencers_app Update chobble.com links to www.chobble.com (#537) 2026-09-12 07:52:49 +00:00
storage Re-add .keep 2025-10-19 11:13:03 +01:00
test Rubocop everything 2025-10-24 21:59:22 +01:00
tmp Convert trough fields to milimetres and integer fields, not decimals 2025-07-24 15:54:28 +01:00
vendor Loads of refactoring - turning things into factories to reduce duplicate code 2025-06-09 15:15:49 +01:00
.better-html.yml chore(lint): add better-html for enhanced ERB linting and safety checks (#81) 2025-08-04 02:28:16 +00:00
.dockerignore Fix test.rake 2025-08-05 19:25:12 +00:00
.env.example Fix SQLite test concurrency and preserve mutant isolation (#542) 2026-09-12 07:52:21 +00:00
.erb-lint-tracking Track ERB lint violations requiring manual fixes (#386) 2026-02-18 11:47:22 +00:00
.erb_lint.yml Run erb_lint (#80) 2025-08-04 02:33:04 +00:00
.gitattributes Try and ignore coverage stuff from git 2025-06-15 21:44:39 +01:00
.gitignore Test and apply working Dependabot updates (#579) 2026-10-30 22:14:07 +00:00
.gitmodules SSH => HTTPS submodule 2025-08-12 15:24:46 +01:00
.licensed.yml Add licensee gem check for AGPLv3 and extensive license data (#148) 2025-08-05 23:47:17 +00:00
.parallel_rspec Loads of refactoring - turning things into factories to reduce duplicate code 2025-06-09 15:15:49 +01:00
.rspec Update safety standards - add negative adjustments to user capacity, take roofs into equation with wall heights 2025-07-03 18:10:23 +01:00
.rspec_status Selectively pick changes 2025-08-08 22:33:53 +01:00
.rubocop.yml Rubocop everything 2025-10-24 21:59:22 +01:00
.ruby-version Switch to Devenv (#578) 2026-10-30 20:01:45 +00:00
.standard.yml Rate limiter (#517) 2026-08-01 20:59:31 +00:00
.yamllint.yml Run yamlfix over everything 2025-08-16 21:58:26 +01:00
14960.md Unify lots of safety standard stuff and tabbify the interface nicely 2025-06-20 12:40:35 +01:00
attributions.json Update annotations and attributions (#574) 2026-10-30 22:14:31 +00:00
ATTRIBUTIONS.md Update annotations and attributions (#574) 2026-10-30 22:14:31 +00:00
biome.json style: reformat JavaScript files for consistent indentation and spacing (#150) 2025-08-05 23:29:01 +00:00
BOUNCING_PILLOW_FIELDS.md Add unit configuration-aware checklists and bouncing pillow assessments (#577) 2026-10-30 22:14:00 +00:00
CLAUDE.md Fix Sorbet abstract-obligation errors in ControllerContext (#584) 2026-11-01 23:46:46 +00:00
code_standard_violations.txt Store code standard violations 2025-10-24 22:07:19 +01:00
config.ru Rubocop everything 2025-10-24 21:59:22 +01:00
devenv.lock Switch to Devenv (#578) 2026-10-30 20:01:45 +00:00
devenv.nix Add a Jev code grader for source and spec files (#562) 2026-10-30 22:46:08 +00:00
devenv.yaml Switch to Devenv (#578) 2026-10-30 20:01:45 +00:00
Dockerfile Exclude non-production gems from Docker release builds (#581) 2026-10-31 11:08:29 +00:00
erb_lint_output.txt Fix ERB linting issues (#362) 2025-10-28 14:46:23 +00:00
Gemfile Test and apply working Dependabot updates (#579) 2026-10-30 22:14:07 +00:00
Gemfile.lock Test and apply working Dependabot updates (#579) 2026-10-30 22:14:07 +00:00
ID_GENERATION.md Add ID_GENERATION spec 2025-10-12 14:06:45 +01:00
IMPROVEMENT_PLAN.md Add unit configuration-aware checklists and bouncing pillow assessments (#577) 2026-10-30 22:14:00 +00:00
LICENSE Equipment => Units 2025-06-09 19:26:45 +01:00
NEW_UNIT_TYPES.md Fix SQLite test concurrency and preserve mutant isolation (#542) 2026-09-12 07:52:21 +00:00
OFFLINE.md Add offline assessments plan and architecture documentation (#451) 2026-02-12 15:36:28 +00:00
Rakefile Loads of refactoring - turning things into factories to reduce duplicate code 2025-06-09 15:15:49 +01:00
README.md Exclude non-production gems from Docker release builds (#581) 2026-10-31 11:08:29 +00:00
RPII_TODO_08_08.md Support a developer and an admin NTFY channel 2025-08-12 21:37:54 +01:00
standardrb_output.txt Fix StandardRB linting issues (#363) 2025-10-25 15:25:52 +00:00
terragon-setup.sh Fake a secret in the Terragon setup 2025-08-13 16:58:09 +01:00
TEST-QUALITY-CRITERIA.md Add test quality criteria doc (#444) 2026-02-10 18:57:22 +00:00
TODO.md Update TODO 2025-08-06 17:31:10 +01:00
unfixed_issues.txt Fix ERB linting issues (#362) 2025-10-28 14:46:23 +00:00

play-test - BS EN 14960 inspection-logging tool

A web app for managing safety inspections of inflatable play equipment like bouncy castles and slides. Developed by Chobble CIC, a community interest company in Manchester, UK.

License: AGPL v3 Docker Image codecov

play-test helps inspectors track and document safety checks on inflatable play equipment. It handles equipment records, inspection forms, photo management, and PDF report generation. Makes repeat inspections of the same units quick and straightforward.

A public instance is live at play-test.co.uk.

Sponsor Development

Features

🎪 Equipment Tracking

  • Store unit details, dimensions, and manufacturer info
  • Keep inspection history for each piece of equipment
  • Upload photos with automatic processing
  • Quick access to previous inspection data

📋 Inspection Management

  • Seven assessment types covering different safety aspects
  • Draft inspections you can edit before finalising
  • Generate PDF reports with QR codes
  • Built-in safety calculations (anchor points, user capacity, etc.)

👥 Company Management

  • Company accounts with branding
  • User management and access control
  • Upload your logo for PDF reports
  • Works on phones, tablets, and desktops

🛠️ Technical Features

  • Export any unit or inspection as PDF or JSON
  • Shows safety standards right where you need them
  • Dark/light theme
  • Minimal dependencies
  • Full internationalisation support
  • No JavaScript required for core functionality

Getting Started

Docker

Quickest way to try it out:

docker pull dockerstefn/play-test
docker run -p 3000:3000 dockerstefn/play-test

Production builds exclude development, test and CI-only gem groups, including licensed and its Rugged dependency. Licence auditing still runs in CI. The BUNDLE_WITHOUT build argument can be overridden for non-production images.

Development Setup

Uses devenv for easy environment setup:

# Clone the repo
git clone https://github.com/yourusername/play-test.git
cd play-test

# Enter the development environment (run `devenv shell` again whenever you need it)
devenv shell

# Standard Rails setup
bundle install
rails db:create db:migrate db:seed
rails server

Traditional Setup

# Requires the Ruby version in .ruby-version and SQLite
bundle install
rails db:setup
rails server

Ubuntu 26.04 also requires libjitterentropy3-dev for Rugged's static OpenSSL link during bundle install. CI installs it in the shared setup action; the devenv configuration is unchanged.

The shared CI setup refreshes APT indexes and installs packages directly. Failed downloads stop setup instead of leaving missing native libraries for Rails to load.

Testing

Currently over 90% test coverage:

# Run all tests with coverage
bin/test

# Check specific file coverage
bin/coverage_check app/models/inspection.rb

# View detailed HTML report
open coverage/index.html

Tests use a separate SQLite WAL database per process. Ordinary examples use Rails' transactional fixtures, which pin the database connection across request cleanup. Do not replace these with unpinned DatabaseCleaner transactions: Rails can return their still-open transactions to the pool between requests.

Examples tagged js: true or concurrent use committed data and DatabaseCleaner truncation after Capybara finishes pending requests. Tag examples that make database requests from additional threads accordingly. IN_MEMORY_DB=true remains an explicit option for mutant's isolated forks.

Security scans run bin/brakeman --no-pager, which requires the latest Brakeman release. Update it with bundle update brakeman --conservative when the version check fails.

Test Coverage

If you want to help improve Play-Test, a great way would be to write some more rspec and Capybara tests. Check out coverage.play-test.co.uk for an up-to-date test coverage breakdown.

Tech Stack

  • Rails 8.0+ - With minimal gems
  • SQLite - No fancy databases (yet?)
  • RSpec & Capybara - 90%+ test coverage
  • Semantic HTML + MVP.css - Simple CSS
  • Turbo for progressive JS enhancement

About Chobble CIC

play-test is developed by Chobble CIC, a community interest company based in Manchester, UK. As a CIC, Chobble is regulated to operate in the public interest rather than for private shareholders — surplus profits are reinvested in community activities like open source development and reduced rates for charities and community organisations.

Chobble's principles include transparency, fair pricing, client ownership of their tools and data, and ethical boundaries. All source code is shared openly, and there's no vendor lock-in.

Contributing

Pull requests welcome! This is an open source project and we're not affiliated with any industry bodies, so improvements from anyone are appreciated.

AGPLv3 - see LICENSE file. This means you can use, modify, and distribute the code, but you must share any improvements.