examples: rails-shop, the sample rootfs app with a worker, a release and uploads (rootfs spec §6.1; Plan 4 Task 8)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
approved_rootfs_copy_test.go+2 −0docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md+10 −10examples/rails-shop/.dockerignore+47 −0examples/rails-shop/.gitignore+35 −0examples/rails-shop/.ruby-version+1 −0examples/rails-shop/Dockerfile+23 −0examples/rails-shop/Gemfile+42 −0examples/rails-shop/Gemfile.lock+326 −0examples/rails-shop/README.md+3 −0examples/rails-shop/Rakefile+6 −0examples/rails-shop/app/assets/images/.keep+0 −0examples/rails-shop/app/assets/stylesheets/application.css+10 −0examples/rails-shop/app/controllers/application_controller.rb+4 −0examples/rails-shop/app/controllers/concerns/.keep+0 −0examples/rails-shop/app/controllers/crashes_controller.rb+25 −0examples/rails-shop/app/controllers/pages_controller.rb+11 −0examples/rails-shop/app/controllers/pings_controller.rb+6 −0examples/rails-shop/app/controllers/uploads_controller.rb+10 −0examples/rails-shop/app/helpers/application_helper.rb+2 −0examples/rails-shop/app/jobs/application_job.rb+7 −0examples/rails-shop/app/jobs/crash_worker_job.rb+7 −0examples/rails-shop/app/jobs/heartbeat_job.rb+5 −0examples/rails-shop/app/jobs/ping_job.rb+6 −0examples/rails-shop/app/mailers/application_mailer.rb+4 −0examples/rails-shop/app/models/application_record.rb+3 −0examples/rails-shop/app/models/concerns/.keep+0 −0examples/rails-shop/app/models/heartbeat.rb+2 −0examples/rails-shop/app/models/ping.rb+2 −0examples/rails-shop/app/models/upload.rb+3 −0examples/rails-shop/app/views/layouts/application.html.erb+28 −0examples/rails-shop/app/views/layouts/mailer.html.erb+13 −0examples/rails-shop/app/views/layouts/mailer.text.erb+1 −0examples/rails-shop/app/views/pages/show.html.erb+19 −0examples/rails-shop/app/views/pwa/manifest.json.erb+22 −0examples/rails-shop/app/views/pwa/service-worker.js+26 −0examples/rails-shop/bin/bundler-audit+6 −0examples/rails-shop/bin/ci+6 −0examples/rails-shop/bin/dev+2 −0examples/rails-shop/bin/jobs+6 −0examples/rails-shop/bin/rails+4 −0examples/rails-shop/bin/rake+4 −0examples/rails-shop/bin/setup+35 −0examples/rails-shop/config.ru+6 −0examples/rails-shop/config/application.rb+42 −0examples/rails-shop/config/boot.rb+4 −0examples/rails-shop/config/bundler-audit.yml+5 −0examples/rails-shop/config/cable.yml+16 −0examples/rails-shop/config/cache.yml+15 −0examples/rails-shop/config/ci.rb+16 −0examples/rails-shop/config/credentials.yml.enc+1 −0examples/rails-shop/config/database.yml+32 −0examples/rails-shop/config/environment.rb+5 −0examples/rails-shop/config/environments/development.rb+75 −0examples/rails-shop/config/environments/production.rb+91 −0examples/rails-shop/config/environments/test.rb+53 −0examples/rails-shop/config/initializers/assets.rb+7 −0examples/rails-shop/config/initializers/content_security_policy.rb+29 −0examples/rails-shop/config/initializers/filter_parameter_logging.rb+8 −0examples/rails-shop/config/initializers/inflections.rb+16 −0examples/rails-shop/config/locales/en.yml+31 −0examples/rails-shop/config/puma.rb+11 −0examples/rails-shop/config/queue.yml+18 −0examples/rails-shop/config/recurring.yml+18 −0examples/rails-shop/config/routes.rb+18 −0examples/rails-shop/config/storage.yml+38 −0examples/rails-shop/db/migrate/20261024000001_create_solid_queue_tables.rb+162 −0examples/rails-shop/db/migrate/20261024000002_create_solid_cache_tables.rb+14 −0examples/rails-shop/db/migrate/20261024000003_create_solid_cable_tables.rb+12 −0examples/rails-shop/db/migrate/20261024000004_create_active_storage_tables.active_storage.rb+57 −0examples/rails-shop/db/migrate/20261024000005_create_pings.rb+9 −0examples/rails-shop/db/migrate/20261024000006_create_heartbeats.rb+7 −0examples/rails-shop/db/migrate/20261024000007_create_uploads.rb+7 −0examples/rails-shop/db/schema.rb+238 −0examples/rails-shop/db/seeds.rb+9 −0examples/rails-shop/lib/tasks/.keep+0 −0examples/rails-shop/log/.keep+0 −0examples/rails-shop/processes.json+6 −0examples/rails-shop/public/400.html+135 −0examples/rails-shop/public/404.html+135 −0examples/rails-shop/public/406-unsupported-browser.html+135 −0examples/rails-shop/public/422.html+135 −0examples/rails-shop/public/500.html+135 −0examples/rails-shop/public/icon.pngbinaryexamples/rails-shop/public/icon.svg+3 −0examples/rails-shop/public/robots.txt+1 −0examples/rails-shop/script/.keep+0 −0examples/rails-shop/storage/.keep+0 −0examples/rails-shop/tmp/.keep+0 −0examples/rails-shop/tmp/pids/.keep+0 −0examples/rails-shop/tmp/storage/.keep+0 −0examples/rails-shop/v2.patch+68 −0examples/rails-shop/vendor/.keep+0 −0
Intent
<task-notification> <task-id>aea00f82335afc346</task-id> <tool-use-id>toolu_01E7xx89gF5craR5rVyQxk9s</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/18ea9266-acea-4f37-abab-b97c6a7faffa/tasks/aea00f82335afc346.output</output-file> <status>completed</status> <summary>Agent "Implement rootfs Plan 4 Task 6" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>**Status:** DONE_WITH_CONCERNS **Commit:** 39cd7efa (parent 3ad0d014). Merging origin/main changed nothing: origin/main (a9536235) was already in the branch. **Tests:** all four test commands from the brief pass, as do build, vet, gofmt and the darwin, windows and linux/arm64 builds. I saw every new test fail before it passed except the end-to-end test, which I wrote after the code. To show it fails, I put main's version of each file back for one run: without the CLI change it fails on the missing "always on" line, and without the console change it fails with `WORKERS = "-"`. All three arms of TestInstanceListWorkersStayInTheirTenant fail under a mutation: - **Workers copied at put site (a):** the "refused view" arm fails. - **The fleet-owner filter (`f.Account != acct`) removed:** the "foreign fleet" arm fails. - **The report's account and app check removed (extra):** both "tags" cases fail. **Concerns:** 1. **The site (a) mutation is built by hand.** Site (a) skips every host that has its own report entry, so copying "this host's workers" there is always empty and can't leak. The only form that leaks copies workers from other hosts' entries onto the refused view, so that is the mutation I tested. The test catches it, and catches any workers on a refused view. The whole-branch reviewer should know that the skip is the real guarantee. 2. **One extra file in the commit:** `instances_rollout_test.go`, which is not in the brief's file list. `TestRolloutWireShape` compared two `apiRollout` structs with `!=`, which stops compiling once the struct holds the `Workers` slice. I changed that one comparison to `reflect.DeepEqual`. Two other things to know: - Each tenant arm also creates a second instance, `two.example.com`, that is correctly tagged with one worker. This makes sure no arm can pass just because the list carries no workers at all. - The end-to-end test's host is `shop.bab.oncarlos.test`, not one under `example.com`, because the console fixes the instance domain to the account's own subdomain. For Task 10's census card, the root-package production files changed are `apimode.go`, `instances_cli.go` and the new `instances_rootfs.go`. I did not run census-propose. The full report is in `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-4/.superpowers/sdd/2026-10-28-rootfs-apps-4-console/task-6-report.md`.</result> <usage><subagent_tokens>185917</subagent_tokens><tool_uses>70</tool_uses><duration_ms>738820</duration_ms></usage> </task-notification>
diff --git a/approved_rootfs_copy_test.go b/approved_rootfs_copy_test.go| index 8626c0622..86441c80d 100644 |
| --- a/approved_rootfs_copy_test.go |
| +++ b/approved_rootfs_copy_test.go |
| @@ -220,6 +220,8 @@ var rootfsCopyBuilt = []string{ |
| "RFS-4-C11", |
| // Plan 4 Task 6: RUNTIME and WORKERS, and the create line (instances_rootfs.go) |
| "RFS-4-C12", "RFS-4-C13", "RFS-4-C14", "RFS-4-C15", "RFS-4-C16", "RFS-4-C17", "RFS-4-C18", "RFS-4-C19", |
| + // Plan 4 Task 8: the sample app's page and README (examples/rails-shop) |
| + "RFS-4-C20", "RFS-4-C21", "RFS-4-C22", "RFS-4-C23", "RFS-4-C24", "RFS-4-C25", "RFS-4-C26", "RFS-4-C27", "RFS-4-C28", "RFS-4-C29", |
| // Whole-branch review round 2: a placement with a box below the |
| // rootfs floor (internal/console/rootfs.go) |
| "RFS-4-C139", "RFS-4-C140", |
diff --git a/docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md b/docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md| index 15915082f..c06a78e47 100644 |
| --- a/docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md |
| +++ b/docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md |
| @@ -244,16 +244,16 @@ From the plan: Placeholders: `<app>` an app; `<fleet>` a fleet name; `<region>` |
| | id | file | text | status | |
| |---|---|---|---| |
| -| RFS-4-C20 | app/views/pages/show.html.erb | Tables in its database: <tables>. Cable messages: <n>. | approved | |
| -| RFS-4-C21 | `app/views/layouts/application.html.erb`, `app/views/pages/show.html.erb` | shop | approved | |
| -| RFS-4-C22 | app/views/pages/show.html.erb | Enqueue a job | approved | |
| -| RFS-4-C23 | app/views/pages/show.html.erb | Jobs done: <done> of <total> | approved | |
| -| RFS-4-C24 | app/views/pages/show.html.erb | Heartbeats in the last hour: <n> | approved | |
| -| RFS-4-C25 | app/views/pages/show.html.erb | Upload a file | approved | |
| -| RFS-4-C26 | app/views/pages/show.html.erb | This page was cached at <time>. | approved | |
| -| RFS-4-C27 | v2.patch | Latest note: <note> | approved | |
| -| RFS-4-C28 | README.md | A small Rails 8 app that runs on CARLOS as a rootfs app. The guide Run a Rails app on your own boxes is built from it. | approved | |
| -| RFS-4-C29 | README.md | Build it with docker buildx for linux/arm64, check it with carlos ship --check, and ship it with carlos ship --rootfs. The guide has every step. | approved | |
| +| RFS-4-C20 | examples/rails-shop/app/views/pages/show.html.erb | Tables in its database: <tables>. Cable messages: <n>. | approved | |
| +| RFS-4-C21 | examples/rails-shop/app/views/layouts/application.html.erb | shop | approved | |
| +| RFS-4-C22 | examples/rails-shop/app/views/pages/show.html.erb | Enqueue a job | approved | |
| +| RFS-4-C23 | examples/rails-shop/app/views/pages/show.html.erb | Jobs done: <done> of <total> | approved | |
| +| RFS-4-C24 | examples/rails-shop/app/views/pages/show.html.erb | Heartbeats in the last hour: <n> | approved | |
| +| RFS-4-C25 | examples/rails-shop/app/views/pages/show.html.erb | Upload a file | approved | |
| +| RFS-4-C26 | examples/rails-shop/app/views/pages/show.html.erb | This page was cached at <time>. | approved | |
| +| RFS-4-C27 | examples/rails-shop/v2.patch | Latest note: <note> | approved | |
| +| RFS-4-C28 | examples/rails-shop/README.md | A small Rails 8 app that runs on CARLOS as a rootfs app. The guide Run a Rails app on your own boxes is built from it. | approved | |
| +| RFS-4-C29 | examples/rails-shop/README.md | Build it with docker buildx for linux/arm64, check it with carlos ship --check, and ship it with carlos ship --rootfs. The guide has every step. | approved | |
| ### docs/site/rootfs.md |
diff --git a/examples/rails-shop/.dockerignore b/examples/rails-shop/.dockerignore| new file mode 100644 |
| index 000000000..136592224 |
| --- /dev/null |
| +++ b/examples/rails-shop/.dockerignore |
| @@ -0,0 +1,47 @@ |
| +# See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files. |
| + |
| +# Ignore git directory. |
| +/.git/ |
| +/.gitignore |
| + |
| +# Ignore bundler config. |
| +/.bundle |
| + |
| +# Ignore all environment files. |
| +/.env* |
| + |
| +# Ignore all default key files. |
| +/config/master.key |
| +/config/credentials/*.key |
| + |
| +# Ignore all logfiles and tempfiles. |
| +/log/* |
| +/tmp/* |
| +!/log/.keep |
| +!/tmp/.keep |
| + |
| +# Ignore pidfiles, but keep the directory. |
| +/tmp/pids/* |
| +!/tmp/pids/.keep |
| + |
| +# Ignore storage (uploaded files in development and any SQLite databases). |
| +/storage/* |
| +!/storage/.keep |
| +/tmp/storage/* |
| +!/tmp/storage/.keep |
| + |
| +# Ignore assets. |
| +/node_modules/ |
| +/app/assets/builds/* |
| +!/app/assets/builds/.keep |
| +/public/assets |
| + |
| +# Ignore development files |
| +/.devcontainer |
| + |
| +# Ignore Docker-related files |
| +/.dockerignore |
| +/Dockerfile* |
| +/tmp |
| +/storage/* |
| +/log/* |
diff --git a/examples/rails-shop/.gitignore b/examples/rails-shop/.gitignore| new file mode 100644 |
| index 000000000..fbcab405e |
| --- /dev/null |
| +++ b/examples/rails-shop/.gitignore |
| @@ -0,0 +1,35 @@ |
| +# See https://help.github.com/articles/ignoring-files for more about ignoring files. |
| +# |
| +# Temporary files generated by your text editor or operating system |
| +# belong in git's global ignore instead: |
| +# `$XDG_CONFIG_HOME/git/ignore` or `~/.config/git/ignore` |
| + |
| +# Ignore bundler config. |
| +/.bundle |
| + |
| +# Ignore all environment files. |
| +/.env* |
| + |
| +# Ignore all logfiles and tempfiles. |
| +/log/* |
| +/tmp/* |
| +!/log/.keep |
| +!/tmp/.keep |
| + |
| +# Ignore pidfiles, but keep the directory. |
| +/tmp/pids/* |
| +!/tmp/pids/ |
| +!/tmp/pids/.keep |
| + |
| +# Ignore storage (uploaded files in development and any SQLite databases). |
| +/storage/* |
| +!/storage/.keep |
| +/tmp/storage/* |
| +!/tmp/storage/ |
| +!/tmp/storage/.keep |
| + |
| +/public/assets |
| + |
| +# Ignore key files for decrypting credentials and more. |
| +/config/*.key |
| + |
diff --git a/examples/rails-shop/.ruby-version b/examples/rails-shop/.ruby-version| new file mode 100644 |
| index 000000000..c65712efa |
| --- /dev/null |
| +++ b/examples/rails-shop/.ruby-version |
| @@ -0,0 +1 @@ |
| +ruby-3.4.12 |
diff --git a/examples/rails-shop/Dockerfile b/examples/rails-shop/Dockerfile| new file mode 100644 |
| index 000000000..fd756c597 |
| --- /dev/null |
| +++ b/examples/rails-shop/Dockerfile |
| @@ -0,0 +1,23 @@ |
| +# Dockerfile |
| +FROM docker.io/library/ruby:3.4-slim AS base |
| +WORKDIR /rails |
| +ENV RAILS_ENV=production BUNDLE_DEPLOYMENT=1 BUNDLE_PATH=/usr/local/bundle \ |
| + BUNDLE_WITHOUT=development:test BOOTSNAP_CACHE_DIR=/rails/.bootsnap |
| +RUN apt-get update -qq && apt-get install --no-install-recommends -y libjemalloc2 libsqlite3-0 && \ |
| + ln -s /usr/lib/$(uname -m)-linux-gnu/libjemalloc.so.2 /usr/local/lib/libjemalloc.so && \ |
| + rm -rf /var/lib/apt/lists/* |
| +ENV LD_PRELOAD=/usr/local/lib/libjemalloc.so |
| + |
| +FROM base AS build |
| +RUN apt-get update -qq && apt-get install --no-install-recommends -y build-essential git libyaml-dev pkg-config && \ |
| + rm -rf /var/lib/apt/lists/* |
| +COPY Gemfile Gemfile.lock ./ |
| +RUN bundle install && rm -rf ~/.bundle "${BUNDLE_PATH}"/ruby/*/cache |
| +COPY . . |
| +RUN bundle exec bootsnap precompile --gemfile app/ lib/ && SECRET_KEY_BASE_DUMMY=1 bin/rails assets:precompile |
| + |
| +FROM base |
| +COPY --from=build /usr/local/bundle /usr/local/bundle |
| +COPY --from=build /rails /rails |
| +RUN rm -rf /rails/tmp && ln -s /tmp /rails/tmp && chmod -R a+rX /rails /usr/local/bundle |
| +ENV BOOTSNAP_READONLY=1 |
diff --git a/examples/rails-shop/Gemfile b/examples/rails-shop/Gemfile| new file mode 100644 |
| index 000000000..3b460b89d |
| --- /dev/null |
| +++ b/examples/rails-shop/Gemfile |
| @@ -0,0 +1,42 @@ |
| +source "https://rubygems.org" |
| + |
| +# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" |
| +gem "rails", "~> 8.1.4" |
| +# The modern asset pipeline for Rails [https://github.com/rails/propshaft] |
| +gem "propshaft" |
| +# Use sqlite3 as the database for Active Record |
| +gem "sqlite3", ">= 2.1" |
| +# Use the Puma web server [https://github.com/puma/puma] |
| +gem "puma", ">= 5.0" |
| + |
| +# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword] |
| +# gem "bcrypt", "~> 3.1.7" |
| + |
| +# Windows does not include zoneinfo files, so bundle the tzinfo-data gem |
| +gem "tzinfo-data", platforms: %i[ windows jruby ] |
| + |
| +# Use the database-backed adapters for Rails.cache, Active Job, and Action Cable |
| +gem "solid_cache" |
| +gem "solid_queue" |
| +gem "solid_cable" |
| + |
| +# Reduces boot times through caching; required in config/boot.rb |
| +gem "bootsnap", require: false |
| + |
| +# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] |
| +gem "image_processing", "~> 1.2" |
| + |
| +gem "aws-sdk-s3", require: false |
| + |
| +group :development, :test do |
| + # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem |
| + gem "debug", platforms: %i[ mri windows ], require: "debug/prelude" |
| + |
| + # Audits gems for known security defects (use config/bundler-audit.yml to ignore issues) |
| + gem "bundler-audit", require: false |
| +end |
| + |
| +group :development do |
| + # Use console on exceptions pages [https://github.com/rails/web-console] |
| + gem "web-console" |
| +end |
diff --git a/examples/rails-shop/Gemfile.lock b/examples/rails-shop/Gemfile.lock| new file mode 100644 |
| index 000000000..9f1e2a1e2 |
| --- /dev/null |
| +++ b/examples/rails-shop/Gemfile.lock |
| @@ -0,0 +1,326 @@ |
| +GEM |
| + remote: https://rubygems.org/ |
| + specs: |
| + action_text-trix (2.1.19) |
| + railties |
| + actioncable (8.1.4) |
| + actionpack (= 8.1.4) |
| + activesupport (= 8.1.4) |
| + nio4r (~> 2.0) |
| + websocket-driver (>= 0.6.1) |
| + zeitwerk (~> 2.6) |
| + actionmailbox (8.1.4) |
| + actionpack (= 8.1.4) |
| + activejob (= 8.1.4) |
| + activerecord (= 8.1.4) |
| + activestorage (= 8.1.4) |
| + activesupport (= 8.1.4) |
| + mail (>= 2.8.0) |
| + actionmailer (8.1.4) |
| + actionpack (= 8.1.4) |
| + actionview (= 8.1.4) |
| + activejob (= 8.1.4) |
| + activesupport (= 8.1.4) |
| + mail (>= 2.8.0) |
| + rails-dom-testing (~> 2.2) |
| + actionpack (8.1.4) |
| + actionview (= 8.1.4) |
| + activesupport (= 8.1.4) |
| + nokogiri (>= 1.8.5) |
| + rack (>= 2.2.4) |
| + rack-session (>= 1.0.1) |
| + rack-test (>= 0.6.3) |
| + rails-dom-testing (~> 2.2) |
| + rails-html-sanitizer (~> 1.6) |
| + useragent (~> 0.16) |
| + actiontext (8.1.4) |
| + action_text-trix (~> 2.1.15) |
| + actionpack (= 8.1.4) |
| + activerecord (= 8.1.4) |
| + activestorage (= 8.1.4) |
| + activesupport (= 8.1.4) |
| + globalid (>= 0.6.0) |
| + nokogiri (>= 1.8.5) |
| + actionview (8.1.4) |
| + activesupport (= 8.1.4) |
| + builder (~> 3.1) |
| + erubi (~> 1.11) |
| + rails-dom-testing (~> 2.2) |
| + rails-html-sanitizer (~> 1.6) |
| + activejob (8.1.4) |
| + activesupport (= 8.1.4) |
| + globalid (>= 0.3.6) |
| + activemodel (8.1.4) |
| + activesupport (= 8.1.4) |
| + activerecord (8.1.4) |
| + activemodel (= 8.1.4) |
| + activesupport (= 8.1.4) |
| + timeout (>= 0.4.0) |
| + activestorage (8.1.4) |
| + actionpack (= 8.1.4) |
| + activejob (= 8.1.4) |
| + activerecord (= 8.1.4) |
| + activesupport (= 8.1.4) |
| + marcel (~> 1.0) |
| + activesupport (8.1.4) |
| + base64 |
| + bigdecimal |
| + concurrent-ruby (~> 1.0, >= 1.3.1) |
| + connection_pool (>= 2.2.5) |
| + drb |
| + i18n (>= 1.6, < 2) |
| + json |
| + logger (>= 1.4.2) |
| + minitest (>= 5.1) |
| + securerandom (>= 0.3) |
| + tzinfo (~> 2.0, >= 2.0.5) |
| + uri (>= 0.13.1) |
| + aws-eventstream (1.4.1) |
| + aws-partitions (1.1299.1) |
| + aws-sdk-core (3.262.0) |
| + aws-eventstream (~> 1, >= 1.4.1) |
| + aws-partitions (~> 1, >= 1.992.0) |
| + aws-sigv4 (~> 1.9) |
| + base64 |
| + bigdecimal |
| + jmespath (~> 1, >= 1.6.1) |
| + logger |
| + rexml (~> 3.4, >= 3.4.2) |
| + aws-sdk-kms (1.137.0) |
| + aws-sdk-core (~> 3, >= 3.262.0) |
| + aws-sigv4 (~> 1.5) |
| + aws-sdk-s3 (1.236.0) |
| + aws-sdk-core (~> 3, >= 3.262.0) |
| + aws-sdk-kms (~> 1) |
| + aws-sigv4 (~> 1.5) |
| + aws-sigv4 (1.12.1) |
| + aws-eventstream (~> 1, >= 1.0.2) |
| + base64 (0.3.0) |
| + bigdecimal (4.1.3) |
| + bindex (0.8.1) |
| + bootsnap (1.26.1) |
| + msgpack (~> 1.5) |
| + builder (3.3.0) |
| + bundler-audit (0.9.3) |
| + bundler (>= 1.2.0) |
| + thor (~> 1.0) |
| + concurrent-ruby (1.3.8) |
| + connection_pool (3.0.2) |
| + crass (1.0.8) |
| + date (3.6.0) |
| + debug (1.11.1) |
| + irb (~> 1.10) |
| + reline (>= 0.3.8) |
| + drb (2.2.3) |
| + erb (6.0.7) |
| + erubi (1.13.1) |
| + et-orbi (1.4.2) |
| + tzinfo |
| + ffi (1.17.4-aarch64-linux-gnu) |
| + ffi (1.17.4-aarch64-linux-musl) |
| + ffi (1.17.4-arm-linux-gnu) |
| + ffi (1.17.4-arm-linux-musl) |
| + ffi (1.17.4-arm64-darwin) |
| + ffi (1.17.4-x86_64-darwin) |
| + ffi (1.17.4-x86_64-linux-gnu) |
| + ffi (1.17.4-x86_64-linux-musl) |
| + fugit (1.14.0) |
| + et-orbi (~> 1.4) |
| + raabro (~> 1.4) |
| + globalid (1.4.0) |
| + activesupport (>= 6.1) |
| + i18n (1.15.2) |
| + concurrent-ruby (~> 1.0) |
| + image_processing (1.14.0) |
| + mini_magick (>= 4.9.5, < 6) |
| + ruby-vips (>= 2.0.17, < 3) |
| + io-console (0.9.5) |
| + irb (1.18.0) |
| + pp (>= 0.6.0) |
| + prism (>= 1.3.0) |
| + rdoc (>= 4.0.0) |
| + reline (>= 0.4.2) |
| + jmespath (1.6.2) |
| + json (3.1.0) |
| + logger (1.7.0) |
| + loofah (2.25.2) |
| + crass (~> 1.0.2) |
| + nokogiri (>= 1.12.0) |
| + mail (2.9.1) |
| + logger |
| + mini_mime (>= 0.1.1) |
| + net-imap |
| + net-pop |
| + net-smtp |
| + marcel (1.2.1) |
| + mini_magick (5.4.0) |
| + logger |
| + mini_mime (1.1.5) |
| + minitest (6.0.6) |
| + drb (~> 2.0) |
| + prism (~> 1.5) |
| + msgpack (1.8.6) |
| + net-imap (0.6.8) |
| + date |
| + net-protocol |
| + net-pop (0.1.2) |
| + net-protocol |
| + net-protocol (0.4.0) |
| + timeout |
| + net-smtp (0.5.2) |
| + net-protocol |
| + nio4r (2.7.5) |
| + nokogiri (1.19.4-aarch64-linux-gnu) |
| + racc (~> 1.4) |
| + nokogiri (1.19.4-aarch64-linux-musl) |
| + racc (~> 1.4) |
| + nokogiri (1.19.4-arm-linux-gnu) |
| + racc (~> 1.4) |
| + nokogiri (1.19.4-arm-linux-musl) |
| + racc (~> 1.4) |
| + nokogiri (1.19.4-arm64-darwin) |
| + racc (~> 1.4) |
| + nokogiri (1.19.4-x86_64-darwin) |
| + racc (~> 1.4) |
| + nokogiri (1.19.4-x86_64-linux-gnu) |
| + racc (~> 1.4) |
| + nokogiri (1.19.4-x86_64-linux-musl) |
| + racc (~> 1.4) |
| + pp (0.6.4) |
| + prettyprint |
| + prettyprint (0.2.1) |
| + prism (1.9.0) |
| + propshaft (1.3.2) |
| + actionpack (>= 7.0.0) |
| + activesupport (>= 7.0.0) |
| + rack |
| + puma (8.0.2) |
| + nio4r (~> 2.0) |
| + raabro (1.5.0) |
| + racc (1.8.1) |
| + rack (3.2.7) |
| + rack-session (2.1.2) |
| + base64 (>= 0.1.0) |
| + rack (>= 3.0.0) |
| + rack-test (2.3.0) |
| + rack (>= 1.3) |
| + rackup (2.3.1) |
| + rack (>= 3) |
| + rails (8.1.4) |
| + actioncable (= 8.1.4) |
| + actionmailbox (= 8.1.4) |
| + actionmailer (= 8.1.4) |
| + actionpack (= 8.1.4) |
| + actiontext (= 8.1.4) |
| + actionview (= 8.1.4) |
| + activejob (= 8.1.4) |
| + activemodel (= 8.1.4) |
| + activerecord (= 8.1.4) |
| + activestorage (= 8.1.4) |
| + activesupport (= 8.1.4) |
| + bundler (>= 1.15.0) |
| + railties (= 8.1.4) |
| + rails-dom-testing (2.3.0) |
| + activesupport (>= 5.0.0) |
| + minitest |
| + nokogiri (>= 1.6) |
| + rails-html-sanitizer (1.7.1) |
| + loofah (~> 2.25, >= 2.25.2) |
| + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) |
| + railties (8.1.4) |
| + actionpack (= 8.1.4) |
| + activesupport (= 8.1.4) |
| + irb (~> 1.13) |
| + rackup (>= 1.0.0) |
| + rake (>= 12.2) |
| + thor (~> 1.0, >= 1.2.2) |
| + tsort (>= 0.2) |
| + zeitwerk (~> 2.6) |
| + rake (13.4.2) |
| + rbs (4.2.0) |
| + logger |
| + prism (>= 1.6.0) |
| + tsort |
| + rdoc (8.1.0) |
| + erb |
| + prism (>= 1.6.0) |
| + rbs (>= 4.0.0) |
| + tsort |
| + reline (0.7.0) |
| + io-console (~> 0.5) |
| + rexml (3.4.4) |
| + ruby-vips (2.3.0) |
| + ffi (~> 1.12) |
| + logger |
| + securerandom (0.4.1) |
| + solid_cable (4.1.0) |
| + actioncable (>= 7.2) |
| + activejob (>= 7.2) |
| + activerecord (>= 7.2) |
| + railties (>= 7.2) |
| + solid_cache (1.0.10) |
| + activejob (>= 7.2) |
| + activerecord (>= 7.2) |
| + railties (>= 7.2) |
| + solid_queue (1.7.0) |
| + activejob (>= 7.1) |
| + activerecord (>= 7.1) |
| + concurrent-ruby (>= 1.3.1) |
| + fugit (~> 1.11) |
| + railties (>= 7.1) |
| + thor (>= 1.3.1) |
| + sqlite3 (2.10.2-aarch64-linux-gnu) |
| + sqlite3 (2.10.2-aarch64-linux-musl) |
| + sqlite3 (2.10.2-arm-linux-gnu) |
| + sqlite3 (2.10.2-arm-linux-musl) |
| + sqlite3 (2.10.2-arm64-darwin) |
| + sqlite3 (2.10.2-x86_64-darwin) |
| + sqlite3 (2.10.2-x86_64-linux-gnu) |
| + sqlite3 (2.10.2-x86_64-linux-musl) |
| + thor (1.5.0) |
| + timeout (0.6.1) |
| + tsort (0.2.0) |
| + tzinfo (2.0.6) |
| + concurrent-ruby (~> 1.0) |
| + uri (1.1.2) |
| + useragent (0.16.11) |
| + web-console (4.3.0) |
| + actionview (>= 8.0.0) |
| + bindex (>= 0.4.0) |
| + railties (>= 8.0.0) |
| + websocket-driver (0.8.2) |
| + base64 |
| + websocket-extensions (>= 0.1.0) |
| + websocket-extensions (0.1.5) |
| + zeitwerk (2.8.3) |
| + |
| +PLATFORMS |
| + aarch64-linux |
| + aarch64-linux-gnu |
| + aarch64-linux-musl |
| + arm-linux-gnu |
| + arm-linux-musl |
| + arm64-darwin |
| + x86_64-darwin |
| + x86_64-linux |
| + x86_64-linux-gnu |
| + x86_64-linux-musl |
| + |
| +DEPENDENCIES |
| + aws-sdk-s3 |
| + bootsnap |
| + bundler-audit |
| + debug |
| + image_processing (~> 1.2) |
| + propshaft |
| + puma (>= 5.0) |
| + rails (~> 8.1.4) |
| + solid_cable |
| + solid_cache |
| + solid_queue |
| + sqlite3 (>= 2.1) |
| + tzinfo-data |
| + web-console |
| + |
| +BUNDLED WITH |
| + 2.6.9 |
diff --git a/examples/rails-shop/README.md b/examples/rails-shop/README.md| new file mode 100644 |
| index 000000000..5a41b69ca |
| --- /dev/null |
| +++ b/examples/rails-shop/README.md |
| @@ -0,0 +1,3 @@ |
| +A small Rails 8 app that runs on CARLOS as a rootfs app. The guide Run a Rails app on your own boxes is built from it. |
| + |
| +Build it with docker buildx for linux/arm64, check it with carlos ship --check, and ship it with carlos ship --rootfs. The guide has every step. |
diff --git a/examples/rails-shop/Rakefile b/examples/rails-shop/Rakefile| new file mode 100644 |
| index 000000000..9a5ea7383 |
| --- /dev/null |
| +++ b/examples/rails-shop/Rakefile |
| @@ -0,0 +1,6 @@ |
| +# Add your own tasks in files placed in lib/tasks ending in .rake, |
| +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. |
| + |
| +require_relative "config/application" |
| + |
| +Rails.application.load_tasks |
diff --git a/examples/rails-shop/app/assets/images/.keep b/examples/rails-shop/app/assets/images/.keep| new file mode 100644 |
| index 000000000..e69de29bb |
diff --git a/examples/rails-shop/app/assets/stylesheets/application.css b/examples/rails-shop/app/assets/stylesheets/application.css| new file mode 100644 |
| index 000000000..fe93333c0 |
| --- /dev/null |
| +++ b/examples/rails-shop/app/assets/stylesheets/application.css |
| @@ -0,0 +1,10 @@ |
| +/* |
| + * This is a manifest file that'll be compiled into application.css. |
| + * |
| + * With Propshaft, assets are served efficiently without preprocessing steps. You can still include |
| + * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard |
| + * cascading order, meaning styles declared later in the document or manifest will override earlier ones, |
| + * depending on specificity. |
| + * |
| + * Consider organizing styles into separate files for maintainability. |
| + */ |
diff --git a/examples/rails-shop/app/controllers/application_controller.rb b/examples/rails-shop/app/controllers/application_controller.rb| new file mode 100644 |
| index 000000000..0d95db22b |
| --- /dev/null |
| +++ b/examples/rails-shop/app/controllers/application_controller.rb |
| @@ -0,0 +1,4 @@ |
| +class ApplicationController < ActionController::Base |
| + # Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has. |
| + allow_browser versions: :modern |
| +end |
diff --git a/examples/rails-shop/app/controllers/concerns/.keep b/examples/rails-shop/app/controllers/concerns/.keep| new file mode 100644 |
| index 000000000..e69de29bb |
diff --git a/examples/rails-shop/app/controllers/crashes_controller.rb b/examples/rails-shop/app/controllers/crashes_controller.rb| new file mode 100644 |
| index 000000000..718b6b4cc |
| --- /dev/null |
| +++ b/examples/rails-shop/app/controllers/crashes_controller.rb |
| @@ -0,0 +1,25 @@ |
| +class CrashesController < ApplicationController |
| + # This endpoint authenticates by its X-Crash-Token header, not a session. |
| + skip_forgery_protection |
| + |
| + def create |
| + return head :not_found unless crash_token_matches? |
| + |
| + case params[:what] |
| + when "web" |
| + Process.kill("KILL", Process.pid) |
| + when "worker" |
| + CrashWorkerJob.perform_later |
| + head :accepted |
| + else |
| + head :not_found |
| + end |
| + end |
| + |
| + private |
| + |
| + def crash_token_matches? |
| + ENV["SHOP_CRASH_TOKEN"].present? && |
| + ActiveSupport::SecurityUtils.secure_compare(request.headers["X-Crash-Token"].to_s, ENV["SHOP_CRASH_TOKEN"]) |
| + end |
| +end |
diff --git a/examples/rails-shop/app/controllers/pages_controller.rb b/examples/rails-shop/app/controllers/pages_controller.rb| new file mode 100644 |
| index 000000000..e735e1020 |
| --- /dev/null |
| +++ b/examples/rails-shop/app/controllers/pages_controller.rb |
| @@ -0,0 +1,11 @@ |
| +class PagesController < ApplicationController |
| + def show |
| + @done = Ping.where.not(done_at: nil).count |
| + @total = Ping.count |
| + @heartbeats = Heartbeat.where(created_at: 1.hour.ago..).count |
| + @uploads = Upload.with_attached_file.order(:id) |
| + @cached_at = Rails.cache.fetch("cached_at", expires_in: 30.seconds) { Time.current } |
| + @tables = ActiveRecord::Base.connection.tables.sort |
| + @cable_messages = SolidCable::Message.count |
| + end |
| +end |
diff --git a/examples/rails-shop/app/controllers/pings_controller.rb b/examples/rails-shop/app/controllers/pings_controller.rb| new file mode 100644 |
| index 000000000..f5b702004 |
| --- /dev/null |
| +++ b/examples/rails-shop/app/controllers/pings_controller.rb |
| @@ -0,0 +1,6 @@ |
| +class PingsController < ApplicationController |
| + def create |
| + PingJob.perform_later(Ping.create!.id) |
| + redirect_to root_path |
| + end |
| +end |
diff --git a/examples/rails-shop/app/controllers/uploads_controller.rb b/examples/rails-shop/app/controllers/uploads_controller.rb| new file mode 100644 |
| index 000000000..256212ab4 |
| --- /dev/null |
| +++ b/examples/rails-shop/app/controllers/uploads_controller.rb |
| @@ -0,0 +1,10 @@ |
| +class UploadsController < ApplicationController |
| + def create |
| + Upload.create!(file: params.require(:file)) |
| + redirect_to root_path |
| + end |
| + |
| + def show |
| + redirect_to rails_blob_path(Upload.find(params[:id]).file) |
| + end |
| +end |
diff --git a/examples/rails-shop/app/helpers/application_helper.rb b/examples/rails-shop/app/helpers/application_helper.rb| new file mode 100644 |
| index 000000000..de6be7945 |
| --- /dev/null |
| +++ b/examples/rails-shop/app/helpers/application_helper.rb |
| @@ -0,0 +1,2 @@ |
| +module ApplicationHelper |
| +end |
diff --git a/examples/rails-shop/app/jobs/application_job.rb b/examples/rails-shop/app/jobs/application_job.rb| new file mode 100644 |
| index 000000000..d394c3d10 |
| --- /dev/null |
| +++ b/examples/rails-shop/app/jobs/application_job.rb |
| @@ -0,0 +1,7 @@ |
| +class ApplicationJob < ActiveJob::Base |
| + # Automatically retry jobs that encountered a deadlock |
| + # retry_on ActiveRecord::Deadlocked |
| + |
| + # Most jobs are safe to ignore if the underlying records are no longer available |
| + # discard_on ActiveJob::DeserializationError |
| +end |
diff --git a/examples/rails-shop/app/jobs/crash_worker_job.rb b/examples/rails-shop/app/jobs/crash_worker_job.rb| new file mode 100644 |
| index 000000000..f566d5fb2 |
| --- /dev/null |
| +++ b/examples/rails-shop/app/jobs/crash_worker_job.rb |
| @@ -0,0 +1,7 @@ |
| +class CrashWorkerJob < ApplicationJob |
| + # The job runs in a worker that bin/jobs forked, so its parent is the |
| + # process the platform started. |
| + def perform |
| + Process.kill("KILL", Process.ppid) |
| + end |
| +end |
diff --git a/examples/rails-shop/app/jobs/heartbeat_job.rb b/examples/rails-shop/app/jobs/heartbeat_job.rb| new file mode 100644 |
| index 000000000..963dbba7b |
| --- /dev/null |
| +++ b/examples/rails-shop/app/jobs/heartbeat_job.rb |
| @@ -0,0 +1,5 @@ |
| +class HeartbeatJob < ApplicationJob |
| + def perform |
| + Heartbeat.create! |
| + end |
| +end |
diff --git a/examples/rails-shop/app/jobs/ping_job.rb b/examples/rails-shop/app/jobs/ping_job.rb| new file mode 100644 |
| index 000000000..858ee9c57 |
| --- /dev/null |
| +++ b/examples/rails-shop/app/jobs/ping_job.rb |
| @@ -0,0 +1,6 @@ |
| +class PingJob < ApplicationJob |
| + def perform(id) |
| + Ping.find(id).update!(done_at: Time.current) |
| + ActionCable.server.broadcast("pings", { id: id }) |
| + end |
| +end |
diff --git a/examples/rails-shop/app/mailers/application_mailer.rb b/examples/rails-shop/app/mailers/application_mailer.rb| new file mode 100644 |
| index 000000000..3c34c8148 |
| --- /dev/null |
| +++ b/examples/rails-shop/app/mailers/application_mailer.rb |
| @@ -0,0 +1,4 @@ |
| +class ApplicationMailer < ActionMailer::Base |
| + default from: "from@example.com" |
| + layout "mailer" |
| +end |
diff --git a/examples/rails-shop/app/models/application_record.rb b/examples/rails-shop/app/models/application_record.rb| new file mode 100644 |
| index 000000000..b63caeb8a |
| --- /dev/null |
| +++ b/examples/rails-shop/app/models/application_record.rb |
| @@ -0,0 +1,3 @@ |
| +class ApplicationRecord < ActiveRecord::Base |
| + primary_abstract_class |
| +end |
diff --git a/examples/rails-shop/app/models/concerns/.keep b/examples/rails-shop/app/models/concerns/.keep| new file mode 100644 |
| index 000000000..e69de29bb |
diff --git a/examples/rails-shop/app/models/heartbeat.rb b/examples/rails-shop/app/models/heartbeat.rb| new file mode 100644 |
| index 000000000..dbabbde28 |
| --- /dev/null |
| +++ b/examples/rails-shop/app/models/heartbeat.rb |
| @@ -0,0 +1,2 @@ |
| +class Heartbeat < ApplicationRecord |
| +end |
diff --git a/examples/rails-shop/app/models/ping.rb b/examples/rails-shop/app/models/ping.rb| new file mode 100644 |
| index 000000000..033964144 |
| --- /dev/null |
| +++ b/examples/rails-shop/app/models/ping.rb |
| @@ -0,0 +1,2 @@ |
| +class Ping < ApplicationRecord |
| +end |
diff --git a/examples/rails-shop/app/models/upload.rb b/examples/rails-shop/app/models/upload.rb| new file mode 100644 |
| index 000000000..1392520fa |
| --- /dev/null |
| +++ b/examples/rails-shop/app/models/upload.rb |
| @@ -0,0 +1,3 @@ |
| +class Upload < ApplicationRecord |
| + has_one_attached :file |
| +end |
diff --git a/examples/rails-shop/app/views/layouts/application.html.erb b/examples/rails-shop/app/views/layouts/application.html.erb| new file mode 100644 |
| index 000000000..87cfcf5fb |
| --- /dev/null |
| +++ b/examples/rails-shop/app/views/layouts/application.html.erb |
| @@ -0,0 +1,28 @@ |
| +<!DOCTYPE html> |
| +<html> |
| + <head> |
| + <title><%= content_for(:title) || "shop" %></title> |
| + <meta name="viewport" content="width=device-width,initial-scale=1"> |
| + <meta name="apple-mobile-web-app-capable" content="yes"> |
| + <meta name="application-name" content="shop"> |
| + <meta name="mobile-web-app-capable" content="yes"> |
| + <%= csrf_meta_tags %> |
| + <%= csp_meta_tag %> |
| + |
| + <%= yield :head %> |
| + |
| + <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %> |
| + <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %> |
| + |
| + <link rel="icon" href="/icon.png" type="image/png"> |
| + <link rel="icon" href="/icon.svg" type="image/svg+xml"> |
| + <link rel="apple-touch-icon" href="/icon.png"> |
| + |
| + <%# Includes all stylesheet files in app/assets/stylesheets %> |
| + <%= stylesheet_link_tag :app %> |
| + </head> |
| + |
| + <body> |
| + <%= yield %> |
| + </body> |
| +</html> |
diff --git a/examples/rails-shop/app/views/layouts/mailer.html.erb b/examples/rails-shop/app/views/layouts/mailer.html.erb| new file mode 100644 |
| index 000000000..3aac9002e |
| --- /dev/null |
| +++ b/examples/rails-shop/app/views/layouts/mailer.html.erb |
| @@ -0,0 +1,13 @@ |
| +<!DOCTYPE html> |
| +<html> |
| + <head> |
| + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| + <style> |
| + /* Email styles need to be inline */ |
| + </style> |
| + </head> |
| + |
| + <body> |
| + <%= yield %> |
| + </body> |
| +</html> |
diff --git a/examples/rails-shop/app/views/layouts/mailer.text.erb b/examples/rails-shop/app/views/layouts/mailer.text.erb| new file mode 100644 |
| index 000000000..37f0bddbd |
| --- /dev/null |
| +++ b/examples/rails-shop/app/views/layouts/mailer.text.erb |
| @@ -0,0 +1 @@ |
| +<%= yield %> |
diff --git a/examples/rails-shop/app/views/pages/show.html.erb b/examples/rails-shop/app/views/pages/show.html.erb| new file mode 100644 |
| index 000000000..85757f500 |
| --- /dev/null |
| +++ b/examples/rails-shop/app/views/pages/show.html.erb |
| @@ -0,0 +1,19 @@ |
| +<h1>shop</h1> |
| + |
| +<p>Jobs done: <%= @done %> of <%= @total %></p> |
| +<p>Heartbeats in the last hour: <%= @heartbeats %></p> |
| +<p>This page was cached at <%= @cached_at %>.</p> |
| +<p>Tables in its database: <%= @tables.join(", ") %>. Cable messages: <%= @cable_messages %>.</p> |
| + |
| +<%= button_to "Enqueue a job", pings_path %> |
| + |
| +<%= form_with url: uploads_path, multipart: true do |form| %> |
| + <%= form.file_field :file %> |
| + <%= form.submit "Upload a file" %> |
| +<% end %> |
| + |
| +<ul> |
| + <% @uploads.each do |upload| %> |
| + <li><%= link_to upload.file.filename, upload_path(upload) %></li> |
| + <% end %> |
| +</ul> |
diff --git a/examples/rails-shop/app/views/pwa/manifest.json.erb b/examples/rails-shop/app/views/pwa/manifest.json.erb| new file mode 100644 |
| index 000000000..c30f8a15a |
| --- /dev/null |
| +++ b/examples/rails-shop/app/views/pwa/manifest.json.erb |
| @@ -0,0 +1,22 @@ |
| +{ |
| + "name": "RailsShop", |
| + "icons": [ |
| + { |
| + "src": "/icon.png", |
| + "type": "image/png", |
| + "sizes": "512x512" |
| + }, |
| + { |
| + "src": "/icon.png", |
| + "type": "image/png", |
| + "sizes": "512x512", |
| + "purpose": "maskable" |
| + } |
| + ], |
| + "start_url": "/", |
| + "display": "standalone", |
| + "scope": "/", |
| + "description": "RailsShop.", |
| + "theme_color": "red", |
| + "background_color": "red" |
| +} |
diff --git a/examples/rails-shop/app/views/pwa/service-worker.js b/examples/rails-shop/app/views/pwa/service-worker.js| new file mode 100644 |
| index 000000000..b3a13fb7b |
| --- /dev/null |
| +++ b/examples/rails-shop/app/views/pwa/service-worker.js |
| @@ -0,0 +1,26 @@ |
| +// Add a service worker for processing Web Push notifications: |
| +// |
| +// self.addEventListener("push", async (event) => { |
| +// const { title, options } = await event.data.json() |
| +// event.waitUntil(self.registration.showNotification(title, options)) |
| +// }) |
| +// |
| +// self.addEventListener("notificationclick", function(event) { |
| +// event.notification.close() |
| +// event.waitUntil( |
| +// clients.matchAll({ type: "window" }).then((clientList) => { |
| +// for (let i = 0; i < clientList.length; i++) { |
| +// let client = clientList[i] |
| +// let clientPath = (new URL(client.url)).pathname |
| +// |
| +// if (clientPath == event.notification.data.path && "focus" in client) { |
| +// return client.focus() |
| +// } |
| +// } |
| +// |
| +// if (clients.openWindow) { |
| +// return clients.openWindow(event.notification.data.path) |
| +// } |
| +// }) |
| +// ) |
| +// }) |
diff --git a/examples/rails-shop/bin/bundler-audit b/examples/rails-shop/bin/bundler-audit| new file mode 100755 |
| index 000000000..e2ef22690 |
| --- /dev/null |
| +++ b/examples/rails-shop/bin/bundler-audit |
| @@ -0,0 +1,6 @@ |
| +#!/usr/bin/env ruby |
| +require_relative "../config/boot" |
| +require "bundler/audit/cli" |
| + |
| +ARGV.concat %w[ --config config/bundler-audit.yml ] if ARGV.empty? || ARGV.include?("check") |
| +Bundler::Audit::CLI.start |
diff --git a/examples/rails-shop/bin/ci b/examples/rails-shop/bin/ci| new file mode 100755 |
| index 000000000..4137ad5bb |
| --- /dev/null |
| +++ b/examples/rails-shop/bin/ci |
| @@ -0,0 +1,6 @@ |
| +#!/usr/bin/env ruby |
| +require_relative "../config/boot" |
| +require "active_support/continuous_integration" |
| + |
| +CI = ActiveSupport::ContinuousIntegration |
| +require_relative "../config/ci.rb" |
diff --git a/examples/rails-shop/bin/dev b/examples/rails-shop/bin/dev| new file mode 100755 |
| index 000000000..5f91c2054 |
| --- /dev/null |
| +++ b/examples/rails-shop/bin/dev |
| @@ -0,0 +1,2 @@ |
| +#!/usr/bin/env ruby |
| +exec "./bin/rails", "server", *ARGV |
diff --git a/examples/rails-shop/bin/jobs b/examples/rails-shop/bin/jobs| new file mode 100755 |
| index 000000000..dcf59f309 |
| --- /dev/null |
| +++ b/examples/rails-shop/bin/jobs |
| @@ -0,0 +1,6 @@ |
| +#!/usr/bin/env ruby |
| + |
| +require_relative "../config/environment" |
| +require "solid_queue/cli" |
| + |
| +SolidQueue::Cli.start(ARGV) |
diff --git a/examples/rails-shop/bin/rails b/examples/rails-shop/bin/rails| new file mode 100755 |
| index 000000000..efc037749 |
| --- /dev/null |
| +++ b/examples/rails-shop/bin/rails |
| @@ -0,0 +1,4 @@ |
| +#!/usr/bin/env ruby |
| +APP_PATH = File.expand_path("../config/application", __dir__) |
| +require_relative "../config/boot" |
| +require "rails/commands" |
diff --git a/examples/rails-shop/bin/rake b/examples/rails-shop/bin/rake| new file mode 100755 |
| index 000000000..4fbf10b96 |
| --- /dev/null |
| +++ b/examples/rails-shop/bin/rake |
| @@ -0,0 +1,4 @@ |
| +#!/usr/bin/env ruby |
| +require_relative "../config/boot" |
| +require "rake" |
| +Rake.application.run |
diff --git a/examples/rails-shop/bin/setup b/examples/rails-shop/bin/setup| new file mode 100755 |
| index 000000000..81be011e8 |
| --- /dev/null |
| +++ b/examples/rails-shop/bin/setup |
| @@ -0,0 +1,35 @@ |
| +#!/usr/bin/env ruby |
| +require "fileutils" |
| + |
| +APP_ROOT = File.expand_path("..", __dir__) |
| + |
| +def system!(*args) |
| + system(*args, exception: true) |
| +end |
| + |
| +FileUtils.chdir APP_ROOT do |
| + # This script is a way to set up or update your development environment automatically. |
| + # This script is idempotent, so that you can run it at any time and get an expectable outcome. |
| + # Add necessary setup steps to this file. |
| + |
| + puts "== Installing dependencies ==" |
| + system("bundle check") || system!("bundle install") |
| + |
| + # puts "\n== Copying sample files ==" |
| + # unless File.exist?("config/database.yml") |
| + # FileUtils.cp "config/database.yml.sample", "config/database.yml" |
| + # end |
| + |
| + puts "\n== Preparing database ==" |
| + system! "bin/rails db:prepare" |
| + system! "bin/rails db:reset" if ARGV.include?("--reset") |
| + |
| + puts "\n== Removing old logs and tempfiles ==" |
| + system! "bin/rails log:clear tmp:clear" |
| + |
| + unless ARGV.include?("--skip-server") |
| + puts "\n== Starting development server ==" |
| + STDOUT.flush # flush the output before exec(2) so that it displays |
| + exec "bin/dev" |
| + end |
| +end |
diff --git a/examples/rails-shop/config.ru b/examples/rails-shop/config.ru| new file mode 100644 |
| index 000000000..4a3c09a68 |
| --- /dev/null |
| +++ b/examples/rails-shop/config.ru |
| @@ -0,0 +1,6 @@ |
| +# This file is used by Rack-based servers to start the application. |
| + |
| +require_relative "config/environment" |
| + |
| +run Rails.application |
| +Rails.application.load_server |
diff --git a/examples/rails-shop/config/application.rb b/examples/rails-shop/config/application.rb| new file mode 100644 |
| index 000000000..12e53e465 |
| --- /dev/null |
| +++ b/examples/rails-shop/config/application.rb |
| @@ -0,0 +1,42 @@ |
| +require_relative "boot" |
| + |
| +require "rails" |
| +# Pick the frameworks you want: |
| +require "active_model/railtie" |
| +require "active_job/railtie" |
| +require "active_record/railtie" |
| +require "active_storage/engine" |
| +require "action_controller/railtie" |
| +require "action_mailer/railtie" |
| +# require "action_mailbox/engine" |
| +# require "action_text/engine" |
| +require "action_view/railtie" |
| +require "action_cable/engine" |
| +# require "rails/test_unit/railtie" |
| + |
| +# Require the gems listed in Gemfile, including any gems |
| +# you've limited to :test, :development, or :production. |
| +Bundler.require(*Rails.groups) |
| + |
| +module RailsShop |
| + class Application < Rails::Application |
| + # Initialize configuration defaults for originally generated Rails version. |
| + config.load_defaults 8.1 |
| + |
| + # Please, add to the `ignore` list any other `lib` subdirectories that do |
| + # not contain `.rb` files, or that should not be reloaded or eager loaded. |
| + # Common ones are `templates`, `generators`, or `middleware`, for example. |
| + config.autoload_lib(ignore: %w[assets tasks]) |
| + |
| + # Configuration for the application, engines, and railties goes here. |
| + # |
| + # These settings can be overridden in specific environments using the files |
| + # in config/environments, which are processed later. |
| + # |
| + # config.time_zone = "Central Time (US & Canada)" |
| + # config.eager_load_paths << Rails.root.join("extras") |
| + |
| + # Don't generate system test files. |
| + config.generators.system_tests = nil |
| + end |
| +end |
diff --git a/examples/rails-shop/config/boot.rb b/examples/rails-shop/config/boot.rb| new file mode 100644 |
| index 000000000..988a5ddc4 |
| --- /dev/null |
| +++ b/examples/rails-shop/config/boot.rb |
| @@ -0,0 +1,4 @@ |
| +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) |
| + |
| +require "bundler/setup" # Set up gems listed in the Gemfile. |
| +require "bootsnap/setup" # Speed up boot time by caching expensive operations. |
diff --git a/examples/rails-shop/config/bundler-audit.yml b/examples/rails-shop/config/bundler-audit.yml| new file mode 100644 |
| index 000000000..e74b3af94 |
| --- /dev/null |
| +++ b/examples/rails-shop/config/bundler-audit.yml |
| @@ -0,0 +1,5 @@ |
| +# Audit all gems listed in the Gemfile for known security problems by running bin/bundler-audit. |
| +# CVEs that are not relevant to the application can be enumerated on the ignore list below. |
| + |
| +ignore: |
| + - CVE-THAT-DOES-NOT-APPLY |
diff --git a/examples/rails-shop/config/cable.yml b/examples/rails-shop/config/cable.yml| new file mode 100644 |
| index 000000000..8d483fcd7 |
| --- /dev/null |
| +++ b/examples/rails-shop/config/cable.yml |
| @@ -0,0 +1,16 @@ |
| +# Async adapter only works within the same process, so for manually triggering cable updates from a console, |
| +# and seeing results in the browser, you must do so from the web console (running inside the dev process), |
| +# not a terminal started via bin/rails console! Add "console" to any action or any ERB template view |
| +# to make the web console appear. |
| +development: |
| + adapter: async |
| + |
| +test: |
| + adapter: test |
| + |
| +production: |
| + adapter: solid_cable |
| + polling_interval: 0.1.seconds |
| + message_retention: 1.day |
| + writer_batch_size: 4 |
| + writer_batch_delay: 0.001.seconds |
diff --git a/examples/rails-shop/config/cache.yml b/examples/rails-shop/config/cache.yml| new file mode 100644 |
| index 000000000..ae55ceb3c |
| --- /dev/null |
| +++ b/examples/rails-shop/config/cache.yml |
| @@ -0,0 +1,15 @@ |
| +default: &default |
| + store_options: |
| + # Cap age of oldest cache entry to fulfill retention policies |
| + # max_age: <%= 60.days.to_i %> |
| + max_size: <%= 256.megabytes %> |
| + namespace: <%= Rails.env %> |
| + |
| +development: |
| + <<: *default |
| + |
| +test: |
| + <<: *default |
| + |
| +production: |
| + <<: *default |
diff --git a/examples/rails-shop/config/ci.rb b/examples/rails-shop/config/ci.rb| new file mode 100644 |
| index 000000000..d91a33eb2 |
| --- /dev/null |
| +++ b/examples/rails-shop/config/ci.rb |
| @@ -0,0 +1,16 @@ |
| +# Run using bin/ci |
| + |
| +CI.run do |
| + step "Setup", "bin/setup --skip-server" |
| + |
| + step "Security: Gem audit", "bin/bundler-audit" |
| + |
| + |
| + # Optional: set a green GitHub commit status to unblock PR merge. |
| + # Requires the `gh` CLI and `gh extension install basecamp/gh-signoff`. |
| + # if success? |
| + # step "Signoff: All systems go. Ready for merge and deploy.", "gh signoff" |
| + # else |
| + # failure "Signoff: CI failed. Do not merge or deploy.", "Fix the issues and try again." |
| + # end |
| +end |
diff --git a/examples/rails-shop/config/credentials.yml.enc b/examples/rails-shop/config/credentials.yml.enc| new file mode 100644 |
| index 000000000..8c81d6126 |
| --- /dev/null |
| +++ b/examples/rails-shop/config/credentials.yml.enc |
| @@ -0,0 +1 @@ |
| +qbuYxSCNc4nxmJQieVxBka9+QjGGObtTuPyZxU+9VtLRRj1hHouBFyQCHEZjdY+SqVAhziGBOZ4D1+qZnFb/pJar2Ap3qYpEn8fItS4O/4W+l8svhf26f+cWu4N7ZU9RlUcMGZsj/VfqGWPuRJfr5ZIQq82tilUGc6FbsBTLZUQDVRjo0GmacH6vMyrfaVZk3GsTk6+RtxuGaA4yAE65UI9tCHHrVjtCLqeynC2q3F7Xn7Fn/79S52A7m/+Y+Cu/+WR/ADPyKAPOigspMUoN20rD4gJXUVKaW+gx/wgGmhbWd7TyMXlmBcW+NHAetU3Khdq+CNUjhTmuVL9b4hm4jMRGUn6tTEcnBAcbyMziEvOKXnmGhfRz3f7M2Jds1XLJyvgrp1peNsqL3HAYECZ5HGVjXMmBQWuASqlbBjvz03HAc8n2Ns0u35boIQ8GdcwyKolA6vh+wzTKvfIt6WyZ8g3EdbDJN9lDet8u55F9GdjdsRQquDM0EfjO--dktZ1bZ9EbVJClgc--TGokZq3crwQV481Hw4UdFw== |
| \ No newline at end of file |
diff --git a/examples/rails-shop/config/database.yml b/examples/rails-shop/config/database.yml| new file mode 100644 |
| index 000000000..15b350e0f |
| --- /dev/null |
| +++ b/examples/rails-shop/config/database.yml |
| @@ -0,0 +1,32 @@ |
| +# SQLite. Versions 3.8.0 and up are supported. |
| +# gem install sqlite3 |
| +# |
| +# Ensure the SQLite 3 gem is defined in your Gemfile |
| +# gem "sqlite3" |
| +# |
| +default: &default |
| + adapter: sqlite3 |
| + max_connections: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> |
| + timeout: 5000 |
| + |
| +development: |
| + <<: *default |
| + database: storage/development.sqlite3 |
| + |
| +# Warning: The database defined as "test" will be erased and |
| +# re-generated from your development database when you run "rake". |
| +# Do not set this db to the same as development or production. |
| +test: |
| + <<: *default |
| + database: storage/test.sqlite3 |
| + |
| +# SQLite3 write its data on the local filesystem, as such it requires |
| +# persistent disks. If you are deploying to a managed service, you should |
| +# make sure it provides disk persistence, as many don't. |
| +# |
| +# Similarly, if you deploy your application as a Docker container, you must |
| +# ensure the database is located in a persisted volume. |
| +production: |
| + primary: |
| + <<: *default |
| + database: <%= ENV["CARLOS_DB"] %> |
diff --git a/examples/rails-shop/config/environment.rb b/examples/rails-shop/config/environment.rb| new file mode 100644 |
| index 000000000..cac531577 |
| --- /dev/null |
| +++ b/examples/rails-shop/config/environment.rb |
| @@ -0,0 +1,5 @@ |
| +# Load the Rails application. |
| +require_relative "application" |
| + |
| +# Initialize the Rails application. |
| +Rails.application.initialize! |
diff --git a/examples/rails-shop/config/environments/development.rb b/examples/rails-shop/config/environments/development.rb| new file mode 100644 |
| index 000000000..35a17d242 |
| --- /dev/null |
| +++ b/examples/rails-shop/config/environments/development.rb |
| @@ -0,0 +1,75 @@ |
| +require "active_support/core_ext/integer/time" |
| + |
| +Rails.application.configure do |
| + # Settings specified here will take precedence over those in config/application.rb. |
| + |
| + # Make code changes take effect immediately without server restart. |
| + config.enable_reloading = true |
| + |
| + # Do not eager load code on boot. |
| + config.eager_load = false |
| + |
| + # Show full error reports. |
| + config.consider_all_requests_local = true |
| + |
| + # Enable server timing. |
| + config.server_timing = true |
| + |
| + # Enable/disable Action Controller caching. By default Action Controller caching is disabled. |
| + # Run rails dev:cache to toggle Action Controller caching. |
| + if Rails.root.join("tmp/caching-dev.txt").exist? |
| + config.action_controller.perform_caching = true |
| + config.action_controller.enable_fragment_cache_logging = true |
| + config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" } |
| + else |
| + config.action_controller.perform_caching = false |
| + end |
| + |
| + # Change to :null_store to avoid any caching. |
| + config.cache_store = :memory_store |
| + |
| + # Store uploaded files on the local file system (see config/storage.yml for options). |
| + config.active_storage.service = :local |
| + |
| + # Don't care if the mailer can't send. |
| + config.action_mailer.raise_delivery_errors = false |
| + |
| + # Make template changes take effect immediately. |
| + config.action_mailer.perform_caching = false |
| + |
| + # Set localhost to be used by links generated in mailer templates. |
| + config.action_mailer.default_url_options = { host: "localhost", port: 3000 } |
| + |
| + # Print deprecation notices to the Rails logger. |
| + config.active_support.deprecation = :log |
| + |
| + # Raise an error on page load if there are pending migrations. |
| + config.active_record.migration_error = :page_load |
| + |
| + # Highlight code that triggered database queries in logs. |
| + config.active_record.verbose_query_logs = true |
| + |
| + # Append comments with runtime information tags to SQL queries in logs. |
| + config.active_record.query_log_tags_enabled = true |
| + |
| + # Highlight code that enqueued background job in logs. |
| + config.active_job.verbose_enqueue_logs = true |
| + |
| + # Highlight code that triggered redirect in logs. |
| + config.action_dispatch.verbose_redirect_logs = true |
| + |
| + # Suppress logger output for asset requests. |
| + config.assets.quiet = true |
| + |
| + # Raises error for missing translations. |
| + # config.i18n.raise_on_missing_translations = true |
| + |
| + # Annotate rendered view with file names. |
| + config.action_view.annotate_rendered_view_with_filenames = true |
| + |
| + # Uncomment if you wish to allow Action Cable access from any origin. |
| + # config.action_cable.disable_request_forgery_protection = true |
| + |
| + # Raise error when a before_action's only/except options reference missing actions. |
| + config.action_controller.raise_on_missing_callback_actions = true |
| +end |
diff --git a/examples/rails-shop/config/environments/production.rb b/examples/rails-shop/config/environments/production.rb| new file mode 100644 |
| index 000000000..4fa7d9f46 |
| --- /dev/null |
| +++ b/examples/rails-shop/config/environments/production.rb |
| @@ -0,0 +1,91 @@ |
| +require "active_support/core_ext/integer/time" |
| + |
| +Rails.application.configure do |
| + # Settings specified here will take precedence over those in config/application.rb. |
| + |
| + # Code is not reloaded between requests. |
| + config.enable_reloading = false |
| + |
| + # Eager load code on boot for better performance and memory savings (ignored by Rake tasks). |
| + config.eager_load = true |
| + |
| + # Full error reports are disabled. |
| + config.consider_all_requests_local = false |
| + |
| + # Turn on fragment caching in view templates. |
| + config.action_controller.perform_caching = true |
| + |
| + # Cache assets for far-future expiry since they are all digest stamped. |
| + config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" } |
| + |
| + # Enable serving of images, stylesheets, and JavaScripts from an asset server. |
| + # config.asset_host = "http://assets.example.com" |
| + |
| + # Store uploaded files on the local file system (see config/storage.yml for options). |
| + config.active_storage.service = :carlos |
| + |
| + # Assume all access to the app is happening through a SSL-terminating reverse proxy. |
| + config.assume_ssl = true |
| + |
| + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. |
| + config.force_ssl = true |
| + |
| + # Skip http-to-https redirect for the default health check endpoint. |
| + # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } } |
| + |
| + # Log to STDOUT with the current request id as a default log tag. |
| + config.log_tags = [ :request_id ] |
| + config.logger = ActiveSupport::TaggedLogging.logger(STDOUT) |
| + |
| + # Change to "debug" to log everything (including potentially personally-identifiable information!). |
| + config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") |
| + |
| + # Prevent health checks from clogging up the logs. |
| + config.silence_healthcheck_path = "/up" |
| + |
| + # Don't log any deprecations. |
| + config.active_support.report_deprecations = false |
| + |
| + # Replace the default in-process memory cache store with a durable alternative. |
| + config.cache_store = :solid_cache_store |
| + |
| + # Replace the default in-process and non-durable queuing backend for Active Job. |
| + config.active_job.queue_adapter = :solid_queue |
| + |
| + config.yjit = false |
| + |
| + # Ignore bad email addresses and do not raise email delivery errors. |
| + # Set this to true and configure the email server for immediate delivery to raise delivery errors. |
| + # config.action_mailer.raise_delivery_errors = false |
| + |
| + # Set host to be used by links generated in mailer templates. |
| + config.action_mailer.default_url_options = { host: "example.com" } |
| + |
| + # Specify outgoing SMTP server. Remember to add smtp/* credentials via bin/rails credentials:edit. |
| + # config.action_mailer.smtp_settings = { |
| + # user_name: Rails.application.credentials.dig(:smtp, :user_name), |
| + # password: Rails.application.credentials.dig(:smtp, :password), |
| + # address: "smtp.example.com", |
| + # port: 587, |
| + # authentication: :plain |
| + # } |
| + |
| + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to |
| + # the I18n.default_locale when a translation cannot be found). |
| + config.i18n.fallbacks = true |
| + |
| + # Do not dump schema after migrations. |
| + config.active_record.dump_schema_after_migration = false |
| + |
| + # Only use :id for inspections in production. |
| + config.active_record.attributes_for_inspect = [ :id ] |
| + |
| + # Enable DNS rebinding protection and other `Host` header attacks. |
| + # config.hosts = [ |
| + # "example.com", # Allow requests from example.com |
| + # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` |
| + # ] |
| + # |
| + # Skip DNS rebinding protection for the default health check endpoint. |
| + # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } |
| +end |
diff --git a/examples/rails-shop/config/environments/test.rb b/examples/rails-shop/config/environments/test.rb| new file mode 100644 |
| index 000000000..c2095b117 |
| --- /dev/null |
| +++ b/examples/rails-shop/config/environments/test.rb |
| @@ -0,0 +1,53 @@ |
| +# The test environment is used exclusively to run your application's |
| +# test suite. You never need to work with it otherwise. Remember that |
| +# your test database is "scratch space" for the test suite and is wiped |
| +# and recreated between test runs. Don't rely on the data there! |
| + |
| +Rails.application.configure do |
| + # Settings specified here will take precedence over those in config/application.rb. |
| + |
| + # While tests run files are not watched, reloading is not necessary. |
| + config.enable_reloading = false |
| + |
| + # Eager loading loads your entire application. When running a single test locally, |
| + # this is usually not necessary, and can slow down your test suite. However, it's |
| + # recommended that you enable it in continuous integration systems to ensure eager |
| + # loading is working properly before deploying your code. |
| + config.eager_load = ENV["CI"].present? |
| + |
| + # Configure public file server for tests with cache-control for performance. |
| + config.public_file_server.headers = { "cache-control" => "public, max-age=3600" } |
| + |
| + # Show full error reports. |
| + config.consider_all_requests_local = true |
| + config.cache_store = :null_store |
| + |
| + # Render exception templates for rescuable exceptions and raise for other exceptions. |
| + config.action_dispatch.show_exceptions = :rescuable |
| + |
| + # Disable request forgery protection in test environment. |
| + config.action_controller.allow_forgery_protection = false |
| + |
| + # Store uploaded files on the local file system in a temporary directory. |
| + config.active_storage.service = :test |
| + |
| + # Tell Action Mailer not to deliver emails to the real world. |
| + # The :test delivery method accumulates sent emails in the |
| + # ActionMailer::Base.deliveries array. |
| + config.action_mailer.delivery_method = :test |
| + |
| + # Set host to be used by links generated in mailer templates. |
| + config.action_mailer.default_url_options = { host: "example.com" } |
| + |
| + # Print deprecation notices to the stderr. |
| + config.active_support.deprecation = :stderr |
| + |
| + # Raises error for missing translations. |
| + # config.i18n.raise_on_missing_translations = true |
| + |
| + # Annotate rendered view with file names. |
| + # config.action_view.annotate_rendered_view_with_filenames = true |
| + |
| + # Raise error when a before_action's only/except options reference missing actions. |
| + config.action_controller.raise_on_missing_callback_actions = true |
| +end |
diff --git a/examples/rails-shop/config/initializers/assets.rb b/examples/rails-shop/config/initializers/assets.rb| new file mode 100644 |
| index 000000000..487324424 |
| --- /dev/null |
| +++ b/examples/rails-shop/config/initializers/assets.rb |
| @@ -0,0 +1,7 @@ |
| +# Be sure to restart your server when you modify this file. |
| + |
| +# Version of your assets, change this if you want to expire all your assets. |
| +Rails.application.config.assets.version = "1.0" |
| + |
| +# Add additional assets to the asset load path. |
| +# Rails.application.config.assets.paths << Emoji.images_path |
diff --git a/examples/rails-shop/config/initializers/content_security_policy.rb b/examples/rails-shop/config/initializers/content_security_policy.rb| new file mode 100644 |
| index 000000000..d51d71397 |
| --- /dev/null |
| +++ b/examples/rails-shop/config/initializers/content_security_policy.rb |
| @@ -0,0 +1,29 @@ |
| +# Be sure to restart your server when you modify this file. |
| + |
| +# Define an application-wide content security policy. |
| +# See the Securing Rails Applications Guide for more information: |
| +# https://guides.rubyonrails.org/security.html#content-security-policy-header |
| + |
| +# Rails.application.configure do |
| +# config.content_security_policy do |policy| |
| +# policy.default_src :self, :https |
| +# policy.font_src :self, :https, :data |
| +# policy.img_src :self, :https, :data |
| +# policy.object_src :none |
| +# policy.script_src :self, :https |
| +# policy.style_src :self, :https |
| +# # Specify URI for violation reports |
| +# # policy.report_uri "/csp-violation-report-endpoint" |
| +# end |
| +# |
| +# # Generate session nonces for permitted importmap, inline scripts, and inline styles. |
| +# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } |
| +# config.content_security_policy_nonce_directives = %w(script-src style-src) |
| +# |
| +# # Automatically add `nonce` to `javascript_tag`, `javascript_include_tag`, and `stylesheet_link_tag` |
| +# # if the corresponding directives are specified in `content_security_policy_nonce_directives`. |
| +# # config.content_security_policy_nonce_auto = true |
| +# |
| +# # Report violations without enforcing the policy. |
| +# # config.content_security_policy_report_only = true |
| +# end |
diff --git a/examples/rails-shop/config/initializers/filter_parameter_logging.rb b/examples/rails-shop/config/initializers/filter_parameter_logging.rb| new file mode 100644 |
| index 000000000..c0b717f7e |
| --- /dev/null |
| +++ b/examples/rails-shop/config/initializers/filter_parameter_logging.rb |
| @@ -0,0 +1,8 @@ |
| +# Be sure to restart your server when you modify this file. |
| + |
| +# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. |
| +# Use this to limit dissemination of sensitive information. |
| +# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. |
| +Rails.application.config.filter_parameters += [ |
| + :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :cvv, :cvc |
| +] |
diff --git a/examples/rails-shop/config/initializers/inflections.rb b/examples/rails-shop/config/initializers/inflections.rb| new file mode 100644 |
| index 000000000..3860f659e |
| --- /dev/null |
| +++ b/examples/rails-shop/config/initializers/inflections.rb |
| @@ -0,0 +1,16 @@ |
| +# Be sure to restart your server when you modify this file. |
| + |
| +# Add new inflection rules using the following format. Inflections |
| +# are locale specific, and you may define rules for as many different |
| +# locales as you wish. All of these examples are active by default: |
| +# ActiveSupport::Inflector.inflections(:en) do |inflect| |
| +# inflect.plural /^(ox)$/i, "\\1en" |
| +# inflect.singular /^(ox)en/i, "\\1" |
| +# inflect.irregular "person", "people" |
| +# inflect.uncountable %w( fish sheep ) |
| +# end |
| + |
| +# These inflection rules are supported but not enabled by default: |
| +# ActiveSupport::Inflector.inflections(:en) do |inflect| |
| +# inflect.acronym "RESTful" |
| +# end |
diff --git a/examples/rails-shop/config/locales/en.yml b/examples/rails-shop/config/locales/en.yml| new file mode 100644 |
| index 000000000..6c349ae5e |
| --- /dev/null |
| +++ b/examples/rails-shop/config/locales/en.yml |
| @@ -0,0 +1,31 @@ |
| +# Files in the config/locales directory are used for internationalization and |
| +# are automatically loaded by Rails. If you want to use locales other than |
| +# English, add the necessary files in this directory. |
| +# |
| +# To use the locales, use `I18n.t`: |
| +# |
| +# I18n.t "hello" |
| +# |
| +# In views, this is aliased to just `t`: |
| +# |
| +# <%= t("hello") %> |
| +# |
| +# To use a different locale, set it with `I18n.locale`: |
| +# |
| +# I18n.locale = :es |
| +# |
| +# This would use the information in config/locales/es.yml. |
| +# |
| +# To learn more about the API, please read the Rails Internationalization guide |
| +# at https://guides.rubyonrails.org/i18n.html. |
| +# |
| +# Be aware that YAML interprets the following case-insensitive strings as |
| +# booleans: `true`, `false`, `on`, `off`, `yes`, `no`. Therefore, these strings |
| +# must be quoted to be interpreted as strings. For example: |
| +# |
| +# en: |
| +# "yes": yup |
| +# enabled: "ON" |
| + |
| +en: |
| + hello: "Hello world" |
diff --git a/examples/rails-shop/config/puma.rb b/examples/rails-shop/config/puma.rb| new file mode 100644 |
| index 000000000..994f378c7 |
| --- /dev/null |
| +++ b/examples/rails-shop/config/puma.rb |
| @@ -0,0 +1,11 @@ |
| +# config/puma.rb |
| +threads_count = ENV.fetch("RAILS_MAX_THREADS", 3) |
| +threads threads_count, threads_count |
| + |
| +if ENV["CARLOS_SOCKET"] |
| + bind "unix://#{ENV["CARLOS_SOCKET"]}" |
| +else |
| + port ENV.fetch("PORT", 3000) |
| +end |
| + |
| +plugin :tmp_restart |
diff --git a/examples/rails-shop/config/queue.yml b/examples/rails-shop/config/queue.yml| new file mode 100644 |
| index 000000000..6b1436086 |
| --- /dev/null |
| +++ b/examples/rails-shop/config/queue.yml |
| @@ -0,0 +1,18 @@ |
| +default: &default |
| + dispatchers: |
| + - polling_interval: 1 |
| + batch_size: 500 |
| + workers: |
| + - queues: "*" |
| + threads: 3 |
| + processes: <%= ENV.fetch("JOB_CONCURRENCY", 1) %> |
| + polling_interval: 1 |
| + |
| +development: |
| + <<: *default |
| + |
| +test: |
| + <<: *default |
| + |
| +production: |
| + <<: *default |
diff --git a/examples/rails-shop/config/recurring.yml b/examples/rails-shop/config/recurring.yml| new file mode 100644 |
| index 000000000..037015516 |
| --- /dev/null |
| +++ b/examples/rails-shop/config/recurring.yml |
| @@ -0,0 +1,18 @@ |
| +# examples: |
| +# periodic_cleanup: |
| +# class: CleanSoftDeletedRecordsJob |
| +# queue: background |
| +# args: [ 1000, { batch_size: 500 } ] |
| +# schedule: every hour |
| +# periodic_cleanup_with_command: |
| +# command: "SoftDeletedRecord.due.delete_all" |
| +# priority: 2 |
| +# schedule: at 5am every day |
| + |
| +production: |
| + clear_solid_queue_finished_jobs: |
| + command: "SolidQueue::Job.clear_finished_in_batches(sleep_between_batches: 0.3)" |
| + schedule: every hour at minute 12 |
| + heartbeat: |
| + class: HeartbeatJob |
| + schedule: every minute |
diff --git a/examples/rails-shop/config/routes.rb b/examples/rails-shop/config/routes.rb| new file mode 100644 |
| index 000000000..949b967cb |
| --- /dev/null |
| +++ b/examples/rails-shop/config/routes.rb |
| @@ -0,0 +1,18 @@ |
| +Rails.application.routes.draw do |
| + # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html |
| + |
| + # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. |
| + # Can be used by load balancers and uptime monitors to verify that the app is live. |
| + get "up" => "rails/health#show", as: :rails_health_check |
| + |
| + # Render dynamic PWA files from app/views/pwa/* (remember to link manifest in application.html.erb) |
| + # get "manifest" => "rails/pwa#manifest", as: :pwa_manifest |
| + # get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker |
| + |
| + # Defines the root path route ("/") |
| + root "pages#show" |
| + |
| + resources :pings, only: :create |
| + resources :uploads, only: [:create, :show] |
| + post "crash/:what", to: "crashes#create" |
| +end |
diff --git a/examples/rails-shop/config/storage.yml b/examples/rails-shop/config/storage.yml| new file mode 100644 |
| index 000000000..108e733ec |
| --- /dev/null |
| +++ b/examples/rails-shop/config/storage.yml |
| @@ -0,0 +1,38 @@ |
| +test: |
| + service: Disk |
| + root: <%= Rails.root.join("tmp/storage") %> |
| + |
| +local: |
| + service: Disk |
| + root: <%= Rails.root.join("storage") %> |
| + |
| +carlos: |
| + service: S3 |
| + bucket: <%= ENV["CARLOS_STORE_BUCKET"] %> |
| + region: <%= ENV["CARLOS_STORE_REGION"] %> |
| + access_key_id: <%= ENV["CARLOS_STORE_ACCESS_KEY"] %> |
| + secret_access_key: <%= ENV["CARLOS_STORE_SECRET_KEY"] %> |
| +<% if ENV["CARLOS_STORE_ENDPOINT"].present? %> |
| + endpoint: <%= ENV["CARLOS_STORE_ENDPOINT"] %> |
| + force_path_style: true |
| +<% end %> |
| + |
| +# Use bin/rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key) |
| +# amazon: |
| +# service: S3 |
| +# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %> |
| +# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %> |
| +# region: us-east-1 |
| +# bucket: your_own_bucket-<%= Rails.env %> |
| + |
| +# Remember not to checkin your GCS keyfile to a repository |
| +# google: |
| +# service: GCS |
| +# project: your_project |
| +# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %> |
| +# bucket: your_own_bucket-<%= Rails.env %> |
| + |
| +# mirror: |
| +# service: Mirror |
| +# primary: local |
| +# mirrors: [ amazon, google, microsoft ] |
diff --git a/examples/rails-shop/db/migrate/20261024000001_create_solid_queue_tables.rb b/examples/rails-shop/db/migrate/20261024000001_create_solid_queue_tables.rb| new file mode 100644 |
| index 000000000..54037f584 |
| --- /dev/null |
| +++ b/examples/rails-shop/db/migrate/20261024000001_create_solid_queue_tables.rb |
| @@ -0,0 +1,162 @@ |
| +class CreateSolidQueueTables < ActiveRecord::Migration[8.1] |
| + def change |
| + create_table "solid_queue_blocked_executions", force: :cascade do |t| |
| + t.bigint "job_id", null: false |
| + t.string "queue_name", null: false |
| + t.integer "priority", default: 0, null: false |
| + t.string "concurrency_key", null: false |
| + t.datetime "expires_at", null: false |
| + t.datetime "created_at", null: false |
| + t.index [ "concurrency_key", "priority", "job_id" ], name: "index_solid_queue_blocked_executions_for_release" |
| + t.index [ "expires_at", "concurrency_key" ], name: "index_solid_queue_blocked_executions_for_maintenance" |
| + t.index [ "job_id" ], name: "index_solid_queue_blocked_executions_on_job_id", unique: true |
| + end |
| + |
| + create_table "solid_queue_claimed_executions", force: :cascade do |t| |
| + t.bigint "job_id", null: false |
| + t.bigint "process_id" |
| + t.datetime "created_at", null: false |
| + t.index [ "job_id" ], name: "index_solid_queue_claimed_executions_on_job_id", unique: true |
| + t.index [ "process_id", "job_id" ], name: "index_solid_queue_claimed_executions_on_process_id_and_job_id" |
| + end |
| + |
| + create_table "solid_queue_failed_executions", force: :cascade do |t| |
| + t.bigint "job_id", null: false |
| + t.text "error" |
| + t.datetime "created_at", null: false |
| + t.index [ "job_id" ], name: "index_solid_queue_failed_executions_on_job_id", unique: true |
| + end |
| + |
| + create_table "solid_queue_jobs", force: :cascade do |t| |
| + t.string "queue_name", null: false |
| + t.string "class_name", null: false |
| + t.text "arguments" |
| + t.integer "priority", default: 0, null: false |
| + t.string "active_job_id" |
| + t.datetime "scheduled_at" |
| + t.datetime "finished_at" |
| + t.string "concurrency_key" |
| + t.datetime "created_at", null: false |
| + t.datetime "updated_at", null: false |
| + t.bigint "batch_id" |
| + t.index [ "active_job_id" ], name: "index_solid_queue_jobs_on_active_job_id" |
| + t.index [ "batch_id" ], name: "index_solid_queue_jobs_on_batch_id" |
| + t.index [ "class_name" ], name: "index_solid_queue_jobs_on_class_name" |
| + t.index [ "finished_at" ], name: "index_solid_queue_jobs_on_finished_at" |
| + t.index [ "queue_name", "finished_at" ], name: "index_solid_queue_jobs_for_filtering" |
| + t.index [ "scheduled_at", "finished_at" ], name: "index_solid_queue_jobs_for_alerting" |
| + end |
| + |
| + create_table "solid_queue_pauses", force: :cascade do |t| |
| + t.string "queue_name", null: false |
| + t.datetime "created_at", null: false |
| + t.index [ "queue_name" ], name: "index_solid_queue_pauses_on_queue_name", unique: true |
| + end |
| + |
| + create_table "solid_queue_processes", force: :cascade do |t| |
| + t.string "kind", null: false |
| + t.datetime "last_heartbeat_at", null: false |
| + t.bigint "supervisor_id" |
| + t.integer "pid", null: false |
| + t.string "hostname" |
| + t.text "metadata" |
| + t.datetime "created_at", null: false |
| + t.string "name", null: false |
| + t.index [ "last_heartbeat_at" ], name: "index_solid_queue_processes_on_last_heartbeat_at" |
| + t.index [ "name", "supervisor_id" ], name: "index_solid_queue_processes_on_name_and_supervisor_id", unique: true |
| + t.index [ "supervisor_id" ], name: "index_solid_queue_processes_on_supervisor_id" |
| + end |
| + |
| + create_table "solid_queue_ready_executions", force: :cascade do |t| |
| + t.bigint "job_id", null: false |
| + t.string "queue_name", null: false |
| + t.integer "priority", default: 0, null: false |
| + t.datetime "created_at", null: false |
| + t.index [ "job_id" ], name: "index_solid_queue_ready_executions_on_job_id", unique: true |
| + t.index [ "priority", "job_id" ], name: "index_solid_queue_poll_all" |
| + t.index [ "queue_name", "priority", "job_id" ], name: "index_solid_queue_poll_by_queue" |
| + end |
| + |
| + create_table "solid_queue_recurring_executions", force: :cascade do |t| |
| + t.bigint "job_id", null: false |
| + t.string "task_key", null: false |
| + t.datetime "run_at", null: false |
| + t.datetime "created_at", null: false |
| + t.index [ "job_id" ], name: "index_solid_queue_recurring_executions_on_job_id", unique: true |
| + t.index [ "task_key", "run_at" ], name: "index_solid_queue_recurring_executions_on_task_key_and_run_at", unique: true |
| + end |
| + |
| + create_table "solid_queue_recurring_tasks", force: :cascade do |t| |
| + t.string "key", null: false |
| + t.string "schedule", null: false |
| + t.string "command", limit: 2048 |
| + t.string "class_name" |
| + t.text "arguments" |
| + t.string "queue_name" |
| + t.integer "priority", default: 0 |
| + t.boolean "static", default: true, null: false |
| + t.text "description" |
| + t.datetime "created_at", null: false |
| + t.datetime "updated_at", null: false |
| + t.index [ "key" ], name: "index_solid_queue_recurring_tasks_on_key", unique: true |
| + t.index [ "static" ], name: "index_solid_queue_recurring_tasks_on_static" |
| + end |
| + |
| + create_table "solid_queue_scheduled_executions", force: :cascade do |t| |
| + t.bigint "job_id", null: false |
| + t.string "queue_name", null: false |
| + t.integer "priority", default: 0, null: false |
| + t.datetime "scheduled_at", null: false |
| + t.datetime "created_at", null: false |
| + t.index [ "job_id" ], name: "index_solid_queue_scheduled_executions_on_job_id", unique: true |
| + t.index [ "scheduled_at", "priority", "job_id" ], name: "index_solid_queue_dispatch_all" |
| + end |
| + |
| + create_table "solid_queue_semaphores", force: :cascade do |t| |
| + t.string "key", null: false |
| + t.integer "value", default: 1, null: false |
| + t.datetime "expires_at", null: false |
| + t.datetime "created_at", null: false |
| + t.datetime "updated_at", null: false |
| + t.index [ "expires_at" ], name: "index_solid_queue_semaphores_on_expires_at" |
| + t.index [ "key", "value" ], name: "index_solid_queue_semaphores_on_key_and_value" |
| + t.index [ "key" ], name: "index_solid_queue_semaphores_on_key", unique: true |
| + end |
| + |
| + create_table "solid_queue_batches", force: :cascade do |t| |
| + t.string "active_job_batch_id" |
| + t.string "description" |
| + t.text "on_finish" |
| + t.text "on_success" |
| + t.text "on_failure" |
| + t.text "metadata" |
| + t.integer "total_jobs", default: 0, null: false |
| + t.integer "completed_jobs", default: 0, null: false |
| + t.integer "failed_jobs", default: 0, null: false |
| + t.datetime "enqueued_at" |
| + t.datetime "finished_at" |
| + t.datetime "failed_at" |
| + t.datetime "created_at", null: false |
| + t.datetime "updated_at", null: false |
| + t.index [ "active_job_batch_id" ], name: "index_solid_queue_batches_on_active_job_batch_id", unique: true |
| + t.index [ "finished_at" ], name: "index_solid_queue_batches_on_finished_at" |
| + end |
| + |
| + create_table "solid_queue_batch_executions", force: :cascade do |t| |
| + t.bigint "job_id", null: false |
| + t.bigint "batch_id", null: false |
| + t.datetime "created_at", null: false |
| + t.index [ "job_id" ], name: "index_solid_queue_batch_executions_on_job_id", unique: true |
| + t.index [ "batch_id" ], name: "index_solid_queue_batch_executions_on_batch_id" |
| + end |
| + |
| + add_foreign_key "solid_queue_batch_executions", "solid_queue_batches", column: "batch_id", on_delete: :cascade |
| + add_foreign_key "solid_queue_batch_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade |
| + add_foreign_key "solid_queue_blocked_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade |
| + add_foreign_key "solid_queue_claimed_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade |
| + add_foreign_key "solid_queue_failed_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade |
| + add_foreign_key "solid_queue_ready_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade |
| + add_foreign_key "solid_queue_recurring_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade |
| + add_foreign_key "solid_queue_scheduled_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade |
| + end |
| +end |
diff --git a/examples/rails-shop/db/migrate/20261024000002_create_solid_cache_tables.rb b/examples/rails-shop/db/migrate/20261024000002_create_solid_cache_tables.rb| new file mode 100644 |
| index 000000000..e936c6d3a |
| --- /dev/null |
| +++ b/examples/rails-shop/db/migrate/20261024000002_create_solid_cache_tables.rb |
| @@ -0,0 +1,14 @@ |
| +class CreateSolidCacheTables < ActiveRecord::Migration[8.1] |
| + def change |
| + create_table "solid_cache_entries", force: :cascade do |t| |
| + t.binary "key", limit: 1024, null: false |
| + t.binary "value", limit: 536870912, null: false |
| + t.datetime "created_at", null: false |
| + t.integer "key_hash", limit: 8, null: false |
| + t.integer "byte_size", limit: 4, null: false |
| + t.index ["byte_size"], name: "index_solid_cache_entries_on_byte_size" |
| + t.index ["key_hash", "byte_size"], name: "index_solid_cache_entries_on_key_hash_and_byte_size" |
| + t.index ["key_hash"], name: "index_solid_cache_entries_on_key_hash", unique: true |
| + end |
| + end |
| +end |
diff --git a/examples/rails-shop/db/migrate/20261024000003_create_solid_cable_tables.rb b/examples/rails-shop/db/migrate/20261024000003_create_solid_cable_tables.rb| new file mode 100644 |
| index 000000000..ebcc33075 |
| --- /dev/null |
| +++ b/examples/rails-shop/db/migrate/20261024000003_create_solid_cable_tables.rb |
| @@ -0,0 +1,12 @@ |
| +class CreateSolidCableTables < ActiveRecord::Migration[8.1] |
| + def change |
| + create_table "solid_cable_messages", force: :cascade do |t| |
| + t.binary "channel", limit: 1024, null: false |
| + t.binary "payload", limit: 536870912, null: false |
| + t.datetime "created_at", null: false |
| + t.integer "channel_hash", limit: 8, null: false |
| + t.index ["channel_hash"], name: "index_solid_cable_messages_on_channel_hash" |
| + t.index ["created_at"], name: "index_solid_cable_messages_on_created_at" |
| + end |
| + end |
| +end |
diff --git a/examples/rails-shop/db/migrate/20261024000004_create_active_storage_tables.active_storage.rb b/examples/rails-shop/db/migrate/20261024000004_create_active_storage_tables.active_storage.rb| new file mode 100644 |
| index 000000000..6bd8bd082 |
| --- /dev/null |
| +++ b/examples/rails-shop/db/migrate/20261024000004_create_active_storage_tables.active_storage.rb |
| @@ -0,0 +1,57 @@ |
| +# This migration comes from active_storage (originally 20170806125915) |
| +class CreateActiveStorageTables < ActiveRecord::Migration[7.0] |
| + def change |
| + # Use Active Record's configured type for primary and foreign keys |
| + primary_key_type, foreign_key_type = primary_and_foreign_key_types |
| + |
| + create_table :active_storage_blobs, id: primary_key_type do |t| |
| + t.string :key, null: false |
| + t.string :filename, null: false |
| + t.string :content_type |
| + t.text :metadata |
| + t.string :service_name, null: false |
| + t.bigint :byte_size, null: false |
| + t.string :checksum |
| + |
| + if connection.supports_datetime_with_precision? |
| + t.datetime :created_at, precision: 6, null: false |
| + else |
| + t.datetime :created_at, null: false |
| + end |
| + |
| + t.index [ :key ], unique: true |
| + end |
| + |
| + create_table :active_storage_attachments, id: primary_key_type do |t| |
| + t.string :name, null: false |
| + t.references :record, null: false, polymorphic: true, index: false, type: foreign_key_type |
| + t.references :blob, null: false, type: foreign_key_type |
| + |
| + if connection.supports_datetime_with_precision? |
| + t.datetime :created_at, precision: 6, null: false |
| + else |
| + t.datetime :created_at, null: false |
| + end |
| + |
| + t.index [ :record_type, :record_id, :name, :blob_id ], name: :index_active_storage_attachments_uniqueness, unique: true |
| + t.foreign_key :active_storage_blobs, column: :blob_id |
| + end |
| + |
| + create_table :active_storage_variant_records, id: primary_key_type do |t| |
| + t.belongs_to :blob, null: false, index: false, type: foreign_key_type |
| + t.string :variation_digest, null: false |
| + |
| + t.index [ :blob_id, :variation_digest ], name: :index_active_storage_variant_records_uniqueness, unique: true |
| + t.foreign_key :active_storage_blobs, column: :blob_id |
| + end |
| + end |
| + |
| + private |
| + def primary_and_foreign_key_types |
| + config = Rails.configuration.generators |
| + setting = config.options[config.orm][:primary_key_type] |
| + primary_key_type = setting || :primary_key |
| + foreign_key_type = setting || :bigint |
| + [ primary_key_type, foreign_key_type ] |
| + end |
| +end |
diff --git a/examples/rails-shop/db/migrate/20261024000005_create_pings.rb b/examples/rails-shop/db/migrate/20261024000005_create_pings.rb| new file mode 100644 |
| index 000000000..f696a9ecd |
| --- /dev/null |
| +++ b/examples/rails-shop/db/migrate/20261024000005_create_pings.rb |
| @@ -0,0 +1,9 @@ |
| +class CreatePings < ActiveRecord::Migration[8.1] |
| + def change |
| + create_table :pings do |t| |
| + t.datetime :done_at |
| + |
| + t.timestamps |
| + end |
| + end |
| +end |
diff --git a/examples/rails-shop/db/migrate/20261024000006_create_heartbeats.rb b/examples/rails-shop/db/migrate/20261024000006_create_heartbeats.rb| new file mode 100644 |
| index 000000000..6fd5df9bf |
| --- /dev/null |
| +++ b/examples/rails-shop/db/migrate/20261024000006_create_heartbeats.rb |
| @@ -0,0 +1,7 @@ |
| +class CreateHeartbeats < ActiveRecord::Migration[8.1] |
| + def change |
| + create_table :heartbeats do |t| |
| + t.timestamps |
| + end |
| + end |
| +end |
diff --git a/examples/rails-shop/db/migrate/20261024000007_create_uploads.rb b/examples/rails-shop/db/migrate/20261024000007_create_uploads.rb| new file mode 100644 |
| index 000000000..935b982f7 |
| --- /dev/null |
| +++ b/examples/rails-shop/db/migrate/20261024000007_create_uploads.rb |
| @@ -0,0 +1,7 @@ |
| +class CreateUploads < ActiveRecord::Migration[8.1] |
| + def change |
| + create_table :uploads do |t| |
| + t.timestamps |
| + end |
| + end |
| +end |
diff --git a/examples/rails-shop/db/schema.rb b/examples/rails-shop/db/schema.rb| new file mode 100644 |
| index 000000000..5dab864bc |
| --- /dev/null |
| +++ b/examples/rails-shop/db/schema.rb |
| @@ -0,0 +1,238 @@ |
| +# This file is auto-generated from the current state of the database. Instead |
| +# of editing this file, please use the migrations feature of Active Record to |
| +# incrementally modify your database, and then regenerate this schema definition. |
| +# |
| +# This file is the source Rails uses to define your schema when running `bin/rails |
| +# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to |
| +# be faster and is potentially less error prone than running all of your |
| +# migrations from scratch. Old migrations may fail to apply correctly if those |
| +# migrations use external dependencies or application code. |
| +# |
| +# It's strongly recommended that you check this file into your version control system. |
| + |
| +ActiveRecord::Schema[8.1].define(version: 2026_10_24_000007) do |
| + create_table "active_storage_attachments", force: :cascade do |t| |
| + t.string "name", null: false |
| + t.string "record_type", null: false |
| + t.bigint "record_id", null: false |
| + t.bigint "blob_id", null: false |
| + t.datetime "created_at", null: false |
| + t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" |
| + t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true |
| + end |
| + |
| + create_table "active_storage_blobs", force: :cascade do |t| |
| + t.string "key", null: false |
| + t.string "filename", null: false |
| + t.string "content_type" |
| + t.text "metadata" |
| + t.string "service_name", null: false |
| + t.bigint "byte_size", null: false |
| + t.string "checksum" |
| + t.datetime "created_at", null: false |
| + t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true |
| + end |
| + |
| + create_table "active_storage_variant_records", force: :cascade do |t| |
| + t.bigint "blob_id", null: false |
| + t.string "variation_digest", null: false |
| + t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true |
| + end |
| + |
| + create_table "heartbeats", force: :cascade do |t| |
| + t.datetime "created_at", null: false |
| + t.datetime "updated_at", null: false |
| + end |
| + |
| + create_table "pings", force: :cascade do |t| |
| + t.datetime "done_at" |
| + t.datetime "created_at", null: false |
| + t.datetime "updated_at", null: false |
| + end |
| + |
| + create_table "solid_cable_messages", force: :cascade do |t| |
| + t.binary "channel", limit: 1024, null: false |
| + t.binary "payload", limit: 536870912, null: false |
| + t.datetime "created_at", null: false |
| + t.integer "channel_hash", limit: 8, null: false |
| + t.index ["channel_hash"], name: "index_solid_cable_messages_on_channel_hash" |
| + t.index ["created_at"], name: "index_solid_cable_messages_on_created_at" |
| + end |
| + |
| + create_table "solid_cache_entries", force: :cascade do |t| |
| + t.binary "key", limit: 1024, null: false |
| + t.binary "value", limit: 536870912, null: false |
| + t.datetime "created_at", null: false |
| + t.integer "key_hash", limit: 8, null: false |
| + t.integer "byte_size", limit: 4, null: false |
| + t.index ["byte_size"], name: "index_solid_cache_entries_on_byte_size" |
| + t.index ["key_hash", "byte_size"], name: "index_solid_cache_entries_on_key_hash_and_byte_size" |
| + t.index ["key_hash"], name: "index_solid_cache_entries_on_key_hash", unique: true |
| + end |
| + |
| + create_table "solid_queue_batch_executions", force: :cascade do |t| |
| + t.bigint "job_id", null: false |
| + t.bigint "batch_id", null: false |
| + t.datetime "created_at", null: false |
| + t.index ["batch_id"], name: "index_solid_queue_batch_executions_on_batch_id" |
| + t.index ["job_id"], name: "index_solid_queue_batch_executions_on_job_id", unique: true |
| + end |
| + |
| + create_table "solid_queue_batches", force: :cascade do |t| |
| + t.string "active_job_batch_id" |
| + t.string "description" |
| + t.text "on_finish" |
| + t.text "on_success" |
| + t.text "on_failure" |
| + t.text "metadata" |
| + t.integer "total_jobs", default: 0, null: false |
| + t.integer "completed_jobs", default: 0, null: false |
| + t.integer "failed_jobs", default: 0, null: false |
| + t.datetime "enqueued_at" |
| + t.datetime "finished_at" |
| + t.datetime "failed_at" |
| + t.datetime "created_at", null: false |
| + t.datetime "updated_at", null: false |
| + t.index ["active_job_batch_id"], name: "index_solid_queue_batches_on_active_job_batch_id", unique: true |
| + t.index ["finished_at"], name: "index_solid_queue_batches_on_finished_at" |
| + end |
| + |
| + create_table "solid_queue_blocked_executions", force: :cascade do |t| |
| + t.bigint "job_id", null: false |
| + t.string "queue_name", null: false |
| + t.integer "priority", default: 0, null: false |
| + t.string "concurrency_key", null: false |
| + t.datetime "expires_at", null: false |
| + t.datetime "created_at", null: false |
| + t.index ["concurrency_key", "priority", "job_id"], name: "index_solid_queue_blocked_executions_for_release" |
| + t.index ["expires_at", "concurrency_key"], name: "index_solid_queue_blocked_executions_for_maintenance" |
| + t.index ["job_id"], name: "index_solid_queue_blocked_executions_on_job_id", unique: true |
| + end |
| + |
| + create_table "solid_queue_claimed_executions", force: :cascade do |t| |
| + t.bigint "job_id", null: false |
| + t.bigint "process_id" |
| + t.datetime "created_at", null: false |
| + t.index ["job_id"], name: "index_solid_queue_claimed_executions_on_job_id", unique: true |
| + t.index ["process_id", "job_id"], name: "index_solid_queue_claimed_executions_on_process_id_and_job_id" |
| + end |
| + |
| + create_table "solid_queue_failed_executions", force: :cascade do |t| |
| + t.bigint "job_id", null: false |
| + t.text "error" |
| + t.datetime "created_at", null: false |
| + t.index ["job_id"], name: "index_solid_queue_failed_executions_on_job_id", unique: true |
| + end |
| + |
| + create_table "solid_queue_jobs", force: :cascade do |t| |
| + t.string "queue_name", null: false |
| + t.string "class_name", null: false |
| + t.text "arguments" |
| + t.integer "priority", default: 0, null: false |
| + t.string "active_job_id" |
| + t.datetime "scheduled_at" |
| + t.datetime "finished_at" |
| + t.string "concurrency_key" |
| + t.datetime "created_at", null: false |
| + t.datetime "updated_at", null: false |
| + t.bigint "batch_id" |
| + t.index ["active_job_id"], name: "index_solid_queue_jobs_on_active_job_id" |
| + t.index ["batch_id"], name: "index_solid_queue_jobs_on_batch_id" |
| + t.index ["class_name"], name: "index_solid_queue_jobs_on_class_name" |
| + t.index ["finished_at"], name: "index_solid_queue_jobs_on_finished_at" |
| + t.index ["queue_name", "finished_at"], name: "index_solid_queue_jobs_for_filtering" |
| + t.index ["scheduled_at", "finished_at"], name: "index_solid_queue_jobs_for_alerting" |
| + end |
| + |
| + create_table "solid_queue_pauses", force: :cascade do |t| |
| + t.string "queue_name", null: false |
| + t.datetime "created_at", null: false |
| + t.index ["queue_name"], name: "index_solid_queue_pauses_on_queue_name", unique: true |
| + end |
| + |
| + create_table "solid_queue_processes", force: :cascade do |t| |
| + t.string "kind", null: false |
| + t.datetime "last_heartbeat_at", null: false |
| + t.bigint "supervisor_id" |
| + t.integer "pid", null: false |
| + t.string "hostname" |
| + t.text "metadata" |
| + t.datetime "created_at", null: false |
| + t.string "name", null: false |
| + t.index ["last_heartbeat_at"], name: "index_solid_queue_processes_on_last_heartbeat_at" |
| + t.index ["name", "supervisor_id"], name: "index_solid_queue_processes_on_name_and_supervisor_id", unique: true |
| + t.index ["supervisor_id"], name: "index_solid_queue_processes_on_supervisor_id" |
| + end |
| + |
| + create_table "solid_queue_ready_executions", force: :cascade do |t| |
| + t.bigint "job_id", null: false |
| + t.string "queue_name", null: false |
| + t.integer "priority", default: 0, null: false |
| + t.datetime "created_at", null: false |
| + t.index ["job_id"], name: "index_solid_queue_ready_executions_on_job_id", unique: true |
| + t.index ["priority", "job_id"], name: "index_solid_queue_poll_all" |
| + t.index ["queue_name", "priority", "job_id"], name: "index_solid_queue_poll_by_queue" |
| + end |
| + |
| + create_table "solid_queue_recurring_executions", force: :cascade do |t| |
| + t.bigint "job_id", null: false |
| + t.string "task_key", null: false |
| + t.datetime "run_at", null: false |
| + t.datetime "created_at", null: false |
| + t.index ["job_id"], name: "index_solid_queue_recurring_executions_on_job_id", unique: true |
| + t.index ["task_key", "run_at"], name: "index_solid_queue_recurring_executions_on_task_key_and_run_at", unique: true |
| + end |
| + |
| + create_table "solid_queue_recurring_tasks", force: :cascade do |t| |
| + t.string "key", null: false |
| + t.string "schedule", null: false |
| + t.string "command", limit: 2048 |
| + t.string "class_name" |
| + t.text "arguments" |
| + t.string "queue_name" |
| + t.integer "priority", default: 0 |
| + t.boolean "static", default: true, null: false |
| + t.text "description" |
| + t.datetime "created_at", null: false |
| + t.datetime "updated_at", null: false |
| + t.index ["key"], name: "index_solid_queue_recurring_tasks_on_key", unique: true |
| + t.index ["static"], name: "index_solid_queue_recurring_tasks_on_static" |
| + end |
| + |
| + create_table "solid_queue_scheduled_executions", force: :cascade do |t| |
| + t.bigint "job_id", null: false |
| + t.string "queue_name", null: false |
| + t.integer "priority", default: 0, null: false |
| + t.datetime "scheduled_at", null: false |
| + t.datetime "created_at", null: false |
| + t.index ["job_id"], name: "index_solid_queue_scheduled_executions_on_job_id", unique: true |
| + t.index ["scheduled_at", "priority", "job_id"], name: "index_solid_queue_dispatch_all" |
| + end |
| + |
| + create_table "solid_queue_semaphores", force: :cascade do |t| |
| + t.string "key", null: false |
| + t.integer "value", default: 1, null: false |
| + t.datetime "expires_at", null: false |
| + t.datetime "created_at", null: false |
| + t.datetime "updated_at", null: false |
| + t.index ["expires_at"], name: "index_solid_queue_semaphores_on_expires_at" |
| + t.index ["key", "value"], name: "index_solid_queue_semaphores_on_key_and_value" |
| + t.index ["key"], name: "index_solid_queue_semaphores_on_key", unique: true |
| + end |
| + |
| + create_table "uploads", force: :cascade do |t| |
| + t.datetime "created_at", null: false |
| + t.datetime "updated_at", null: false |
| + end |
| + |
| + add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" |
| + add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" |
| + add_foreign_key "solid_queue_batch_executions", "solid_queue_batches", column: "batch_id", on_delete: :cascade |
| + add_foreign_key "solid_queue_batch_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade |
| + add_foreign_key "solid_queue_blocked_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade |
| + add_foreign_key "solid_queue_claimed_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade |
| + add_foreign_key "solid_queue_failed_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade |
| + add_foreign_key "solid_queue_ready_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade |
| + add_foreign_key "solid_queue_recurring_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade |
| + add_foreign_key "solid_queue_scheduled_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade |
| +end |
diff --git a/examples/rails-shop/db/seeds.rb b/examples/rails-shop/db/seeds.rb| new file mode 100644 |
| index 000000000..4fbd6ed97 |
| --- /dev/null |
| +++ b/examples/rails-shop/db/seeds.rb |
| @@ -0,0 +1,9 @@ |
| +# This file should ensure the existence of records required to run the application in every environment (production, |
| +# development, test). The code here should be idempotent so that it can be executed at any point in every environment. |
| +# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). |
| +# |
| +# Example: |
| +# |
| +# ["Action", "Comedy", "Drama", "Horror"].each do |genre_name| |
| +# MovieGenre.find_or_create_by!(name: genre_name) |
| +# end |
diff --git a/examples/rails-shop/lib/tasks/.keep b/examples/rails-shop/lib/tasks/.keep| new file mode 100644 |
| index 000000000..e69de29bb |
diff --git a/examples/rails-shop/log/.keep b/examples/rails-shop/log/.keep| new file mode 100644 |
| index 000000000..e69de29bb |
diff --git a/examples/rails-shop/processes.json b/examples/rails-shop/processes.json| new file mode 100644 |
| index 000000000..a6dd458e1 |
| --- /dev/null |
| +++ b/examples/rails-shop/processes.json |
| @@ -0,0 +1,6 @@ |
| +{ |
| + "web": {"command": ["bundle", "exec", "puma", "-C", "config/puma.rb"], "working_dir": "/rails"}, |
| + "worker": {"command": ["/rails/bin/jobs"], "working_dir": "/rails"}, |
| + "release": {"command": ["/rails/bin/rails", "db:migrate"], "working_dir": "/rails"}, |
| + "console": {"command": ["/rails/bin/rails", "console"], "working_dir": "/rails"} |
| +} |
diff --git a/examples/rails-shop/public/400.html b/examples/rails-shop/public/400.html| new file mode 100644 |
| index 000000000..640de0339 |
| --- /dev/null |
| +++ b/examples/rails-shop/public/400.html |
| @@ -0,0 +1,135 @@ |
| +<!doctype html> |
| + |
| +<html lang="en"> |
| + |
| + <head> |
| + |
| + <title>The server cannot process the request due to a client error (400 Bad Request)</title> |
| + |
| + <meta charset="utf-8"> |
| + <meta name="viewport" content="initial-scale=1, width=device-width"> |
| + <meta name="robots" content="noindex, nofollow"> |
| + |
| + <style> |
| + |
| + *, *::before, *::after { |
| + box-sizing: border-box; |
| + } |
| + |
| + * { |
| + margin: 0; |
| + } |
| + |
| + html { |
| + font-size: 16px; |
| + } |
| + |
| + body { |
| + background: #FFF; |
| + color: #261B23; |
| + display: grid; |
| + font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Aptos, Roboto, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; |
| + font-size: clamp(1rem, 2.5vw, 2rem); |
| + -webkit-font-smoothing: antialiased; |
| + font-style: normal; |
| + font-weight: 400; |
| + letter-spacing: -0.0025em; |
| + line-height: 1.4; |
| + min-height: 100dvh; |
| + place-items: center; |
| + text-rendering: optimizeLegibility; |
| + -webkit-text-size-adjust: 100%; |
| + } |
| + |
| + #error-description { |
| + fill: #d30001; |
| + } |
| + |
| + #error-id { |
| + fill: #f0eff0; |
| + } |
| + |
| + @media (prefers-color-scheme: dark) { |
| + body { |
| + background: #101010; |
| + color: #e0e0e0; |
| + } |
| + |
| + #error-description { |
| + fill: #FF6161; |
| + } |
| + |
| + #error-id { |
| + fill: #2c2c2c; |
| + } |
| + } |
| + |
| + a { |
| + color: inherit; |
| + font-weight: 700; |
| + text-decoration: underline; |
| + text-underline-offset: 0.0925em; |
| + } |
| + |
| + b, strong { |
| + font-weight: 700; |
| + } |
| + |
| + i, em { |
| + font-style: italic; |
| + } |
| + |
| + main { |
| + display: grid; |
| + gap: 1em; |
| + padding: 2em; |
| + place-items: center; |
| + text-align: center; |
| + } |
| + |
| + main header { |
| + width: min(100%, 12em); |
| + } |
| + |
| + main header svg { |
| + height: auto; |
| + max-width: 100%; |
| + width: 100%; |
| + } |
| + |
| + main article { |
| + width: min(100%, 30em); |
| + } |
| + |
| + main article p { |
| + font-size: 75%; |
| + } |
| + |
| + main article br { |
| + display: none; |
| + |
| + @media(min-width: 48em) { |
| + display: inline; |
| + } |
| + } |
| + |
| + </style> |
| + |
| + </head> |
| + |
| + <body> |
| + |
| + <!-- This file lives in public/400.html --> |
| + |
| + <main> |
| + <header> |
| + <svg height="172" viewBox="0 0 480 172" width="480" xmlns="http://www.w3.org/2000/svg"><path d="m124.48 3.00509-45.6889 100.02991h26.2239v-28.1168h38.119v28.1168h21.628v35.145h-21.628v30.82h-37.308v-30.82h-72.1833v-31.901l50.2851-103.27391zm115.583 168.69891c-40.822 0-64.884-35.146-64.884-85.7015 0-50.5554 24.062-85.700907 64.884-85.700907 40.823 0 64.884 35.145507 64.884 85.700907 0 50.5555-24.061 85.7015-64.884 85.7015zm0-133.2831c-17.572 0-22.709 21.8984-22.709 47.5816 0 25.6835 5.137 47.5815 22.709 47.5815 17.303 0 22.71-21.898 22.71-47.5815 0-25.6832-5.407-47.5816-22.71-47.5816zm140.456 133.2831c-40.823 0-64.884-35.146-64.884-85.7015 0-50.5554 24.061-85.700907 64.884-85.700907 40.822 0 64.884 35.145507 64.884 85.700907 0 50.5555-24.062 85.7015-64.884 85.7015zm0-133.2831c-17.573 0-22.71 21.8984-22.71 47.5816 0 25.6835 5.137 47.5815 22.71 47.5815 17.302 0 22.709-21.898 22.709-47.5815 0-25.6832-5.407-47.5816-22.709-47.5816z" id="error-id"/><path d="m123.606 85.4445c3.212 1.0523 5.538 4.2089 5.538 8.0301 0 6.1472-4.209 9.5254-11.298 9.5254h-15.617v-34.0033h14.565c7.089 0 11.353 3.1566 11.353 9.2484 0 3.6551-2.049 6.3134-4.541 7.1994zm-12.904-2.9905h5.095c2.603 0 3.988-.9968 3.988-3.1013 0-2.1044-1.385-3.0459-3.988-3.0459h-5.095zm0 6.6456v6.5902h5.981c2.492 0 3.877-1.3291 3.877-3.2674 0-2.049-1.385-3.3228-3.877-3.3228zm43.786 13.9004h-8.362v-1.274c-.831.831-3.323 1.717-5.981 1.717-4.929 0-9.083-2.769-9.083-8.0301 0-4.818 4.154-7.9193 9.581-7.9193 2.049 0 4.486.6646 5.483 1.3845v-1.606c0-1.606-.942-2.9905-3.046-2.9905-1.606 0-2.548.7199-2.935 1.8275h-8.197c.72-4.8181 4.985-8.6393 11.409-8.6393 7.088 0 11.131 3.7659 11.131 10.2453zm-8.362-6.9779v-1.4399c-.554-1.0522-2.049-1.7167-3.655-1.7167-1.717 0-3.434.7199-3.434 2.3813 0 1.7168 1.717 2.4367 3.434 2.4367 1.606 0 3.101-.6645 3.655-1.6614zm27.996 6.9779v-1.994c-1.163 1.329-3.599 2.548-6.147 2.548-7.199 0-11.131-5.8151-11.131-13.0145s3.932-13.0143 11.131-13.0143c2.548 0 4.984 1.2184 6.147 2.5475v-13.0697h8.695v35.997zm0-9.1931v-6.5902c-.664-1.3291-2.159-2.326-3.821-2.326-2.99 0-4.763 2.4368-4.763 5.6488s1.773 5.5934 4.763 5.5934c1.717 0 3.157-.9415 3.821-2.326zm35.471-2.049h-3.101v11.2421h-8.806v-34.0033h15.285c7.31 0 12.35 4.1535 12.35 11.5744 0 5.1503-2.603 8.6947-6.757 10.2453l7.975 12.1836h-9.858zm-3.101-15.2849v8.1962h5.538c3.156 0 4.596-1.606 4.596-4.0981s-1.44-4.0981-4.596-4.0981zm36.957 17.8323h8.03c-.886 5.7597-5.206 9.2487-11.685 9.2487-7.643 0-12.682-5.2613-12.682-13.0145 0-7.6978 5.316-13.0143 12.515-13.0143 7.643 0 11.962 5.095 11.962 12.5159v2.1598h-16.115c.277 2.9905 1.827 4.5965 4.32 4.5965 1.772 0 3.156-.7753 3.655-2.4921zm-3.822-10.0237c-2.049 0-3.433 1.2737-3.987 3.5997h7.532c-.111-2.0491-1.385-3.5997-3.545-3.5997zm30.98 27.5234v-10.799c-1.163 1.329-3.6 2.548-6.147 2.548-7.2 0-11.132-5.9259-11.132-13.0145 0-7.144 3.932-13.0143 11.132-13.0143 2.547 0 4.984 1.2184 6.147 2.5475v-1.9937h8.695v33.726zm0-17.9981v-6.5902c-.665-1.3291-2.105-2.326-3.821-2.326-2.991 0-4.763 2.4368-4.763 5.6488s1.772 5.5934 4.763 5.5934c1.661 0 3.156-.9415 3.821-2.326zm36.789-15.7279v24.921h-8.695v-2.16c-1.329 1.551-3.821 2.714-6.646 2.714-5.482 0-8.75-3.5999-8.75-9.1379v-16.3371h8.64v14.288c0 2.1045.996 3.5997 3.212 3.5997 1.606 0 3.101-1.0522 3.544-2.769v-15.1187zm19.084 16.2263h8.03c-.886 5.7597-5.206 9.2487-11.685 9.2487-7.643 0-12.682-5.2613-12.682-13.0145 0-7.6978 5.316-13.0143 12.515-13.0143 7.643 0 11.963 5.095 11.963 12.5159v2.1598h-16.116c.277 2.9905 1.828 4.5965 4.32 4.5965 1.772 0 3.156-.7753 3.655-2.4921zm-3.822-10.0237c-2.049 0-3.433 1.2737-3.987 3.5997h7.532c-.111-2.0491-1.385-3.5997-3.545-3.5997zm13.428 11.0206h8.474c.387 1.3845 1.606 2.1598 3.156 2.1598 1.44 0 2.548-.5538 2.548-1.7168 0-.9414-.72-1.2737-1.939-1.5506l-4.873-.9969c-4.154-.886-6.867-2.8797-6.867-7.2547 0-5.3165 4.762-8.4178 10.633-8.4178 6.812 0 10.522 3.1567 11.297 8.0855h-8.03c-.277-1.0522-1.052-1.9937-3.046-1.9937-1.273 0-2.326.5538-2.326 1.6614 0 .7753.554 1.163 1.717 1.3845l4.929 1.163c4.541 1.0522 6.978 3.4335 6.978 7.4763 0 5.3168-4.818 8.2518-10.91 8.2518-6.369 0-10.965-2.88-11.741-8.2518zm27.538-.8861v-9.5807h-3.655v-6.7564h3.655v-6.8671h8.584v6.8671h5.205v6.7564h-5.205v8.307c0 1.9383.941 2.769 2.658 2.769.941 0 1.993-.2216 2.769-.5538v7.3654c-.997.443-2.88.775-4.818.775-5.871 0-9.193-2.769-9.193-9.0819z" id="error-description"/></svg> |
| + </header> |
| + <article> |
| + <p><strong>The server cannot process the request due to a client error.</strong> Please check the request and try again. If you're the application owner check the logs for more information.</p> |
| + </article> |
| + </main> |
| + |
| + </body> |
| + |
| +</html> |
diff --git a/examples/rails-shop/public/404.html b/examples/rails-shop/public/404.html| new file mode 100644 |
| index 000000000..d7f0f1422 |
| --- /dev/null |
| +++ b/examples/rails-shop/public/404.html |
| @@ -0,0 +1,135 @@ |
| +<!doctype html> |
| + |
| +<html lang="en"> |
| + |
| + <head> |
| + |
| + <title>The page you were looking for doesn't exist (404 Not found)</title> |
| + |
| + <meta charset="utf-8"> |
| + <meta name="viewport" content="initial-scale=1, width=device-width"> |
| + <meta name="robots" content="noindex, nofollow"> |
| + |
| + <style> |
| + |
| + *, *::before, *::after { |
| + box-sizing: border-box; |
| + } |
| + |
| + * { |
| + margin: 0; |
| + } |
| + |
| + html { |
| + font-size: 16px; |
| + } |
| + |
| + body { |
| + background: #FFF; |
| + color: #261B23; |
| + display: grid; |
| + font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Aptos, Roboto, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; |
| + font-size: clamp(1rem, 2.5vw, 2rem); |
| + -webkit-font-smoothing: antialiased; |
| + font-style: normal; |
| + font-weight: 400; |
| + letter-spacing: -0.0025em; |
| + line-height: 1.4; |
| + min-height: 100dvh; |
| + place-items: center; |
| + text-rendering: optimizeLegibility; |
| + -webkit-text-size-adjust: 100%; |
| + } |
| + |
| + #error-description { |
| + fill: #d30001; |
| + } |
| + |
| + #error-id { |
| + fill: #f0eff0; |
| + } |
| + |
| + @media (prefers-color-scheme: dark) { |
| + body { |
| + background: #101010; |
| + color: #e0e0e0; |
| + } |
| + |
| + #error-description { |
| + fill: #FF6161; |
| + } |
| + |
| + #error-id { |
| + fill: #2c2c2c; |
| + } |
| + } |
| + |
| + a { |
| + color: inherit; |
| + font-weight: 700; |
| + text-decoration: underline; |
| + text-underline-offset: 0.0925em; |
| + } |
| + |
| + b, strong { |
| + font-weight: 700; |
| + } |
| + |
| + i, em { |
| + font-style: italic; |
| + } |
| + |
| + main { |
| + display: grid; |
| + gap: 1em; |
| + padding: 2em; |
| + place-items: center; |
| + text-align: center; |
| + } |
| + |
| + main header { |
| + width: min(100%, 12em); |
| + } |
| + |
| + main header svg { |
| + height: auto; |
| + max-width: 100%; |
| + width: 100%; |
| + } |
| + |
| + main article { |
| + width: min(100%, 30em); |
| + } |
| + |
| + main article p { |
| + font-size: 75%; |
| + } |
| + |
| + main article br { |
| + display: none; |
| + |
| + @media(min-width: 48em) { |
| + display: inline; |
| + } |
| + } |
| + |
| + </style> |
| + |
| + </head> |
| + |
| + <body> |
| + |
| + <!-- This file lives in public/404.html --> |
| + |
| + <main> |
| + <header> |
| + <svg height="172" viewBox="0 0 480 172" width="480" xmlns="http://www.w3.org/2000/svg"><path d="m124.48 3.00509-45.6889 100.02991h26.2239v-28.1168h38.119v28.1168h21.628v35.145h-21.628v30.82h-37.308v-30.82h-72.1833v-31.901l50.2851-103.27391zm115.583 168.69891c-40.822 0-64.884-35.146-64.884-85.7015 0-50.5554 24.062-85.700907 64.884-85.700907 40.823 0 64.884 35.145507 64.884 85.700907 0 50.5555-24.061 85.7015-64.884 85.7015zm0-133.2831c-17.572 0-22.709 21.8984-22.709 47.5816 0 25.6835 5.137 47.5815 22.709 47.5815 17.303 0 22.71-21.898 22.71-47.5815 0-25.6832-5.407-47.5816-22.71-47.5816zm165.328-35.41581-45.689 100.02991h26.224v-28.1168h38.119v28.1168h21.628v35.145h-21.628v30.82h-37.308v-30.82h-72.184v-31.901l50.285-103.27391z" id="error-id"/><path d="m157.758 68.9967v34.0033h-7.199l-14.233-19.8814v19.8814h-8.584v-34.0033h8.307l13.125 18.7184v-18.7184zm28.454 21.5428c0 7.6978-5.15 13.0145-12.737 13.0145-7.532 0-12.738-5.3167-12.738-13.0145s5.206-13.0143 12.738-13.0143c7.587 0 12.737 5.3165 12.737 13.0143zm-8.528 0c0-3.4336-1.496-5.8703-4.209-5.8703-2.659 0-4.154 2.4367-4.154 5.8703s1.495 5.8149 4.154 5.8149c2.713 0 4.209-2.3813 4.209-5.8149zm13.184 3.8766v-9.5807h-3.655v-6.7564h3.655v-6.8671h8.584v6.8671h5.205v6.7564h-5.205v8.307c0 1.9383.941 2.769 2.658 2.769.941 0 1.994-.2216 2.769-.5538v7.3654c-.997.443-2.88.775-4.818.775-5.87 0-9.193-2.769-9.193-9.0819zm37.027 8.5839h-8.806v-34.0033h23.924v7.6978h-15.118v6.7564h13.9v7.5316h-13.9zm41.876-12.4605c0 7.6978-5.15 13.0145-12.737 13.0145-7.532 0-12.738-5.3167-12.738-13.0145s5.206-13.0143 12.738-13.0143c7.587 0 12.737 5.3165 12.737 13.0143zm-8.529 0c0-3.4336-1.495-5.8703-4.208-5.8703-2.659 0-4.154 2.4367-4.154 5.8703s1.495 5.8149 4.154 5.8149c2.713 0 4.208-2.3813 4.208-5.8149zm35.337-12.4605v24.921h-8.695v-2.16c-1.329 1.551-3.821 2.714-6.646 2.714-5.482 0-8.75-3.5999-8.75-9.1379v-16.3371h8.64v14.288c0 2.1045.997 3.5997 3.212 3.5997 1.606 0 3.101-1.0522 3.544-2.769v-15.1187zm4.076 24.921v-24.921h8.694v2.1598c1.385-1.5506 3.822-2.7136 6.701-2.7136 5.538 0 8.806 3.5997 8.806 9.1377v16.3371h-8.639v-14.2327c0-2.049-1.053-3.5443-3.268-3.5443-1.717 0-3.156.9969-3.6 2.7136v15.0634zm44.113 0v-1.994c-1.163 1.329-3.6 2.548-6.147 2.548-7.2 0-11.132-5.8151-11.132-13.0145s3.932-13.0143 11.132-13.0143c2.547 0 4.984 1.2184 6.147 2.5475v-13.0697h8.695v35.997zm0-9.1931v-6.5902c-.665-1.3291-2.16-2.326-3.821-2.326-2.991 0-4.763 2.4368-4.763 5.6488s1.772 5.5934 4.763 5.5934c1.717 0 3.156-.9415 3.821-2.326z" id="error-description"/></svg> |
| + </header> |
| + <article> |
| + <p><strong>The page you were looking for doesn't exist.</strong> You may have mistyped the address or the page may have moved. If you're the application owner check the logs for more information.</p> |
| + </article> |
| + </main> |
| + |
| + </body> |
| + |
| +</html> |
diff --git a/examples/rails-shop/public/406-unsupported-browser.html b/examples/rails-shop/public/406-unsupported-browser.html| new file mode 100644 |
| index 000000000..43d2811e8 |
| --- /dev/null |
| +++ b/examples/rails-shop/public/406-unsupported-browser.html |
| @@ -0,0 +1,135 @@ |
| +<!doctype html> |
| + |
| +<html lang="en"> |
| + |
| + <head> |
| + |
| + <title>Your browser is not supported (406 Not Acceptable)</title> |
| + |
| + <meta charset="utf-8"> |
| + <meta name="viewport" content="initial-scale=1, width=device-width"> |
| + <meta name="robots" content="noindex, nofollow"> |
| + |
| + <style> |
| + |
| + *, *::before, *::after { |
| + box-sizing: border-box; |
| + } |
| + |
| + * { |
| + margin: 0; |
| + } |
| + |
| + html { |
| + font-size: 16px; |
| + } |
| + |
| + body { |
| + background: #FFF; |
| + color: #261B23; |
| + display: grid; |
| + font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Aptos, Roboto, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; |
| + font-size: clamp(1rem, 2.5vw, 2rem); |
| + -webkit-font-smoothing: antialiased; |
| + font-style: normal; |
| + font-weight: 400; |
| + letter-spacing: -0.0025em; |
| + line-height: 1.4; |
| + min-height: 100dvh; |
| + place-items: center; |
| + text-rendering: optimizeLegibility; |
| + -webkit-text-size-adjust: 100%; |
| + } |
| + |
| + #error-description { |
| + fill: #d30001; |
| + } |
| + |
| + #error-id { |
| + fill: #f0eff0; |
| + } |
| + |
| + @media (prefers-color-scheme: dark) { |
| + body { |
| + background: #101010; |
| + color: #e0e0e0; |
| + } |
| + |
| + #error-description { |
| + fill: #FF6161; |
| + } |
| + |
| + #error-id { |
| + fill: #2c2c2c; |
| + } |
| + } |
| + |
| + a { |
| + color: inherit; |
| + font-weight: 700; |
| + text-decoration: underline; |
| + text-underline-offset: 0.0925em; |
| + } |
| + |
| + b, strong { |
| + font-weight: 700; |
| + } |
| + |
| + i, em { |
| + font-style: italic; |
| + } |
| + |
| + main { |
| + display: grid; |
| + gap: 1em; |
| + padding: 2em; |
| + place-items: center; |
| + text-align: center; |
| + } |
| + |
| + main header { |
| + width: min(100%, 12em); |
| + } |
| + |
| + main header svg { |
| + height: auto; |
| + max-width: 100%; |
| + width: 100%; |
| + } |
| + |
| + main article { |
| + width: min(100%, 30em); |
| + } |
| + |
| + main article p { |
| + font-size: 75%; |
| + } |
| + |
| + main article br { |
| + display: none; |
| + |
| + @media(min-width: 48em) { |
| + display: inline; |
| + } |
| + } |
| + |
| + </style> |
| + |
| + </head> |
| + |
| + <body> |
| + |
| + <!-- This file lives in public/406-unsupported-browser.html --> |
| + |
| + <main> |
| + <header> |
| + <svg height="172" viewBox="0 0 480 172" width="480" xmlns="http://www.w3.org/2000/svg"><path d="m124.48 3.00509-45.6889 100.02991h26.2239v-28.1168h38.119v28.1168h21.628v35.145h-21.628v30.82h-37.308v-30.82h-72.1833v-31.901l50.2851-103.27391zm115.583 168.69891c-40.822 0-64.884-35.146-64.884-85.7015 0-50.5554 24.062-85.700907 64.884-85.700907 40.823 0 64.884 35.145507 64.884 85.700907 0 50.5555-24.061 85.7015-64.884 85.7015zm0-133.2831c-17.572 0-22.709 21.8984-22.709 47.5816 0 25.6835 5.137 47.5815 22.709 47.5815 17.303 0 22.71-21.898 22.71-47.5815 0-25.6832-5.407-47.5816-22.71-47.5816zm202.906 9.7326h-41.093c-2.433-7.2994-7.84-12.4361-17.302-12.4361-16.221 0-25.413 17.5728-25.954 34.8752v1.3517c5.137-7.0291 16.221-12.4361 30.82-12.4361 33.524 0 54.881 24.0612 54.881 53.7998 0 33.253-23.791 58.396-61.64 58.396-21.628 0-39.741-10.003-50.825-27.576-9.733-14.599-13.788-32.442-13.788-54.3406 0-51.9072 24.331-89.485807 66.236-89.485807 32.712 0 53.258 18.654107 58.665 47.851907zm-82.727 66.2355c0 13.247 9.463 22.439 22.71 22.439 12.977 0 22.439-9.192 22.439-22.439 0-13.517-9.462-22.7091-22.439-22.7091-13.247 0-22.71 9.1921-22.71 22.7091z" id="error-id"/><path d="m100.761 68.9967v34.0033h-7.1991l-14.2326-19.8814v19.8814h-8.5839v-34.0033h8.307l13.125 18.7184v-18.7184zm28.454 21.5428c0 7.6978-5.15 13.0145-12.737 13.0145-7.532 0-12.738-5.3167-12.738-13.0145s5.206-13.0143 12.738-13.0143c7.587 0 12.737 5.3165 12.737 13.0143zm-8.529 0c0-3.4336-1.495-5.8703-4.208-5.8703-2.659 0-4.154 2.4367-4.154 5.8703s1.495 5.8149 4.154 5.8149c2.713 0 4.208-2.3813 4.208-5.8149zm13.185 3.8766v-9.5807h-3.655v-6.7564h3.655v-6.8671h8.584v6.8671h5.205v6.7564h-5.205v8.307c0 1.9383.941 2.769 2.658 2.769.941 0 1.994-.2216 2.769-.5538v7.3654c-.997.443-2.88.775-4.818.775-5.87 0-9.193-2.769-9.193-9.0819zm39.02-25.4194h9.083l12.958 34.0033h-9.027l-2.436-6.5902h-12.35l-2.381 6.5902h-8.806zm4.431 10.5222-3.489 9.5807h6.978zm17.44 11.0206c0-7.6978 5.095-13.0143 12.572-13.0143 6.701 0 10.854 3.9874 11.574 9.8023h-8.418c-.221-1.4953-1.384-2.6029-3.156-2.6029-2.437 0-3.988 2.2706-3.988 5.8149s1.551 5.7595 3.988 5.7595c1.772 0 2.935-1.0522 3.156-2.5475h8.418c-.72 5.7596-4.873 9.8025-11.574 9.8025-7.477 0-12.572-5.3167-12.572-13.0145zm25.676 0c0-7.6978 5.095-13.0143 12.572-13.0143 6.701 0 10.854 3.9874 11.574 9.8023h-8.418c-.221-1.4953-1.384-2.6029-3.156-2.6029-2.437 0-3.988 2.2706-3.988 5.8149s1.551 5.7595 3.988 5.7595c1.772 0 2.935-1.0522 3.156-2.5475h8.418c-.72 5.7596-4.873 9.8025-11.574 9.8025-7.477 0-12.572-5.3167-12.572-13.0145zm42.013 3.7658h8.031c-.887 5.7597-5.206 9.2487-11.686 9.2487-7.642 0-12.682-5.2613-12.682-13.0145 0-7.6978 5.317-13.0143 12.516-13.0143 7.643 0 11.962 5.095 11.962 12.5159v2.1598h-16.115c.277 2.9905 1.827 4.5965 4.319 4.5965 1.773 0 3.157-.7753 3.655-2.4921zm-3.821-10.0237c-2.049 0-3.433 1.2737-3.987 3.5997h7.532c-.111-2.0491-1.385-3.5997-3.545-3.5997zm23.4 16.7244v10.799h-8.694v-33.726h8.694v1.9937c1.163-1.3291 3.6-2.5475 6.148-2.5475 7.199 0 11.131 5.8703 11.131 13.0143 0 7.0886-3.932 13.0145-11.131 13.0145-2.548 0-4.985-1.219-6.148-2.548zm0-13.7893v6.5902c.665 1.3845 2.16 2.326 3.822 2.326 2.99 0 4.762-2.3814 4.762-5.5934s-1.772-5.6488-4.762-5.6488c-1.717 0-3.157.9969-3.822 2.326zm21.892 7.1994v-9.5807h-3.655v-6.7564h3.655v-6.8671h8.584v6.8671h5.206v6.7564h-5.206v8.307c0 1.9383.941 2.769 2.658 2.769.942 0 1.994-.2216 2.769-.5538v7.3654c-.997.443-2.88.775-4.818.775-5.87 0-9.193-2.769-9.193-9.0819zm39.458 8.5839h-8.363v-1.274c-.83.831-3.322 1.717-5.981 1.717-4.928 0-9.082-2.769-9.082-8.0301 0-4.818 4.154-7.9193 9.581-7.9193 2.049 0 4.486.6646 5.482 1.3845v-1.606c0-1.606-.941-2.9905-3.045-2.9905-1.606 0-2.548.7199-2.936 1.8275h-8.196c.72-4.8181 4.984-8.6393 11.408-8.6393 7.089 0 11.132 3.7659 11.132 10.2453zm-8.363-6.9779v-1.4399c-.553-1.0522-2.049-1.7167-3.655-1.7167-1.716 0-3.433.7199-3.433 2.3813 0 1.7168 1.717 2.4367 3.433 2.4367 1.606 0 3.102-.6645 3.655-1.6614zm20.742 4.9839v1.994h-8.694v-35.997h8.694v13.0697c1.163-1.3291 3.6-2.5475 6.148-2.5475 7.199 0 11.131 5.8149 11.131 13.0143s-3.932 13.0145-11.131 13.0145c-2.548 0-4.985-1.219-6.148-2.548zm0-13.7893v6.5902c.665 1.3845 2.105 2.326 3.822 2.326 2.99 0 4.762-2.3814 4.762-5.5934s-1.772-5.6488-4.762-5.6488c-1.662 0-3.157.9969-3.822 2.326zm28.759-20.2137v35.997h-8.695v-35.997zm19.172 27.3023h8.03c-.886 5.7597-5.206 9.2487-11.685 9.2487-7.643 0-12.682-5.2613-12.682-13.0145 0-7.6978 5.316-13.0143 12.516-13.0143 7.642 0 11.962 5.095 11.962 12.5159v2.1598h-16.116c.277 2.9905 1.828 4.5965 4.32 4.5965 1.772 0 3.157-.7753 3.655-2.4921zm-3.821-10.0237c-2.049 0-3.434 1.2737-3.988 3.5997h7.532c-.111-2.0491-1.384-3.5997-3.544-3.5997z" id="error-description"/></svg> |
| + </header> |
| + <article> |
| + <p><strong>Your browser is not supported.</strong><br> Please upgrade your browser to continue.</p> |
| + </article> |
| + </main> |
| + |
| + </body> |
| + |
| +</html> |
diff --git a/examples/rails-shop/public/422.html b/examples/rails-shop/public/422.html| new file mode 100644 |
| index 000000000..f12fb4aa1 |
| --- /dev/null |
| +++ b/examples/rails-shop/public/422.html |
| @@ -0,0 +1,135 @@ |
| +<!doctype html> |
| + |
| +<html lang="en"> |
| + |
| + <head> |
| + |
| + <title>The change you wanted was rejected (422 Unprocessable Entity)</title> |
| + |
| + <meta charset="utf-8"> |
| + <meta name="viewport" content="initial-scale=1, width=device-width"> |
| + <meta name="robots" content="noindex, nofollow"> |
| + |
| + <style> |
| + |
| + *, *::before, *::after { |
| + box-sizing: border-box; |
| + } |
| + |
| + * { |
| + margin: 0; |
| + } |
| + |
| + html { |
| + font-size: 16px; |
| + } |
| + |
| + body { |
| + background: #FFF; |
| + color: #261B23; |
| + display: grid; |
| + font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Aptos, Roboto, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; |
| + font-size: clamp(1rem, 2.5vw, 2rem); |
| + -webkit-font-smoothing: antialiased; |
| + font-style: normal; |
| + font-weight: 400; |
| + letter-spacing: -0.0025em; |
| + line-height: 1.4; |
| + min-height: 100dvh; |
| + place-items: center; |
| + text-rendering: optimizeLegibility; |
| + -webkit-text-size-adjust: 100%; |
| + } |
| + |
| + #error-description { |
| + fill: #d30001; |
| + } |
| + |
| + #error-id { |
| + fill: #f0eff0; |
| + } |
| + |
| + @media (prefers-color-scheme: dark) { |
| + body { |
| + background: #101010; |
| + color: #e0e0e0; |
| + } |
| + |
| + #error-description { |
| + fill: #FF6161; |
| + } |
| + |
| + #error-id { |
| + fill: #2c2c2c; |
| + } |
| + } |
| + |
| + a { |
| + color: inherit; |
| + font-weight: 700; |
| + text-decoration: underline; |
| + text-underline-offset: 0.0925em; |
| + } |
| + |
| + b, strong { |
| + font-weight: 700; |
| + } |
| + |
| + i, em { |
| + font-style: italic; |
| + } |
| + |
| + main { |
| + display: grid; |
| + gap: 1em; |
| + padding: 2em; |
| + place-items: center; |
| + text-align: center; |
| + } |
| + |
| + main header { |
| + width: min(100%, 12em); |
| + } |
| + |
| + main header svg { |
| + height: auto; |
| + max-width: 100%; |
| + width: 100%; |
| + } |
| + |
| + main article { |
| + width: min(100%, 30em); |
| + } |
| + |
| + main article p { |
| + font-size: 75%; |
| + } |
| + |
| + main article br { |
| + display: none; |
| + |
| + @media(min-width: 48em) { |
| + display: inline; |
| + } |
| + } |
| + |
| + </style> |
| + |
| + </head> |
| + |
| + <body> |
| + |
| + <!-- This file lives in public/422.html --> |
| + |
| + <main> |
| + <header> |
| + <svg height="172" viewBox="0 0 480 172" width="480" xmlns="http://www.w3.org/2000/svg"><path d="m124.48 3.00509-45.6889 100.02991h26.2239v-28.1168h38.119v28.1168h21.628v35.145h-21.628v30.82h-37.308v-30.82h-72.1833v-31.901l50.2851-103.27391zm130.453 51.63681c0-8.9215-6.218-15.4099-15.681-15.4099-10.273 0-15.95 7.5698-16.491 16.4913h-44.608c3.244-30.8199 25.683-55.421707 61.099-55.421707 36.498 0 59.477 20.816907 59.477 51.636807 0 21.3577-14.869 36.7676-31.901 52.7186l-27.305 27.035h59.747v37.308h-120.306v-27.846l57.044-56.7736c11.084-11.8954 18.925-20.0059 18.925-29.7385zm140.455 0c0-8.9215-6.218-15.4099-15.68-15.4099-10.274 0-15.951 7.5698-16.492 16.4913h-44.608c3.245-30.8199 25.684-55.421707 61.1-55.421707 36.497 0 59.477 20.816907 59.477 51.636807 0 21.3577-14.87 36.7676-31.902 52.7186l-27.305 27.035h59.747v37.308h-120.305v-27.846l57.043-56.7736c11.085-11.8954 18.925-20.0059 18.925-29.7385z" id="error-id"/><path d="m19.3936 103.554c-8.9715 0-14.84183-5.0952-14.84183-14.4544v-20.1029h8.86083v19.3276c0 4.8181 2.2706 7.3102 5.981 7.3102 3.6551 0 5.9257-2.4921 5.9257-7.3102v-19.3276h8.8608v20.1583c0 9.3038-5.8149 14.399-14.7865 14.399zm18.734-.554v-24.921h8.6947v2.1598c1.3845-1.5506 3.8212-2.7136 6.701-2.7136 5.538 0 8.8054 3.5997 8.8054 9.1377v16.3371h-8.6393v-14.2327c0-2.049-1.0522-3.5443-3.2674-3.5443-1.7168 0-3.1567.9969-3.5997 2.7136v15.0634zm36.8584-1.994v10.799h-8.6946v-33.726h8.6946v1.9937c1.163-1.3291 3.5997-2.5475 6.1472-2.5475 7.1994 0 11.1314 5.8703 11.1314 13.0143 0 7.0886-3.932 13.0145-11.1314 13.0145-2.5475 0-4.9842-1.219-6.1472-2.548zm0-13.7893v6.5902c.6646 1.3845 2.1599 2.326 3.8213 2.326 2.9905 0 4.7626-2.3814 4.7626-5.5934s-1.7721-5.6488-4.7626-5.6488c-1.7168 0-3.1567.9969-3.8213 2.326zm36.789-9.2485v8.3624c-1.052-.5538-2.215-.7753-3.6-.7753-2.381 0-3.987 1.0522-4.43 2.8244v14.6203h-8.6949v-24.921h8.6949v2.2152c1.218-1.6614 3.156-2.769 5.648-2.769 1.108 0 1.994.2215 2.382.443zm26.769 12.5713c0 7.6978-5.15 13.0145-12.737 13.0145-7.532 0-12.738-5.3167-12.738-13.0145s5.206-13.0143 12.738-13.0143c7.587 0 12.737 5.3165 12.737 13.0143zm-8.528 0c0-3.4336-1.496-5.8703-4.209-5.8703-2.659 0-4.154 2.4367-4.154 5.8703s1.495 5.8149 4.154 5.8149c2.713 0 4.209-2.3813 4.209-5.8149zm10.352 0c0-7.6978 5.095-13.0143 12.571-13.0143 6.701 0 10.855 3.9874 11.574 9.8023h-8.417c-.222-1.4953-1.385-2.6029-3.157-2.6029-2.437 0-3.987 2.2706-3.987 5.8149s1.55 5.7595 3.987 5.7595c1.772 0 2.935-1.0522 3.157-2.5475h8.417c-.719 5.7596-4.873 9.8025-11.574 9.8025-7.476 0-12.571-5.3167-12.571-13.0145zm42.013 3.7658h8.03c-.886 5.7597-5.206 9.2487-11.685 9.2487-7.643 0-12.682-5.2613-12.682-13.0145 0-7.6978 5.316-13.0143 12.516-13.0143 7.642 0 11.962 5.095 11.962 12.5159v2.1598h-16.116c.277 2.9905 1.828 4.5965 4.32 4.5965 1.772 0 3.156-.7753 3.655-2.4921zm-3.821-10.0237c-2.049 0-3.434 1.2737-3.988 3.5997h7.532c-.111-2.0491-1.385-3.5997-3.544-3.5997zm13.428 11.0206h8.473c.387 1.3845 1.606 2.1598 3.156 2.1598 1.44 0 2.548-.5538 2.548-1.7168 0-.9414-.72-1.2737-1.938-1.5506l-4.874-.9969c-4.153-.886-6.867-2.8797-6.867-7.2547 0-5.3165 4.763-8.4178 10.633-8.4178 6.812 0 10.522 3.1567 11.297 8.0855h-8.03c-.277-1.0522-1.052-1.9937-3.046-1.9937-1.273 0-2.326.5538-2.326 1.6614 0 .7753.554 1.163 1.717 1.3845l4.929 1.163c4.541 1.0522 6.978 3.4335 6.978 7.4763 0 5.3168-4.818 8.2518-10.91 8.2518-6.369 0-10.965-2.88-11.74-8.2518zm24.269 0h8.474c.387 1.3845 1.606 2.1598 3.156 2.1598 1.44 0 2.548-.5538 2.548-1.7168 0-.9414-.72-1.2737-1.939-1.5506l-4.873-.9969c-4.154-.886-6.867-2.8797-6.867-7.2547 0-5.3165 4.763-8.4178 10.633-8.4178 6.812 0 10.522 3.1567 11.297 8.0855h-8.03c-.277-1.0522-1.052-1.9937-3.046-1.9937-1.273 0-2.326.5538-2.326 1.6614 0 .7753.554 1.163 1.717 1.3845l4.929 1.163c4.541 1.0522 6.978 3.4335 6.978 7.4763 0 5.3168-4.818 8.2518-10.91 8.2518-6.369 0-10.965-2.88-11.741-8.2518zm47.918 7.6978h-8.363v-1.274c-.831.831-3.323 1.717-5.981 1.717-4.929 0-9.082-2.769-9.082-8.0301 0-4.818 4.153-7.9193 9.581-7.9193 2.049 0 4.485.6646 5.482 1.3845v-1.606c0-1.606-.941-2.9905-3.046-2.9905-1.606 0-2.547.7199-2.935 1.8275h-8.196c.72-4.8181 4.984-8.6393 11.408-8.6393 7.089 0 11.132 3.7659 11.132 10.2453zm-8.363-6.9779v-1.4399c-.554-1.0522-2.049-1.7167-3.655-1.7167-1.717 0-3.434.7199-3.434 2.3813 0 1.7168 1.717 2.4367 3.434 2.4367 1.606 0 3.101-.6645 3.655-1.6614zm20.742 4.9839v1.994h-8.695v-35.997h8.695v13.0697c1.163-1.3291 3.6-2.5475 6.147-2.5475 7.2 0 11.132 5.8149 11.132 13.0143s-3.932 13.0145-11.132 13.0145c-2.547 0-4.984-1.219-6.147-2.548zm0-13.7893v6.5902c.665 1.3845 2.105 2.326 3.821 2.326 2.991 0 4.763-2.3814 4.763-5.5934s-1.772-5.6488-4.763-5.6488c-1.661 0-3.156.9969-3.821 2.326zm28.759-20.2137v35.997h-8.695v-35.997zm19.172 27.3023h8.03c-.886 5.7597-5.206 9.2487-11.685 9.2487-7.643 0-12.682-5.2613-12.682-13.0145 0-7.6978 5.316-13.0143 12.515-13.0143 7.643 0 11.962 5.095 11.962 12.5159v2.1598h-16.115c.277 2.9905 1.827 4.5965 4.32 4.5965 1.772 0 3.156-.7753 3.655-2.4921zm-3.822-10.0237c-2.049 0-3.433 1.2737-3.987 3.5997h7.532c-.111-2.0491-1.385-3.5997-3.545-3.5997zm25.461-15.2849h24.311v7.6424h-15.561v5.3165h14.232v7.4763h-14.232v5.8703h15.561v7.6978h-24.311zm27.942 34.0033v-24.921h8.694v2.1598c1.385-1.5506 3.822-2.7136 6.701-2.7136 5.538 0 8.806 3.5997 8.806 9.1377v16.3371h-8.639v-14.2327c0-2.049-1.053-3.5443-3.268-3.5443-1.717 0-3.157.9969-3.6 2.7136v15.0634zm29.991-8.5839v-9.5807h-3.655v-6.7564h3.655v-6.8671h8.584v6.8671h5.206v6.7564h-5.206v8.307c0 1.9383.941 2.769 2.658 2.769.942 0 1.994-.2216 2.769-.5538v7.3654c-.997.443-2.88.775-4.818.775-5.87 0-9.193-2.769-9.193-9.0819zm26.161-16.3371v24.921h-8.694v-24.921zm.61-6.7564c0 2.8244-2.271 4.652-4.929 4.652s-4.929-1.8276-4.929-4.652c0-2.8797 2.271-4.7073 4.929-4.7073s4.929 1.8276 4.929 4.7073zm5.382 23.0935v-9.5807h-3.655v-6.7564h3.655v-6.8671h8.584v6.8671h5.206v6.7564h-5.206v8.307c0 1.9383.941 2.769 2.658 2.769.941 0 1.994-.2216 2.769-.5538v7.3654c-.997.443-2.88.775-4.818.775-5.87 0-9.193-2.769-9.193-9.0819zm29.22 17.3889h-8.584l3.655-9.414-9.303-24.312h9.026l4.763 14.1773 4.652-14.1773h8.639z" id="error-description"/></svg> |
| + </header> |
| + <article> |
| + <p><strong>The change you wanted was rejected.</strong> Maybe you tried to change something you didn't have access to. If you're the application owner check the logs for more information.</p> |
| + </article> |
| + </main> |
| + |
| + </body> |
| + |
| +</html> |
diff --git a/examples/rails-shop/public/500.html b/examples/rails-shop/public/500.html| new file mode 100644 |
| index 000000000..e4eb18a75 |
| --- /dev/null |
| +++ b/examples/rails-shop/public/500.html |
| @@ -0,0 +1,135 @@ |
| +<!doctype html> |
| + |
| +<html lang="en"> |
| + |
| + <head> |
| + |
| + <title>We're sorry, but something went wrong (500 Internal Server Error)</title> |
| + |
| + <meta charset="utf-8"> |
| + <meta name="viewport" content="initial-scale=1, width=device-width"> |
| + <meta name="robots" content="noindex, nofollow"> |
| + |
| + <style> |
| + |
| + *, *::before, *::after { |
| + box-sizing: border-box; |
| + } |
| + |
| + * { |
| + margin: 0; |
| + } |
| + |
| + html { |
| + font-size: 16px; |
| + } |
| + |
| + body { |
| + background: #FFF; |
| + color: #261B23; |
| + display: grid; |
| + font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Aptos, Roboto, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; |
| + font-size: clamp(1rem, 2.5vw, 2rem); |
| + -webkit-font-smoothing: antialiased; |
| + font-style: normal; |
| + font-weight: 400; |
| + letter-spacing: -0.0025em; |
| + line-height: 1.4; |
| + min-height: 100dvh; |
| + place-items: center; |
| + text-rendering: optimizeLegibility; |
| + -webkit-text-size-adjust: 100%; |
| + } |
| + |
| + #error-description { |
| + fill: #d30001; |
| + } |
| + |
| + #error-id { |
| + fill: #f0eff0; |
| + } |
| + |
| + @media (prefers-color-scheme: dark) { |
| + body { |
| + background: #101010; |
| + color: #e0e0e0; |
| + } |
| + |
| + #error-description { |
| + fill: #FF6161; |
| + } |
| + |
| + #error-id { |
| + fill: #2c2c2c; |
| + } |
| + } |
| + |
| + a { |
| + color: inherit; |
| + font-weight: 700; |
| + text-decoration: underline; |
| + text-underline-offset: 0.0925em; |
| + } |
| + |
| + b, strong { |
| + font-weight: 700; |
| + } |
| + |
| + i, em { |
| + font-style: italic; |
| + } |
| + |
| + main { |
| + display: grid; |
| + gap: 1em; |
| + padding: 2em; |
| + place-items: center; |
| + text-align: center; |
| + } |
| + |
| + main header { |
| + width: min(100%, 12em); |
| + } |
| + |
| + main header svg { |
| + height: auto; |
| + max-width: 100%; |
| + width: 100%; |
| + } |
| + |
| + main article { |
| + width: min(100%, 30em); |
| + } |
| + |
| + main article p { |
| + font-size: 75%; |
| + } |
| + |
| + main article br { |
| + display: none; |
| + |
| + @media(min-width: 48em) { |
| + display: inline; |
| + } |
| + } |
| + |
| + </style> |
| + |
| + </head> |
| + |
| + <body> |
| + |
| + <!-- This file lives in public/500.html --> |
| + |
| + <main> |
| + <header> |
| + <svg height="172" viewBox="0 0 480 172" width="480" xmlns="http://www.w3.org/2000/svg"><path d="m101.23 93.8427c-8.1103 0-15.4098 3.7849-19.7354 8.3813h-36.2269v-99.21891h103.8143v37.03791h-68.3984v24.8722c5.1366-2.7035 15.1396-5.9477 24.6014-5.9477 35.146 0 56.233 22.7094 56.233 55.4215 0 34.605-23.791 57.315-60.558 57.315-37.8492 0-61.64-22.169-63.8028-55.963h42.9857c1.0814 10.814 9.1919 19.195 21.6281 19.195 11.355 0 19.465-8.381 19.465-20.547 0-11.625-7.299-20.5463-20.006-20.5463zm138.833 77.8613c-40.822 0-64.884-35.146-64.884-85.7015 0-50.5554 24.062-85.700907 64.884-85.700907 40.823 0 64.884 35.145507 64.884 85.700907 0 50.5555-24.061 85.7015-64.884 85.7015zm0-133.2831c-17.572 0-22.709 21.8984-22.709 47.5816 0 25.6835 5.137 47.5815 22.709 47.5815 17.303 0 22.71-21.898 22.71-47.5815 0-25.6832-5.407-47.5816-22.71-47.5816zm140.456 133.2831c-40.823 0-64.884-35.146-64.884-85.7015 0-50.5554 24.061-85.700907 64.884-85.700907 40.822 0 64.884 35.145507 64.884 85.700907 0 50.5555-24.062 85.7015-64.884 85.7015zm0-133.2831c-17.573 0-22.71 21.8984-22.71 47.5816 0 25.6835 5.137 47.5815 22.71 47.5815 17.302 0 22.709-21.898 22.709-47.5815 0-25.6832-5.407-47.5816-22.709-47.5816z" id="error-id"/><path d="m23.1377 68.9967v34.0033h-8.9162v-34.0033zm4.3157 34.0033v-24.921h8.6947v2.1598c1.3845-1.5506 3.8212-2.7136 6.701-2.7136 5.538 0 8.8054 3.5997 8.8054 9.1377v16.3371h-8.6393v-14.2327c0-2.049-1.0522-3.5443-3.2674-3.5443-1.7168 0-3.1567.9969-3.5997 2.7136v15.0634zm29.9913-8.5839v-9.5807h-3.655v-6.7564h3.655v-6.8671h8.5839v6.8671h5.2058v6.7564h-5.2058v8.307c0 1.9383.9415 2.769 2.6583 2.769.9414 0 1.9937-.2216 2.769-.5538v7.3654c-.9969.443-2.8798.775-4.8181.775-5.8703 0-9.1931-2.769-9.1931-9.0819zm32.3666-.1108h8.0301c-.8861 5.7597-5.2057 9.2487-11.6852 9.2487-7.6424 0-12.682-5.2613-12.682-13.0145 0-7.6978 5.3165-13.0143 12.5159-13.0143 7.6424 0 11.9621 5.095 11.9621 12.5159v2.1598h-16.1156c.2769 2.9905 1.8275 4.5965 4.3196 4.5965 1.7722 0 3.1567-.7753 3.6551-2.4921zm-3.8212-10.0237c-2.0491 0-3.4336 1.2737-3.9874 3.5997h7.5317c-.1107-2.0491-1.3845-3.5997-3.5443-3.5997zm31.4299-6.3134v8.3624c-1.052-.5538-2.215-.7753-3.599-.7753-2.382 0-3.988 1.0522-4.431 2.8244v14.6203h-8.694v-24.921h8.694v2.2152c1.219-1.6614 3.157-2.769 5.649-2.769 1.108 0 1.994.2215 2.381.443zm2.949 25.0318v-24.921h8.694v2.1598c1.385-1.5506 3.821-2.7136 6.701-2.7136 5.538 0 8.806 3.5997 8.806 9.1377v16.3371h-8.64v-14.2327c0-2.049-1.052-3.5443-3.267-3.5443-1.717 0-3.157.9969-3.6 2.7136v15.0634zm50.371 0h-8.363v-1.274c-.83.831-3.323 1.717-5.981 1.717-4.929 0-9.082-2.769-9.082-8.0301 0-4.818 4.153-7.9193 9.581-7.9193 2.049 0 4.485.6646 5.482 1.3845v-1.606c0-1.606-.941-2.9905-3.046-2.9905-1.606 0-2.547.7199-2.935 1.8275h-8.196c.72-4.8181 4.984-8.6393 11.408-8.6393 7.089 0 11.132 3.7659 11.132 10.2453zm-8.363-6.9779v-1.4399c-.554-1.0522-2.049-1.7167-3.655-1.7167-1.717 0-3.433.7199-3.433 2.3813 0 1.7168 1.716 2.4367 3.433 2.4367 1.606 0 3.101-.6645 3.655-1.6614zm20.742-29.0191v35.997h-8.694v-35.997zm13.036 25.9178h9.248c.72 2.326 2.714 3.489 5.483 3.489 2.713 0 4.596-1.163 4.596-3.2674 0-1.6061-1.052-2.326-3.212-2.8244l-6.534-1.3845c-4.985-1.1076-8.751-3.7105-8.751-9.47 0-6.6456 5.538-11.0206 13.07-11.0206 8.307 0 13.014 4.5411 13.956 10.4114h-8.695c-.72-1.8829-2.27-3.3228-5.205-3.3228-2.548 0-4.265 1.1076-4.265 2.9905 0 1.4953 1.052 2.326 2.825 2.7137l6.645 1.5506c5.815 1.3845 9.027 4.5412 9.027 9.8023 0 6.9778-5.87 10.9654-13.291 10.9654-8.141 0-13.679-3.9322-14.897-10.6332zm46.509 1.3845h8.031c-.887 5.7597-5.206 9.2487-11.686 9.2487-7.642 0-12.682-5.2613-12.682-13.0145 0-7.6978 5.317-13.0143 12.516-13.0143 7.643 0 11.962 5.095 11.962 12.5159v2.1598h-16.115c.277 2.9905 1.827 4.5965 4.319 4.5965 1.773 0 3.157-.7753 3.655-2.4921zm-3.821-10.0237c-2.049 0-3.433 1.2737-3.987 3.5997h7.532c-.111-2.0491-1.385-3.5997-3.545-3.5997zm31.431-6.3134v8.3624c-1.053-.5538-2.216-.7753-3.6-.7753-2.381 0-3.988 1.0522-4.431 2.8244v14.6203h-8.694v-24.921h8.694v2.2152c1.219-1.6614 3.157-2.769 5.649-2.769 1.108 0 1.994.2215 2.382.443zm18.288 25.0318h-7.809l-9.47-24.921h8.861l4.763 14.288 4.652-14.288h8.528zm25.614-8.6947h8.03c-.886 5.7597-5.206 9.2487-11.685 9.2487-7.642 0-12.682-5.2613-12.682-13.0145 0-7.6978 5.316-13.0143 12.516-13.0143 7.642 0 11.962 5.095 11.962 12.5159v2.1598h-16.116c.277 2.9905 1.828 4.5965 4.32 4.5965 1.772 0 3.157-.7753 3.655-2.4921zm-3.821-10.0237c-2.049 0-3.434 1.2737-3.988 3.5997h7.532c-.111-2.0491-1.384-3.5997-3.544-3.5997zm31.43-6.3134v8.3624c-1.052-.5538-2.215-.7753-3.6-.7753-2.381 0-3.987 1.0522-4.43 2.8244v14.6203h-8.695v-24.921h8.695v2.2152c1.218-1.6614 3.157-2.769 5.649-2.769 1.107 0 1.993.2215 2.381.443zm13.703-8.9715h24.312v7.6424h-15.562v5.3165h14.232v7.4763h-14.232v5.8703h15.562v7.6978h-24.312zm44.667 8.9715v8.3624c-1.052-.5538-2.215-.7753-3.6-.7753-2.381 0-3.987 1.0522-4.43 2.8244v14.6203h-8.695v-24.921h8.695v2.2152c1.218-1.6614 3.156-2.769 5.648-2.769 1.108 0 1.994.2215 2.382.443zm19.673 0v8.3624c-1.053-.5538-2.216-.7753-3.6-.7753-2.381 0-3.987 1.0522-4.43 2.8244v14.6203h-8.695v-24.921h8.695v2.2152c1.218-1.6614 3.156-2.769 5.648-2.769 1.108 0 1.994.2215 2.382.443zm26.769 12.5713c0 7.6978-5.15 13.0145-12.737 13.0145-7.532 0-12.738-5.3167-12.738-13.0145s5.206-13.0143 12.738-13.0143c7.587 0 12.737 5.3165 12.737 13.0143zm-8.529 0c0-3.4336-1.495-5.8703-4.208-5.8703-2.659 0-4.154 2.4367-4.154 5.8703s1.495 5.8149 4.154 5.8149c2.713 0 4.208-2.3813 4.208-5.8149zm28.082-12.5713v8.3624c-1.052-.5538-2.215-.7753-3.6-.7753-2.381 0-3.987 1.0522-4.43 2.8244v14.6203h-8.695v-24.921h8.695v2.2152c1.218-1.6614 3.157-2.769 5.649-2.769 1.107 0 1.993.2215 2.381.443z" id="error-description"/></svg> |
| + </header> |
| + <article> |
| + <p><strong>We're sorry, but something went wrong.</strong><br> If you're the application owner check the logs for more information.</p> |
| + </article> |
| + </main> |
| + |
| + </body> |
| + |
| +</html> |
diff --git a/examples/rails-shop/public/icon.png b/examples/rails-shop/public/icon.png| new file mode 100644 |
| index 000000000..c4c9dbfbb |
| Binary files /dev/null and b/examples/rails-shop/public/icon.png differ |
diff --git a/examples/rails-shop/public/icon.svg b/examples/rails-shop/public/icon.svg| new file mode 100644 |
| index 000000000..04b34bf83 |
| --- /dev/null |
| +++ b/examples/rails-shop/public/icon.svg |
| @@ -0,0 +1,3 @@ |
| +<svg width="512" height="512" xmlns="http://www.w3.org/2000/svg"> |
| + <circle cx="256" cy="256" r="256" fill="red"/> |
| +</svg> |
diff --git a/examples/rails-shop/public/robots.txt b/examples/rails-shop/public/robots.txt| new file mode 100644 |
| index 000000000..c19f78ab6 |
| --- /dev/null |
| +++ b/examples/rails-shop/public/robots.txt |
| @@ -0,0 +1 @@ |
| +# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file |
diff --git a/examples/rails-shop/script/.keep b/examples/rails-shop/script/.keep| new file mode 100644 |
| index 000000000..e69de29bb |
diff --git a/examples/rails-shop/storage/.keep b/examples/rails-shop/storage/.keep| new file mode 100644 |
| index 000000000..e69de29bb |
diff --git a/examples/rails-shop/tmp/.keep b/examples/rails-shop/tmp/.keep| new file mode 100644 |
| index 000000000..e69de29bb |
diff --git a/examples/rails-shop/tmp/pids/.keep b/examples/rails-shop/tmp/pids/.keep| new file mode 100644 |
| index 000000000..e69de29bb |
diff --git a/examples/rails-shop/tmp/storage/.keep b/examples/rails-shop/tmp/storage/.keep| new file mode 100644 |
| index 000000000..e69de29bb |
diff --git a/examples/rails-shop/v2.patch b/examples/rails-shop/v2.patch| new file mode 100644 |
| index 000000000..be34b0219 |
| --- /dev/null |
| +++ b/examples/rails-shop/v2.patch |
| @@ -0,0 +1,68 @@ |
| +diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb |
| +index e735e10..96cb6ed 100644 |
| +--- a/app/controllers/pages_controller.rb |
| ++++ b/app/controllers/pages_controller.rb |
| +@@ -2,6 +2,7 @@ class PagesController < ApplicationController |
| + def show |
| + @done = Ping.where.not(done_at: nil).count |
| + @total = Ping.count |
| ++ @note = Ping.order(:id).last&.note |
| + @heartbeats = Heartbeat.where(created_at: 1.hour.ago..).count |
| + @uploads = Upload.with_attached_file.order(:id) |
| + @cached_at = Rails.cache.fetch("cached_at", expires_in: 30.seconds) { Time.current } |
| +diff --git a/app/controllers/pings_controller.rb b/app/controllers/pings_controller.rb |
| +index f5b7020..e1e5779 100644 |
| +--- a/app/controllers/pings_controller.rb |
| ++++ b/app/controllers/pings_controller.rb |
| +@@ -1,6 +1,6 @@ |
| + class PingsController < ApplicationController |
| + def create |
| +- PingJob.perform_later(Ping.create!.id) |
| ++ PingJob.perform_later(Ping.create!(note: "v2").id) |
| + redirect_to root_path |
| + end |
| + end |
| +diff --git a/app/views/pages/show.html.erb b/app/views/pages/show.html.erb |
| +index 85757f5..df836d9 100644 |
| +--- a/app/views/pages/show.html.erb |
| ++++ b/app/views/pages/show.html.erb |
| +@@ -1,6 +1,7 @@ |
| + <h1>shop</h1> |
| + |
| + <p>Jobs done: <%= @done %> of <%= @total %></p> |
| ++<p>Latest note: <%= @note %></p> |
| + <p>Heartbeats in the last hour: <%= @heartbeats %></p> |
| + <p>This page was cached at <%= @cached_at %>.</p> |
| + <p>Tables in its database: <%= @tables.join(", ") %>. Cable messages: <%= @cable_messages %>.</p> |
| +diff --git a/db/migrate/20261024000008_add_note_to_pings.rb b/db/migrate/20261024000008_add_note_to_pings.rb |
| +new file mode 100644 |
| +index 0000000..358c58e |
| +--- /dev/null |
| ++++ b/db/migrate/20261024000008_add_note_to_pings.rb |
| +@@ -0,0 +1,5 @@ |
| ++class AddNoteToPings < ActiveRecord::Migration[8.1] |
| ++ def change |
| ++ add_column :pings, :note, :string |
| ++ end |
| ++end |
| +diff --git a/db/schema.rb b/db/schema.rb |
| +index 5dab864..eb7266b 100644 |
| +--- a/db/schema.rb |
| ++++ b/db/schema.rb |
| +@@ -10,7 +10,7 @@ |
| + # |
| + # It's strongly recommended that you check this file into your version control system. |
| + |
| +-ActiveRecord::Schema[8.1].define(version: 2026_10_24_000007) do |
| ++ActiveRecord::Schema[8.1].define(version: 2026_10_24_000008) do |
| + create_table "active_storage_attachments", force: :cascade do |t| |
| + t.string "name", null: false |
| + t.string "record_type", null: false |
| +@@ -48,6 +48,7 @@ ActiveRecord::Schema[8.1].define(version: 2026_10_24_000007) do |
| + t.datetime "done_at" |
| + t.datetime "created_at", null: false |
| + t.datetime "updated_at", null: false |
| ++ t.string "note" |
| + end |
| + |
| + create_table "solid_cable_messages", force: :cascade do |t| |
diff --git a/examples/rails-shop/vendor/.keep b/examples/rails-shop/vendor/.keep| new file mode 100644 |
| index 000000000..e69de29bb |