itsi 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Cargo.lock +2 -2
- data/README.md +1 -1
- data/Rakefile +2 -2
- data/crates/itsi_scheduler/Cargo.toml +1 -1
- data/crates/itsi_server/Cargo.toml +1 -1
- data/crates/itsi_server/src/server/middleware_stack/middlewares/compression.rs +28 -11
- data/crates/itsi_server/src/server/middleware_stack/middlewares/log_requests.rs +1 -1
- data/crates/itsi_server/src/server/middleware_stack/middlewares/proxy.rs +1 -2
- data/crates/itsi_server/src/server/middleware_stack/middlewares/static_assets.rs +14 -2
- data/crates/itsi_server/src/server/middleware_stack/middlewares/string_rewrite.rs +86 -41
- data/crates/itsi_server/src/services/itsi_http_service.rs +46 -35
- data/crates/itsi_server/src/services/static_file_server.rs +31 -3
- data/examples/api_with_schema_and_controllers/Itsi.rb +35 -0
- data/examples/api_with_schema_and_controllers/README.md +10 -0
- data/examples/api_with_schema_and_controllers/controllers.rb +66 -0
- data/examples/api_with_schema_and_controllers/schemas.rb +25 -0
- data/examples/file_server/Itsi.rb +30 -0
- data/examples/file_server/README.md +3 -0
- data/examples/file_server/about.html +80 -0
- data/examples/file_server/admin/secrets.txt +1 -0
- data/examples/file_server/fairytale.txt +33 -0
- data/examples/file_server/itsi-server-100.png +0 -0
- data/examples/file_server/subdirectory/movies.csv +21 -0
- data/examples/helpers/datastore.rb +84 -0
- data/examples/media_server/Itsi.rb +5 -0
- data/examples/media_server/README.md +3 -0
- data/examples/media_server/images/itsi-server-100.png +0 -0
- data/examples/media_server/index.html +82 -0
- data/examples/multi_rack_rails_sinatra/Gemfile +66 -0
- data/examples/multi_rack_rails_sinatra/Gemfile.lock +416 -0
- data/examples/multi_rack_rails_sinatra/Itsi.rb +44 -0
- data/examples/multi_rack_rails_sinatra/README.md +7 -0
- data/examples/multi_rack_rails_sinatra/index.html +119 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/.dockerignore +51 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/.gitattributes +9 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/.github/dependabot.yml +12 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/.github/workflows/ci.yml +90 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/.gitignore +34 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/.kamal/hooks/docker-setup.sample +3 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/.kamal/hooks/post-app-boot.sample +3 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/.kamal/hooks/post-deploy.sample +14 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/.kamal/hooks/post-proxy-reboot.sample +3 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/.kamal/hooks/pre-app-boot.sample +3 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/.kamal/hooks/pre-build.sample +51 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/.kamal/hooks/pre-connect.sample +47 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/.kamal/hooks/pre-deploy.sample +109 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/.kamal/hooks/pre-proxy-reboot.sample +3 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/.kamal/secrets +17 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/.rubocop.yml +8 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/.ruby-version +1 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/Dockerfile +72 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/Gemfile +66 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/Gemfile.lock +416 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/README.md +24 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/Rakefile +6 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/assets/images/.keep +0 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/assets/stylesheets/application.css +161 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/controllers/application_controller.rb +4 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/controllers/articles_controller.rb +70 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/controllers/concerns/.keep +0 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/controllers/home_controller.rb +4 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/helpers/application_helper.rb +2 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/helpers/articles_helper.rb +2 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/helpers/home_helper.rb +2 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/javascript/application.js +3 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/javascript/controllers/application.js +9 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/javascript/controllers/hello_controller.js +7 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/javascript/controllers/index.js +4 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/jobs/application_job.rb +7 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/mailers/application_mailer.rb +4 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/models/application_record.rb +3 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/models/article.rb +2 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/models/concerns/.keep +0 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/views/articles/_article.html.erb +14 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/views/articles/_article.json.jbuilder +2 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/views/articles/_form.html.erb +30 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/views/articles/edit.html.erb +12 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/views/articles/index.html.erb +29 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/views/articles/index.json.jbuilder +1 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/views/articles/new.html.erb +11 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/views/articles/show.html.erb +10 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/views/articles/show.json.jbuilder +1 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/views/home/index.html.erb +8 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/views/layouts/application.html.erb +34 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/views/layouts/mailer.html.erb +13 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/views/layouts/mailer.text.erb +1 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/views/pwa/manifest.json.erb +22 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/app/views/pwa/service-worker.js +26 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/bin/brakeman +7 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/bin/bundle +109 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/bin/dev +2 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/bin/docker-entrypoint +14 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/bin/importmap +4 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/bin/jobs +6 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/bin/kamal +27 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/bin/rails +4 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/bin/rake +4 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/bin/rubocop +8 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/bin/setup +34 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/bin/thrust +5 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/application.rb +27 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/boot.rb +4 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/cable.yml +17 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/cache.yml +16 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/credentials.yml.enc +1 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/database.yml +41 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/deploy.yml +116 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/environment.rb +5 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/environments/development.rb +72 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/environments/production.rb +90 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/environments/test.rb +53 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/importmap.rb +7 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/initializers/assets.rb +7 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/initializers/content_security_policy.rb +25 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/initializers/filter_parameter_logging.rb +8 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/initializers/inflections.rb +16 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/locales/en.yml +31 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/puma.rb +41 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/queue.yml +18 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/recurring.yml +10 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/routes.rb +17 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config/storage.yml +34 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/config.ru +6 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/db/cable_schema.rb +11 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/db/cache_schema.rb +14 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/db/migrate/20250422211855_create_articles.rb +10 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/db/queue_schema.rb +129 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/db/schema.rb +20 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/db/seeds.rb +9 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/lib/tasks/.keep +0 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/log/.keep +0 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/public/400.html +114 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/public/404.html +114 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/public/406-unsupported-browser.html +114 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/public/422.html +114 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/public/500.html +114 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/public/icon.png +0 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/public/icon.svg +3 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/public/robots.txt +1 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/script/.keep +0 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/storage/.keep +0 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/test/application_system_test_case.rb +5 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/test/controllers/.keep +0 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/test/controllers/articles_controller_test.rb +48 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/test/controllers/home_controller_test.rb +8 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/test/fixtures/articles.yml +9 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/test/fixtures/files/.keep +0 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/test/helpers/.keep +0 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/test/integration/.keep +0 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/test/mailers/.keep +0 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/test/models/.keep +0 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/test/models/article_test.rb +7 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/test/system/.keep +0 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/test/system/articles_test.rb +43 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/test/test_helper.rb +15 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/tmp/.keep +0 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/tmp/pids/.keep +0 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/tmp/storage/.keep +0 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/vendor/.keep +0 -0
- data/examples/multi_rack_rails_sinatra/rails_subapp/vendor/javascript/.keep +0 -0
- data/examples/multi_rack_rails_sinatra/sinatra_subapp/config.ru +2 -0
- data/examples/multi_rack_rails_sinatra/sinatra_subapp/my_app.rb +96 -0
- data/examples/rails_with_static_assets/.dockerignore +51 -0
- data/examples/rails_with_static_assets/.gitattributes +9 -0
- data/examples/rails_with_static_assets/.github/dependabot.yml +12 -0
- data/examples/rails_with_static_assets/.github/workflows/ci.yml +90 -0
- data/examples/rails_with_static_assets/.gitignore +34 -0
- data/examples/rails_with_static_assets/.kamal/hooks/docker-setup.sample +3 -0
- data/examples/rails_with_static_assets/.kamal/hooks/post-app-boot.sample +3 -0
- data/examples/rails_with_static_assets/.kamal/hooks/post-deploy.sample +14 -0
- data/examples/rails_with_static_assets/.kamal/hooks/post-proxy-reboot.sample +3 -0
- data/examples/rails_with_static_assets/.kamal/hooks/pre-app-boot.sample +3 -0
- data/examples/rails_with_static_assets/.kamal/hooks/pre-build.sample +51 -0
- data/examples/rails_with_static_assets/.kamal/hooks/pre-connect.sample +47 -0
- data/examples/rails_with_static_assets/.kamal/hooks/pre-deploy.sample +109 -0
- data/examples/rails_with_static_assets/.kamal/hooks/pre-proxy-reboot.sample +3 -0
- data/examples/rails_with_static_assets/.kamal/secrets +17 -0
- data/examples/rails_with_static_assets/.rubocop.yml +8 -0
- data/examples/rails_with_static_assets/.ruby-version +1 -0
- data/examples/rails_with_static_assets/Dockerfile +72 -0
- data/examples/rails_with_static_assets/Gemfile +66 -0
- data/examples/rails_with_static_assets/Gemfile.lock +416 -0
- data/examples/rails_with_static_assets/Itsi.rb +10 -0
- data/examples/rails_with_static_assets/README.md +14 -0
- data/examples/rails_with_static_assets/Rakefile +6 -0
- data/examples/rails_with_static_assets/app/assets/images/.keep +0 -0
- data/examples/rails_with_static_assets/app/assets/stylesheets/application.css +161 -0
- data/examples/rails_with_static_assets/app/controllers/application_controller.rb +4 -0
- data/examples/rails_with_static_assets/app/controllers/articles_controller.rb +70 -0
- data/examples/rails_with_static_assets/app/controllers/concerns/.keep +0 -0
- data/examples/rails_with_static_assets/app/controllers/home_controller.rb +4 -0
- data/examples/rails_with_static_assets/app/helpers/application_helper.rb +2 -0
- data/examples/rails_with_static_assets/app/helpers/articles_helper.rb +2 -0
- data/examples/rails_with_static_assets/app/helpers/home_helper.rb +2 -0
- data/examples/rails_with_static_assets/app/javascript/application.js +3 -0
- data/examples/rails_with_static_assets/app/javascript/controllers/application.js +9 -0
- data/examples/rails_with_static_assets/app/javascript/controllers/hello_controller.js +7 -0
- data/examples/rails_with_static_assets/app/javascript/controllers/index.js +4 -0
- data/examples/rails_with_static_assets/app/jobs/application_job.rb +7 -0
- data/examples/rails_with_static_assets/app/mailers/application_mailer.rb +4 -0
- data/examples/rails_with_static_assets/app/models/application_record.rb +3 -0
- data/examples/rails_with_static_assets/app/models/article.rb +2 -0
- data/examples/rails_with_static_assets/app/models/concerns/.keep +0 -0
- data/examples/rails_with_static_assets/app/views/articles/_article.html.erb +14 -0
- data/examples/rails_with_static_assets/app/views/articles/_article.json.jbuilder +2 -0
- data/examples/rails_with_static_assets/app/views/articles/_form.html.erb +30 -0
- data/examples/rails_with_static_assets/app/views/articles/edit.html.erb +12 -0
- data/examples/rails_with_static_assets/app/views/articles/index.html.erb +29 -0
- data/examples/rails_with_static_assets/app/views/articles/index.json.jbuilder +1 -0
- data/examples/rails_with_static_assets/app/views/articles/new.html.erb +11 -0
- data/examples/rails_with_static_assets/app/views/articles/show.html.erb +10 -0
- data/examples/rails_with_static_assets/app/views/articles/show.json.jbuilder +1 -0
- data/examples/rails_with_static_assets/app/views/home/index.html.erb +8 -0
- data/examples/rails_with_static_assets/app/views/layouts/application.html.erb +34 -0
- data/examples/rails_with_static_assets/app/views/layouts/mailer.html.erb +13 -0
- data/examples/rails_with_static_assets/app/views/layouts/mailer.text.erb +1 -0
- data/examples/rails_with_static_assets/app/views/pwa/manifest.json.erb +22 -0
- data/examples/rails_with_static_assets/app/views/pwa/service-worker.js +26 -0
- data/examples/rails_with_static_assets/bin/brakeman +7 -0
- data/examples/rails_with_static_assets/bin/bundle +109 -0
- data/examples/rails_with_static_assets/bin/dev +2 -0
- data/examples/rails_with_static_assets/bin/docker-entrypoint +14 -0
- data/examples/rails_with_static_assets/bin/importmap +4 -0
- data/examples/rails_with_static_assets/bin/jobs +6 -0
- data/examples/rails_with_static_assets/bin/kamal +27 -0
- data/examples/rails_with_static_assets/bin/rails +4 -0
- data/examples/rails_with_static_assets/bin/rake +4 -0
- data/examples/rails_with_static_assets/bin/rubocop +8 -0
- data/examples/rails_with_static_assets/bin/setup +34 -0
- data/examples/rails_with_static_assets/bin/thrust +5 -0
- data/examples/rails_with_static_assets/config/application.rb +26 -0
- data/examples/rails_with_static_assets/config/boot.rb +4 -0
- data/examples/rails_with_static_assets/config/cable.yml +17 -0
- data/examples/rails_with_static_assets/config/cache.yml +16 -0
- data/examples/rails_with_static_assets/config/credentials.yml.enc +1 -0
- data/examples/rails_with_static_assets/config/database.yml +41 -0
- data/examples/rails_with_static_assets/config/deploy.yml +116 -0
- data/examples/rails_with_static_assets/config/environment.rb +5 -0
- data/examples/rails_with_static_assets/config/environments/development.rb +74 -0
- data/examples/rails_with_static_assets/config/environments/production.rb +90 -0
- data/examples/rails_with_static_assets/config/environments/test.rb +53 -0
- data/examples/rails_with_static_assets/config/importmap.rb +7 -0
- data/examples/rails_with_static_assets/config/initializers/assets.rb +7 -0
- data/examples/rails_with_static_assets/config/initializers/content_security_policy.rb +25 -0
- data/examples/rails_with_static_assets/config/initializers/filter_parameter_logging.rb +8 -0
- data/examples/rails_with_static_assets/config/initializers/inflections.rb +16 -0
- data/examples/rails_with_static_assets/config/locales/en.yml +31 -0
- data/examples/rails_with_static_assets/config/puma.rb +41 -0
- data/examples/rails_with_static_assets/config/queue.yml +18 -0
- data/examples/rails_with_static_assets/config/recurring.yml +10 -0
- data/examples/rails_with_static_assets/config/routes.rb +17 -0
- data/examples/rails_with_static_assets/config/storage.yml +34 -0
- data/examples/rails_with_static_assets/config.ru +6 -0
- data/examples/rails_with_static_assets/db/cable_schema.rb +11 -0
- data/examples/rails_with_static_assets/db/cache_schema.rb +14 -0
- data/examples/rails_with_static_assets/db/migrate/20250422211855_create_articles.rb +10 -0
- data/examples/rails_with_static_assets/db/queue_schema.rb +129 -0
- data/examples/rails_with_static_assets/db/schema.rb +20 -0
- data/examples/rails_with_static_assets/db/seeds.rb +9 -0
- data/examples/rails_with_static_assets/lib/tasks/.keep +0 -0
- data/examples/rails_with_static_assets/log/.keep +0 -0
- data/examples/rails_with_static_assets/public/400.html +114 -0
- data/examples/rails_with_static_assets/public/404.html +114 -0
- data/examples/rails_with_static_assets/public/406-unsupported-browser.html +114 -0
- data/examples/rails_with_static_assets/public/422.html +114 -0
- data/examples/rails_with_static_assets/public/500.html +114 -0
- data/examples/rails_with_static_assets/public/icon.png +0 -0
- data/examples/rails_with_static_assets/public/icon.svg +3 -0
- data/examples/rails_with_static_assets/public/robots.txt +1 -0
- data/examples/rails_with_static_assets/script/.keep +0 -0
- data/examples/rails_with_static_assets/storage/.keep +0 -0
- data/examples/rails_with_static_assets/test/application_system_test_case.rb +5 -0
- data/examples/rails_with_static_assets/test/controllers/.keep +0 -0
- data/examples/rails_with_static_assets/test/controllers/articles_controller_test.rb +48 -0
- data/examples/rails_with_static_assets/test/controllers/home_controller_test.rb +8 -0
- data/examples/rails_with_static_assets/test/fixtures/articles.yml +9 -0
- data/examples/rails_with_static_assets/test/fixtures/files/.keep +0 -0
- data/examples/rails_with_static_assets/test/helpers/.keep +0 -0
- data/examples/rails_with_static_assets/test/integration/.keep +0 -0
- data/examples/rails_with_static_assets/test/mailers/.keep +0 -0
- data/examples/rails_with_static_assets/test/models/.keep +0 -0
- data/examples/rails_with_static_assets/test/models/article_test.rb +7 -0
- data/examples/rails_with_static_assets/test/system/.keep +0 -0
- data/examples/rails_with_static_assets/test/system/articles_test.rb +43 -0
- data/examples/rails_with_static_assets/test/test_helper.rb +15 -0
- data/examples/rails_with_static_assets/tmp/.keep +0 -0
- data/examples/rails_with_static_assets/tmp/pids/.keep +0 -0
- data/examples/rails_with_static_assets/tmp/storage/.keep +0 -0
- data/examples/rails_with_static_assets/vendor/.keep +0 -0
- data/examples/rails_with_static_assets/vendor/javascript/.keep +0 -0
- data/examples/reverse_proxy/Itsi.rb +28 -0
- data/examples/reverse_proxy/README.md +14 -0
- data/examples/reverse_proxy/index.html +119 -0
- data/examples/reverse_proxy/rails_subapp/.dockerignore +51 -0
- data/examples/reverse_proxy/rails_subapp/.gitattributes +9 -0
- data/examples/reverse_proxy/rails_subapp/.github/dependabot.yml +12 -0
- data/examples/reverse_proxy/rails_subapp/.github/workflows/ci.yml +90 -0
- data/examples/reverse_proxy/rails_subapp/.gitignore +34 -0
- data/examples/reverse_proxy/rails_subapp/.kamal/hooks/docker-setup.sample +3 -0
- data/examples/reverse_proxy/rails_subapp/.kamal/hooks/post-app-boot.sample +3 -0
- data/examples/reverse_proxy/rails_subapp/.kamal/hooks/post-deploy.sample +14 -0
- data/examples/reverse_proxy/rails_subapp/.kamal/hooks/post-proxy-reboot.sample +3 -0
- data/examples/reverse_proxy/rails_subapp/.kamal/hooks/pre-app-boot.sample +3 -0
- data/examples/reverse_proxy/rails_subapp/.kamal/hooks/pre-build.sample +51 -0
- data/examples/reverse_proxy/rails_subapp/.kamal/hooks/pre-connect.sample +47 -0
- data/examples/reverse_proxy/rails_subapp/.kamal/hooks/pre-deploy.sample +109 -0
- data/examples/reverse_proxy/rails_subapp/.kamal/hooks/pre-proxy-reboot.sample +3 -0
- data/examples/reverse_proxy/rails_subapp/.kamal/secrets +17 -0
- data/examples/reverse_proxy/rails_subapp/.rubocop.yml +8 -0
- data/examples/reverse_proxy/rails_subapp/.ruby-version +1 -0
- data/examples/reverse_proxy/rails_subapp/Dockerfile +72 -0
- data/examples/reverse_proxy/rails_subapp/Gemfile +66 -0
- data/examples/reverse_proxy/rails_subapp/Gemfile.lock +416 -0
- data/examples/reverse_proxy/rails_subapp/README.md +24 -0
- data/examples/reverse_proxy/rails_subapp/Rakefile +6 -0
- data/examples/reverse_proxy/rails_subapp/app/assets/images/.keep +0 -0
- data/examples/reverse_proxy/rails_subapp/app/assets/stylesheets/application.css +161 -0
- data/examples/reverse_proxy/rails_subapp/app/controllers/application_controller.rb +4 -0
- data/examples/reverse_proxy/rails_subapp/app/controllers/articles_controller.rb +70 -0
- data/examples/reverse_proxy/rails_subapp/app/controllers/concerns/.keep +0 -0
- data/examples/reverse_proxy/rails_subapp/app/controllers/home_controller.rb +4 -0
- data/examples/reverse_proxy/rails_subapp/app/helpers/application_helper.rb +2 -0
- data/examples/reverse_proxy/rails_subapp/app/helpers/articles_helper.rb +2 -0
- data/examples/reverse_proxy/rails_subapp/app/helpers/home_helper.rb +2 -0
- data/examples/reverse_proxy/rails_subapp/app/javascript/application.js +3 -0
- data/examples/reverse_proxy/rails_subapp/app/javascript/controllers/application.js +9 -0
- data/examples/reverse_proxy/rails_subapp/app/javascript/controllers/hello_controller.js +7 -0
- data/examples/reverse_proxy/rails_subapp/app/javascript/controllers/index.js +4 -0
- data/examples/reverse_proxy/rails_subapp/app/jobs/application_job.rb +7 -0
- data/examples/reverse_proxy/rails_subapp/app/mailers/application_mailer.rb +4 -0
- data/examples/reverse_proxy/rails_subapp/app/models/application_record.rb +3 -0
- data/examples/reverse_proxy/rails_subapp/app/models/article.rb +2 -0
- data/examples/reverse_proxy/rails_subapp/app/models/concerns/.keep +0 -0
- data/examples/reverse_proxy/rails_subapp/app/views/articles/_article.html.erb +14 -0
- data/examples/reverse_proxy/rails_subapp/app/views/articles/_article.json.jbuilder +2 -0
- data/examples/reverse_proxy/rails_subapp/app/views/articles/_form.html.erb +30 -0
- data/examples/reverse_proxy/rails_subapp/app/views/articles/edit.html.erb +12 -0
- data/examples/reverse_proxy/rails_subapp/app/views/articles/index.html.erb +29 -0
- data/examples/reverse_proxy/rails_subapp/app/views/articles/index.json.jbuilder +1 -0
- data/examples/reverse_proxy/rails_subapp/app/views/articles/new.html.erb +11 -0
- data/examples/reverse_proxy/rails_subapp/app/views/articles/show.html.erb +10 -0
- data/examples/reverse_proxy/rails_subapp/app/views/articles/show.json.jbuilder +1 -0
- data/examples/reverse_proxy/rails_subapp/app/views/home/index.html.erb +8 -0
- data/examples/reverse_proxy/rails_subapp/app/views/layouts/application.html.erb +34 -0
- data/examples/reverse_proxy/rails_subapp/app/views/layouts/mailer.html.erb +13 -0
- data/examples/reverse_proxy/rails_subapp/app/views/layouts/mailer.text.erb +1 -0
- data/examples/reverse_proxy/rails_subapp/app/views/pwa/manifest.json.erb +22 -0
- data/examples/reverse_proxy/rails_subapp/app/views/pwa/service-worker.js +26 -0
- data/examples/reverse_proxy/rails_subapp/bin/brakeman +7 -0
- data/examples/reverse_proxy/rails_subapp/bin/bundle +109 -0
- data/examples/reverse_proxy/rails_subapp/bin/dev +2 -0
- data/examples/reverse_proxy/rails_subapp/bin/docker-entrypoint +14 -0
- data/examples/reverse_proxy/rails_subapp/bin/importmap +4 -0
- data/examples/reverse_proxy/rails_subapp/bin/jobs +6 -0
- data/examples/reverse_proxy/rails_subapp/bin/kamal +27 -0
- data/examples/reverse_proxy/rails_subapp/bin/rails +4 -0
- data/examples/reverse_proxy/rails_subapp/bin/rake +4 -0
- data/examples/reverse_proxy/rails_subapp/bin/rubocop +8 -0
- data/examples/reverse_proxy/rails_subapp/bin/setup +34 -0
- data/examples/reverse_proxy/rails_subapp/bin/thrust +5 -0
- data/examples/reverse_proxy/rails_subapp/config/application.rb +26 -0
- data/examples/reverse_proxy/rails_subapp/config/boot.rb +4 -0
- data/examples/reverse_proxy/rails_subapp/config/cable.yml +17 -0
- data/examples/reverse_proxy/rails_subapp/config/cache.yml +16 -0
- data/examples/reverse_proxy/rails_subapp/config/credentials.yml.enc +1 -0
- data/examples/reverse_proxy/rails_subapp/config/database.yml +41 -0
- data/examples/reverse_proxy/rails_subapp/config/deploy.yml +116 -0
- data/examples/reverse_proxy/rails_subapp/config/environment.rb +5 -0
- data/examples/reverse_proxy/rails_subapp/config/environments/development.rb +72 -0
- data/examples/reverse_proxy/rails_subapp/config/environments/production.rb +90 -0
- data/examples/reverse_proxy/rails_subapp/config/environments/test.rb +53 -0
- data/examples/reverse_proxy/rails_subapp/config/importmap.rb +7 -0
- data/examples/reverse_proxy/rails_subapp/config/initializers/assets.rb +7 -0
- data/examples/reverse_proxy/rails_subapp/config/initializers/content_security_policy.rb +25 -0
- data/examples/reverse_proxy/rails_subapp/config/initializers/filter_parameter_logging.rb +8 -0
- data/examples/reverse_proxy/rails_subapp/config/initializers/inflections.rb +16 -0
- data/examples/reverse_proxy/rails_subapp/config/locales/en.yml +31 -0
- data/examples/reverse_proxy/rails_subapp/config/puma.rb +41 -0
- data/examples/reverse_proxy/rails_subapp/config/queue.yml +18 -0
- data/examples/reverse_proxy/rails_subapp/config/recurring.yml +10 -0
- data/examples/reverse_proxy/rails_subapp/config/routes.rb +17 -0
- data/examples/reverse_proxy/rails_subapp/config/storage.yml +34 -0
- data/examples/reverse_proxy/rails_subapp/config.ru +6 -0
- data/examples/reverse_proxy/rails_subapp/db/cable_schema.rb +11 -0
- data/examples/reverse_proxy/rails_subapp/db/cache_schema.rb +14 -0
- data/examples/reverse_proxy/rails_subapp/db/migrate/20250422211855_create_articles.rb +10 -0
- data/examples/reverse_proxy/rails_subapp/db/queue_schema.rb +129 -0
- data/examples/reverse_proxy/rails_subapp/db/schema.rb +20 -0
- data/examples/reverse_proxy/rails_subapp/db/seeds.rb +9 -0
- data/examples/reverse_proxy/rails_subapp/lib/tasks/.keep +0 -0
- data/examples/reverse_proxy/rails_subapp/log/.keep +0 -0
- data/examples/reverse_proxy/rails_subapp/public/400.html +114 -0
- data/examples/reverse_proxy/rails_subapp/public/404.html +114 -0
- data/examples/reverse_proxy/rails_subapp/public/406-unsupported-browser.html +114 -0
- data/examples/reverse_proxy/rails_subapp/public/422.html +114 -0
- data/examples/reverse_proxy/rails_subapp/public/500.html +114 -0
- data/examples/reverse_proxy/rails_subapp/public/icon.png +0 -0
- data/examples/reverse_proxy/rails_subapp/public/icon.svg +3 -0
- data/examples/reverse_proxy/rails_subapp/public/robots.txt +1 -0
- data/examples/reverse_proxy/rails_subapp/script/.keep +0 -0
- data/examples/reverse_proxy/rails_subapp/storage/.keep +0 -0
- data/examples/reverse_proxy/rails_subapp/test/application_system_test_case.rb +5 -0
- data/examples/reverse_proxy/rails_subapp/test/controllers/.keep +0 -0
- data/examples/reverse_proxy/rails_subapp/test/controllers/articles_controller_test.rb +48 -0
- data/examples/reverse_proxy/rails_subapp/test/controllers/home_controller_test.rb +8 -0
- data/examples/reverse_proxy/rails_subapp/test/fixtures/articles.yml +9 -0
- data/examples/reverse_proxy/rails_subapp/test/fixtures/files/.keep +0 -0
- data/examples/reverse_proxy/rails_subapp/test/helpers/.keep +0 -0
- data/examples/reverse_proxy/rails_subapp/test/integration/.keep +0 -0
- data/examples/reverse_proxy/rails_subapp/test/mailers/.keep +0 -0
- data/examples/reverse_proxy/rails_subapp/test/models/.keep +0 -0
- data/examples/reverse_proxy/rails_subapp/test/models/article_test.rb +7 -0
- data/examples/reverse_proxy/rails_subapp/test/system/.keep +0 -0
- data/examples/reverse_proxy/rails_subapp/test/system/articles_test.rb +43 -0
- data/examples/reverse_proxy/rails_subapp/test/test_helper.rb +15 -0
- data/examples/reverse_proxy/rails_subapp/tmp/.keep +0 -0
- data/examples/reverse_proxy/rails_subapp/tmp/pids/.keep +0 -0
- data/examples/reverse_proxy/rails_subapp/tmp/storage/.keep +0 -0
- data/examples/reverse_proxy/rails_subapp/vendor/.keep +0 -0
- data/examples/reverse_proxy/rails_subapp/vendor/javascript/.keep +0 -0
- data/examples/reverse_proxy/sinatra_subapp/Gemfile +2 -0
- data/examples/reverse_proxy/sinatra_subapp/Gemfile.lock +46 -0
- data/examples/reverse_proxy/sinatra_subapp/config.ru +2 -0
- data/examples/reverse_proxy/sinatra_subapp/my_app.rb +96 -0
- data/examples/simple_api/Itsi.rb +127 -0
- data/examples/simple_api_no_schema/Itsi.rb +86 -0
- data/examples/spa/Itsi.rb +5 -0
- data/examples/spa/README.md +3 -0
- data/examples/spa/dist/assets/index-2cf7be43.js +40 -0
- data/examples/spa/dist/index.html +13 -0
- data/examples/spa/index.html +12 -0
- data/examples/spa/package-lock.json +1265 -0
- data/examples/spa/package.json +18 -0
- data/examples/spa/src/App.jsx +49 -0
- data/examples/spa/src/main.jsx +6 -0
- data/examples/spa/src/pages/About.jsx +9 -0
- data/examples/spa/src/pages/Home.jsx +9 -0
- data/examples/spa/vite.config.js +9 -0
- data/gems/scheduler/Cargo.lock +1 -1
- data/gems/scheduler/lib/itsi/scheduler/version.rb +1 -1
- data/gems/server/Cargo.lock +1 -1
- data/gems/server/lib/itsi/server/config/dsl.rb +2 -2
- data/gems/server/lib/itsi/server/config/middleware/endpoint/endpoint.rb +0 -4
- data/gems/server/lib/itsi/server/config/middleware/location.rb +25 -21
- data/gems/server/lib/itsi/server/config/middleware/proxy.rb +15 -14
- data/gems/server/lib/itsi/server/config/middleware/rackup_file.rb +7 -10
- data/gems/server/lib/itsi/server/config/middleware/static_assets.rb +8 -4
- data/gems/server/lib/itsi/server/config/middleware/string_rewrite.md +14 -0
- data/gems/server/lib/itsi/server/config/options/include.rb +1 -1
- data/gems/server/lib/itsi/server/rack_interface.rb +1 -1
- data/gems/server/lib/itsi/server/route_tester.rb +1 -1
- data/gems/server/lib/itsi/server/typed_handlers/param_parser.rb +25 -0
- data/gems/server/lib/itsi/server/version.rb +1 -1
- data/gems/server/lib/itsi/server.rb +1 -1
- data/gems/server/test/middleware/static_assets.rb +6 -4
- data/gems/server/test/middleware/string_rewrite.rb +54 -0
- data/gems/server/test/middleware/test_log_requests.rb +13 -1
- data/lib/itsi/version.rb +1 -1
- metadata +431 -5
@@ -0,0 +1,416 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../../gems/server
|
3
|
+
specs:
|
4
|
+
itsi-server (0.2.4)
|
5
|
+
json (~> 2)
|
6
|
+
rack (>= 1.6)
|
7
|
+
rb_sys (~> 0.9.91)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
actioncable (8.0.2)
|
13
|
+
actionpack (= 8.0.2)
|
14
|
+
activesupport (= 8.0.2)
|
15
|
+
nio4r (~> 2.0)
|
16
|
+
websocket-driver (>= 0.6.1)
|
17
|
+
zeitwerk (~> 2.6)
|
18
|
+
actionmailbox (8.0.2)
|
19
|
+
actionpack (= 8.0.2)
|
20
|
+
activejob (= 8.0.2)
|
21
|
+
activerecord (= 8.0.2)
|
22
|
+
activestorage (= 8.0.2)
|
23
|
+
activesupport (= 8.0.2)
|
24
|
+
mail (>= 2.8.0)
|
25
|
+
actionmailer (8.0.2)
|
26
|
+
actionpack (= 8.0.2)
|
27
|
+
actionview (= 8.0.2)
|
28
|
+
activejob (= 8.0.2)
|
29
|
+
activesupport (= 8.0.2)
|
30
|
+
mail (>= 2.8.0)
|
31
|
+
rails-dom-testing (~> 2.2)
|
32
|
+
actionpack (8.0.2)
|
33
|
+
actionview (= 8.0.2)
|
34
|
+
activesupport (= 8.0.2)
|
35
|
+
nokogiri (>= 1.8.5)
|
36
|
+
rack (>= 2.2.4)
|
37
|
+
rack-session (>= 1.0.1)
|
38
|
+
rack-test (>= 0.6.3)
|
39
|
+
rails-dom-testing (~> 2.2)
|
40
|
+
rails-html-sanitizer (~> 1.6)
|
41
|
+
useragent (~> 0.16)
|
42
|
+
actiontext (8.0.2)
|
43
|
+
actionpack (= 8.0.2)
|
44
|
+
activerecord (= 8.0.2)
|
45
|
+
activestorage (= 8.0.2)
|
46
|
+
activesupport (= 8.0.2)
|
47
|
+
globalid (>= 0.6.0)
|
48
|
+
nokogiri (>= 1.8.5)
|
49
|
+
actionview (8.0.2)
|
50
|
+
activesupport (= 8.0.2)
|
51
|
+
builder (~> 3.1)
|
52
|
+
erubi (~> 1.11)
|
53
|
+
rails-dom-testing (~> 2.2)
|
54
|
+
rails-html-sanitizer (~> 1.6)
|
55
|
+
activejob (8.0.2)
|
56
|
+
activesupport (= 8.0.2)
|
57
|
+
globalid (>= 0.3.6)
|
58
|
+
activemodel (8.0.2)
|
59
|
+
activesupport (= 8.0.2)
|
60
|
+
activerecord (8.0.2)
|
61
|
+
activemodel (= 8.0.2)
|
62
|
+
activesupport (= 8.0.2)
|
63
|
+
timeout (>= 0.4.0)
|
64
|
+
activestorage (8.0.2)
|
65
|
+
actionpack (= 8.0.2)
|
66
|
+
activejob (= 8.0.2)
|
67
|
+
activerecord (= 8.0.2)
|
68
|
+
activesupport (= 8.0.2)
|
69
|
+
marcel (~> 1.0)
|
70
|
+
activesupport (8.0.2)
|
71
|
+
base64
|
72
|
+
benchmark (>= 0.3)
|
73
|
+
bigdecimal
|
74
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
75
|
+
connection_pool (>= 2.2.5)
|
76
|
+
drb
|
77
|
+
i18n (>= 1.6, < 2)
|
78
|
+
logger (>= 1.4.2)
|
79
|
+
minitest (>= 5.1)
|
80
|
+
securerandom (>= 0.3)
|
81
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
82
|
+
uri (>= 0.13.1)
|
83
|
+
addressable (2.8.7)
|
84
|
+
public_suffix (>= 2.0.2, < 7.0)
|
85
|
+
ast (2.4.3)
|
86
|
+
base64 (0.2.0)
|
87
|
+
bcrypt_pbkdf (1.1.1)
|
88
|
+
benchmark (0.4.0)
|
89
|
+
bigdecimal (3.1.9)
|
90
|
+
bindex (0.8.1)
|
91
|
+
bootsnap (1.18.4)
|
92
|
+
msgpack (~> 1.2)
|
93
|
+
brakeman (7.0.2)
|
94
|
+
racc
|
95
|
+
builder (3.3.0)
|
96
|
+
capybara (3.40.0)
|
97
|
+
addressable
|
98
|
+
matrix
|
99
|
+
mini_mime (>= 0.1.3)
|
100
|
+
nokogiri (~> 1.11)
|
101
|
+
rack (>= 1.6.0)
|
102
|
+
rack-test (>= 0.6.3)
|
103
|
+
regexp_parser (>= 1.5, < 3.0)
|
104
|
+
xpath (~> 3.2)
|
105
|
+
concurrent-ruby (1.3.5)
|
106
|
+
connection_pool (2.5.1)
|
107
|
+
crass (1.0.6)
|
108
|
+
date (3.4.1)
|
109
|
+
debug (1.10.0)
|
110
|
+
irb (~> 1.10)
|
111
|
+
reline (>= 0.3.8)
|
112
|
+
dotenv (3.1.8)
|
113
|
+
drb (2.2.1)
|
114
|
+
ed25519 (1.3.0)
|
115
|
+
erubi (1.13.1)
|
116
|
+
et-orbi (1.2.11)
|
117
|
+
tzinfo
|
118
|
+
fugit (1.11.1)
|
119
|
+
et-orbi (~> 1, >= 1.2.11)
|
120
|
+
raabro (~> 1.4)
|
121
|
+
globalid (1.2.1)
|
122
|
+
activesupport (>= 6.1)
|
123
|
+
i18n (1.14.7)
|
124
|
+
concurrent-ruby (~> 1.0)
|
125
|
+
importmap-rails (2.1.0)
|
126
|
+
actionpack (>= 6.0.0)
|
127
|
+
activesupport (>= 6.0.0)
|
128
|
+
railties (>= 6.0.0)
|
129
|
+
io-console (0.8.0)
|
130
|
+
irb (1.15.2)
|
131
|
+
pp (>= 0.6.0)
|
132
|
+
rdoc (>= 4.0.0)
|
133
|
+
reline (>= 0.4.2)
|
134
|
+
jbuilder (2.13.0)
|
135
|
+
actionview (>= 5.0.0)
|
136
|
+
activesupport (>= 5.0.0)
|
137
|
+
json (2.10.2)
|
138
|
+
kamal (2.5.3)
|
139
|
+
activesupport (>= 7.0)
|
140
|
+
base64 (~> 0.2)
|
141
|
+
bcrypt_pbkdf (~> 1.0)
|
142
|
+
concurrent-ruby (~> 1.2)
|
143
|
+
dotenv (~> 3.1)
|
144
|
+
ed25519 (~> 1.2)
|
145
|
+
net-ssh (~> 7.3)
|
146
|
+
sshkit (>= 1.23.0, < 2.0)
|
147
|
+
thor (~> 1.3)
|
148
|
+
zeitwerk (>= 2.6.18, < 3.0)
|
149
|
+
language_server-protocol (3.17.0.4)
|
150
|
+
lint_roller (1.1.0)
|
151
|
+
logger (1.7.0)
|
152
|
+
loofah (2.24.0)
|
153
|
+
crass (~> 1.0.2)
|
154
|
+
nokogiri (>= 1.12.0)
|
155
|
+
mail (2.8.1)
|
156
|
+
mini_mime (>= 0.1.1)
|
157
|
+
net-imap
|
158
|
+
net-pop
|
159
|
+
net-smtp
|
160
|
+
marcel (1.0.4)
|
161
|
+
matrix (0.4.2)
|
162
|
+
mini_mime (1.1.5)
|
163
|
+
minitest (5.25.5)
|
164
|
+
msgpack (1.8.0)
|
165
|
+
mustermann (3.0.3)
|
166
|
+
ruby2_keywords (~> 0.0.1)
|
167
|
+
net-imap (0.5.7)
|
168
|
+
date
|
169
|
+
net-protocol
|
170
|
+
net-pop (0.1.2)
|
171
|
+
net-protocol
|
172
|
+
net-protocol (0.2.2)
|
173
|
+
timeout
|
174
|
+
net-scp (4.1.0)
|
175
|
+
net-ssh (>= 2.6.5, < 8.0.0)
|
176
|
+
net-sftp (4.0.0)
|
177
|
+
net-ssh (>= 5.0.0, < 8.0.0)
|
178
|
+
net-smtp (0.5.1)
|
179
|
+
net-protocol
|
180
|
+
net-ssh (7.3.0)
|
181
|
+
nio4r (2.7.4)
|
182
|
+
nokogiri (1.18.8-aarch64-linux-gnu)
|
183
|
+
racc (~> 1.4)
|
184
|
+
nokogiri (1.18.8-aarch64-linux-musl)
|
185
|
+
racc (~> 1.4)
|
186
|
+
nokogiri (1.18.8-arm-linux-gnu)
|
187
|
+
racc (~> 1.4)
|
188
|
+
nokogiri (1.18.8-arm-linux-musl)
|
189
|
+
racc (~> 1.4)
|
190
|
+
nokogiri (1.18.8-arm64-darwin)
|
191
|
+
racc (~> 1.4)
|
192
|
+
nokogiri (1.18.8-x86_64-linux-gnu)
|
193
|
+
racc (~> 1.4)
|
194
|
+
nokogiri (1.18.8-x86_64-linux-musl)
|
195
|
+
racc (~> 1.4)
|
196
|
+
ostruct (0.6.1)
|
197
|
+
parallel (1.27.0)
|
198
|
+
parser (3.3.8.0)
|
199
|
+
ast (~> 2.4.1)
|
200
|
+
racc
|
201
|
+
pp (0.6.2)
|
202
|
+
prettyprint
|
203
|
+
prettyprint (0.2.0)
|
204
|
+
prism (1.4.0)
|
205
|
+
propshaft (1.1.0)
|
206
|
+
actionpack (>= 7.0.0)
|
207
|
+
activesupport (>= 7.0.0)
|
208
|
+
rack
|
209
|
+
railties (>= 7.0.0)
|
210
|
+
psych (5.2.3)
|
211
|
+
date
|
212
|
+
stringio
|
213
|
+
public_suffix (6.0.1)
|
214
|
+
puma (6.6.0)
|
215
|
+
nio4r (~> 2.0)
|
216
|
+
raabro (1.4.0)
|
217
|
+
racc (1.8.1)
|
218
|
+
rack (3.1.13)
|
219
|
+
rack-protection (4.1.1)
|
220
|
+
base64 (>= 0.1.0)
|
221
|
+
logger (>= 1.6.0)
|
222
|
+
rack (>= 3.0.0, < 4)
|
223
|
+
rack-session (2.1.0)
|
224
|
+
base64 (>= 0.1.0)
|
225
|
+
rack (>= 3.0.0)
|
226
|
+
rack-test (2.2.0)
|
227
|
+
rack (>= 1.3)
|
228
|
+
rackup (2.2.1)
|
229
|
+
rack (>= 3)
|
230
|
+
rails (8.0.2)
|
231
|
+
actioncable (= 8.0.2)
|
232
|
+
actionmailbox (= 8.0.2)
|
233
|
+
actionmailer (= 8.0.2)
|
234
|
+
actionpack (= 8.0.2)
|
235
|
+
actiontext (= 8.0.2)
|
236
|
+
actionview (= 8.0.2)
|
237
|
+
activejob (= 8.0.2)
|
238
|
+
activemodel (= 8.0.2)
|
239
|
+
activerecord (= 8.0.2)
|
240
|
+
activestorage (= 8.0.2)
|
241
|
+
activesupport (= 8.0.2)
|
242
|
+
bundler (>= 1.15.0)
|
243
|
+
railties (= 8.0.2)
|
244
|
+
rails-dom-testing (2.2.0)
|
245
|
+
activesupport (>= 5.0.0)
|
246
|
+
minitest
|
247
|
+
nokogiri (>= 1.6)
|
248
|
+
rails-html-sanitizer (1.6.2)
|
249
|
+
loofah (~> 2.21)
|
250
|
+
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)
|
251
|
+
railties (8.0.2)
|
252
|
+
actionpack (= 8.0.2)
|
253
|
+
activesupport (= 8.0.2)
|
254
|
+
irb (~> 1.13)
|
255
|
+
rackup (>= 1.0.0)
|
256
|
+
rake (>= 12.2)
|
257
|
+
thor (~> 1.0, >= 1.2.2)
|
258
|
+
zeitwerk (~> 2.6)
|
259
|
+
rainbow (3.1.1)
|
260
|
+
rake (13.2.1)
|
261
|
+
rake-compiler-dock (1.9.1)
|
262
|
+
rb_sys (0.9.111)
|
263
|
+
rake-compiler-dock (= 1.9.1)
|
264
|
+
rdoc (6.13.1)
|
265
|
+
psych (>= 4.0.0)
|
266
|
+
regexp_parser (2.10.0)
|
267
|
+
reline (0.6.1)
|
268
|
+
io-console (~> 0.5)
|
269
|
+
rexml (3.4.1)
|
270
|
+
rubocop (1.75.3)
|
271
|
+
json (~> 2.3)
|
272
|
+
language_server-protocol (~> 3.17.0.2)
|
273
|
+
lint_roller (~> 1.1.0)
|
274
|
+
parallel (~> 1.10)
|
275
|
+
parser (>= 3.3.0.2)
|
276
|
+
rainbow (>= 2.2.2, < 4.0)
|
277
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
278
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
279
|
+
ruby-progressbar (~> 1.7)
|
280
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
281
|
+
rubocop-ast (1.44.1)
|
282
|
+
parser (>= 3.3.7.2)
|
283
|
+
prism (~> 1.4)
|
284
|
+
rubocop-performance (1.25.0)
|
285
|
+
lint_roller (~> 1.1)
|
286
|
+
rubocop (>= 1.75.0, < 2.0)
|
287
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
288
|
+
rubocop-rails (2.31.0)
|
289
|
+
activesupport (>= 4.2.0)
|
290
|
+
lint_roller (~> 1.1)
|
291
|
+
rack (>= 1.1)
|
292
|
+
rubocop (>= 1.75.0, < 2.0)
|
293
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
294
|
+
rubocop-rails-omakase (1.1.0)
|
295
|
+
rubocop (>= 1.72)
|
296
|
+
rubocop-performance (>= 1.24)
|
297
|
+
rubocop-rails (>= 2.30)
|
298
|
+
ruby-progressbar (1.13.0)
|
299
|
+
ruby2_keywords (0.0.5)
|
300
|
+
rubyzip (2.4.1)
|
301
|
+
securerandom (0.4.1)
|
302
|
+
selenium-webdriver (4.31.0)
|
303
|
+
base64 (~> 0.2)
|
304
|
+
logger (~> 1.4)
|
305
|
+
rexml (~> 3.2, >= 3.2.5)
|
306
|
+
rubyzip (>= 1.2.2, < 3.0)
|
307
|
+
websocket (~> 1.0)
|
308
|
+
sinatra (4.1.1)
|
309
|
+
logger (>= 1.6.0)
|
310
|
+
mustermann (~> 3.0)
|
311
|
+
rack (>= 3.0.0, < 4)
|
312
|
+
rack-protection (= 4.1.1)
|
313
|
+
rack-session (>= 2.0.0, < 3)
|
314
|
+
tilt (~> 2.0)
|
315
|
+
solid_cable (3.0.7)
|
316
|
+
actioncable (>= 7.2)
|
317
|
+
activejob (>= 7.2)
|
318
|
+
activerecord (>= 7.2)
|
319
|
+
railties (>= 7.2)
|
320
|
+
solid_cache (1.0.7)
|
321
|
+
activejob (>= 7.2)
|
322
|
+
activerecord (>= 7.2)
|
323
|
+
railties (>= 7.2)
|
324
|
+
solid_queue (1.1.5)
|
325
|
+
activejob (>= 7.1)
|
326
|
+
activerecord (>= 7.1)
|
327
|
+
concurrent-ruby (>= 1.3.1)
|
328
|
+
fugit (~> 1.11.0)
|
329
|
+
railties (>= 7.1)
|
330
|
+
thor (~> 1.3.1)
|
331
|
+
sqlite3 (2.6.0-aarch64-linux-gnu)
|
332
|
+
sqlite3 (2.6.0-aarch64-linux-musl)
|
333
|
+
sqlite3 (2.6.0-arm-linux-gnu)
|
334
|
+
sqlite3 (2.6.0-arm-linux-musl)
|
335
|
+
sqlite3 (2.6.0-arm64-darwin)
|
336
|
+
sqlite3 (2.6.0-x86_64-linux-gnu)
|
337
|
+
sqlite3 (2.6.0-x86_64-linux-musl)
|
338
|
+
sshkit (1.24.0)
|
339
|
+
base64
|
340
|
+
logger
|
341
|
+
net-scp (>= 1.1.2)
|
342
|
+
net-sftp (>= 2.1.2)
|
343
|
+
net-ssh (>= 2.8.0)
|
344
|
+
ostruct
|
345
|
+
stimulus-rails (1.3.4)
|
346
|
+
railties (>= 6.0.0)
|
347
|
+
stringio (3.1.7)
|
348
|
+
thor (1.3.2)
|
349
|
+
thruster (0.1.13)
|
350
|
+
thruster (0.1.13-aarch64-linux)
|
351
|
+
thruster (0.1.13-arm64-darwin)
|
352
|
+
thruster (0.1.13-x86_64-linux)
|
353
|
+
tilt (2.6.0)
|
354
|
+
timeout (0.4.3)
|
355
|
+
turbo-rails (2.0.13)
|
356
|
+
actionpack (>= 7.1.0)
|
357
|
+
railties (>= 7.1.0)
|
358
|
+
tzinfo (2.0.6)
|
359
|
+
concurrent-ruby (~> 1.0)
|
360
|
+
unicode-display_width (3.1.4)
|
361
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
362
|
+
unicode-emoji (4.0.4)
|
363
|
+
uri (1.0.3)
|
364
|
+
useragent (0.16.11)
|
365
|
+
web-console (4.2.1)
|
366
|
+
actionview (>= 6.0.0)
|
367
|
+
activemodel (>= 6.0.0)
|
368
|
+
bindex (>= 0.4.0)
|
369
|
+
railties (>= 6.0.0)
|
370
|
+
websocket (1.2.11)
|
371
|
+
websocket-driver (0.7.7)
|
372
|
+
base64
|
373
|
+
websocket-extensions (>= 0.1.0)
|
374
|
+
websocket-extensions (0.1.5)
|
375
|
+
xpath (3.2.0)
|
376
|
+
nokogiri (~> 1.8)
|
377
|
+
zeitwerk (2.7.2)
|
378
|
+
|
379
|
+
PLATFORMS
|
380
|
+
aarch64-linux
|
381
|
+
aarch64-linux-gnu
|
382
|
+
aarch64-linux-musl
|
383
|
+
arm-linux-gnu
|
384
|
+
arm-linux-musl
|
385
|
+
arm64-darwin-23
|
386
|
+
x86_64-linux
|
387
|
+
x86_64-linux-gnu
|
388
|
+
x86_64-linux-musl
|
389
|
+
|
390
|
+
DEPENDENCIES
|
391
|
+
bootsnap
|
392
|
+
brakeman
|
393
|
+
capybara
|
394
|
+
debug
|
395
|
+
importmap-rails
|
396
|
+
itsi-server!
|
397
|
+
jbuilder
|
398
|
+
kamal
|
399
|
+
propshaft
|
400
|
+
puma (>= 5.0)
|
401
|
+
rails (~> 8.0.2)
|
402
|
+
rubocop-rails-omakase
|
403
|
+
selenium-webdriver
|
404
|
+
sinatra
|
405
|
+
solid_cable
|
406
|
+
solid_cache
|
407
|
+
solid_queue
|
408
|
+
sqlite3 (>= 2.1)
|
409
|
+
stimulus-rails
|
410
|
+
thruster
|
411
|
+
turbo-rails
|
412
|
+
tzinfo-data
|
413
|
+
web-console
|
414
|
+
|
415
|
+
BUNDLED WITH
|
416
|
+
2.6.7
|
@@ -0,0 +1,10 @@
|
|
1
|
+
auto_reload_config! # Auto-reload the server configuration each time it changes.
|
2
|
+
|
3
|
+
# Everything under /assets/* gets intercepted by our static file server *before* it gets to Rails.
|
4
|
+
# We use not_found_behaviour: "fallthrough" to fall through to Rails static file serving, if
|
5
|
+
# the file isn't found.
|
6
|
+
location "assets*" do
|
7
|
+
static_assets root_dir: "./public", not_found_behavior: "fallthrough", relative_path: false
|
8
|
+
end
|
9
|
+
|
10
|
+
rackup_file "config.ru"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
## Rails Static Assets
|
2
|
+
This example demonstrates how you can combine Rails with Itsi's static asset serving capabilities to offload
|
3
|
+
static assets from Ruby while still running only a single process.
|
4
|
+
|
5
|
+
Try and precompile the assets (doing this in development is fine for testing), and testing the difference in performance
|
6
|
+
by commenting/uncommenting the static assets block at the top of the Itsi.rb file
|
7
|
+
and for e.g.
|
8
|
+
|
9
|
+
running
|
10
|
+
|
11
|
+
```bash
|
12
|
+
# Name of signed asset may changed based on contents
|
13
|
+
wrk http://127.0.0.1:3000/assets/controllers/application-3affb389.js
|
14
|
+
```
|
File without changes
|
@@ -0,0 +1,161 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css.
|
3
|
+
*
|
4
|
+
* With Propshaft, assets are served efficiently without preprocessing steps. You can still include
|
5
|
+
* application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
|
6
|
+
* cascading order, meaning styles declared later in the document or manifest will override earlier ones,
|
7
|
+
* depending on specificity.
|
8
|
+
*
|
9
|
+
* Consider organizing styles into separate files for maintainability.
|
10
|
+
*/
|
11
|
+
/* === Variables & Base === */
|
12
|
+
/* === RESET & BASE === */
|
13
|
+
*,
|
14
|
+
*::before,
|
15
|
+
*::after {
|
16
|
+
box-sizing: border-box;
|
17
|
+
margin: 0;
|
18
|
+
padding: 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
html {
|
22
|
+
font-size: 16px;
|
23
|
+
scroll-behavior: smooth;
|
24
|
+
}
|
25
|
+
|
26
|
+
body {
|
27
|
+
font-family:
|
28
|
+
"Inter",
|
29
|
+
system-ui,
|
30
|
+
-apple-system,
|
31
|
+
sans-serif;
|
32
|
+
line-height: 1.6;
|
33
|
+
color: #333;
|
34
|
+
background: #f4f6f8;
|
35
|
+
}
|
36
|
+
|
37
|
+
/* === LAYOUT GRID === */
|
38
|
+
.container {
|
39
|
+
max-width: 720px;
|
40
|
+
margin: 0 auto;
|
41
|
+
padding: 2rem 1rem;
|
42
|
+
}
|
43
|
+
|
44
|
+
/* === NAVBAR === */
|
45
|
+
.navbar {
|
46
|
+
background: #fff;
|
47
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
48
|
+
}
|
49
|
+
.navbar .brand {
|
50
|
+
font-weight: 600;
|
51
|
+
font-size: 1.25rem;
|
52
|
+
}
|
53
|
+
.navbar .nav-links a {
|
54
|
+
margin-left: 1rem;
|
55
|
+
font-weight: 500;
|
56
|
+
color: #555;
|
57
|
+
}
|
58
|
+
.navbar .nav-links a:hover {
|
59
|
+
color: #000;
|
60
|
+
}
|
61
|
+
|
62
|
+
/* === CARDS === */
|
63
|
+
.card {
|
64
|
+
background: #fff;
|
65
|
+
border-radius: 8px;
|
66
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
67
|
+
padding: 2rem;
|
68
|
+
margin-bottom: 2rem;
|
69
|
+
}
|
70
|
+
|
71
|
+
/* === BUTTONS === */
|
72
|
+
.btn {
|
73
|
+
display: inline-block;
|
74
|
+
font-weight: 500;
|
75
|
+
text-decoration: none;
|
76
|
+
text-align: center;
|
77
|
+
padding: 0.2rem 1.2rem;
|
78
|
+
border-radius: 6px;
|
79
|
+
transition:
|
80
|
+
background 0.2s,
|
81
|
+
box-shadow 0.2s,
|
82
|
+
transform 0.1s;
|
83
|
+
margin: 2px;
|
84
|
+
}
|
85
|
+
.btn-primary {
|
86
|
+
background: #2f8fed;
|
87
|
+
color: #fff;
|
88
|
+
}
|
89
|
+
.btn-primary:hover {
|
90
|
+
background: #256ec2;
|
91
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
92
|
+
transform: translateY(-1px);
|
93
|
+
}
|
94
|
+
.btn-secondary {
|
95
|
+
background: #e0e4e8;
|
96
|
+
color: #333;
|
97
|
+
}
|
98
|
+
.btn-secondary:hover {
|
99
|
+
background: #c5c9cc;
|
100
|
+
}
|
101
|
+
|
102
|
+
/* === TABLE === */
|
103
|
+
.table {
|
104
|
+
width: 100%;
|
105
|
+
border-collapse: collapse;
|
106
|
+
margin-top: 1rem;
|
107
|
+
}
|
108
|
+
.table thead {
|
109
|
+
background: #f0f2f5;
|
110
|
+
}
|
111
|
+
.table th,
|
112
|
+
.table td {
|
113
|
+
padding: 0.75rem 1rem;
|
114
|
+
text-align: left;
|
115
|
+
border-bottom: 1px solid #e0e2e5;
|
116
|
+
}
|
117
|
+
.table tbody tr:hover {
|
118
|
+
background: #fafbfd;
|
119
|
+
}
|
120
|
+
|
121
|
+
/* === FORMS === */
|
122
|
+
.form-group {
|
123
|
+
margin-bottom: 1.5rem;
|
124
|
+
}
|
125
|
+
.form-group label {
|
126
|
+
display: block;
|
127
|
+
margin-bottom: 0.5rem;
|
128
|
+
font-weight: 500;
|
129
|
+
}
|
130
|
+
.form-control {
|
131
|
+
width: 100%;
|
132
|
+
padding: 0.6rem 0.75rem;
|
133
|
+
border: 1px solid #ccd0d5;
|
134
|
+
border-radius: 6px;
|
135
|
+
font: inherit;
|
136
|
+
transition:
|
137
|
+
border-color 0.2s,
|
138
|
+
box-shadow 0.2s;
|
139
|
+
}
|
140
|
+
.form-control:focus {
|
141
|
+
border-color: #2f8fed;
|
142
|
+
box-shadow: 0 0 0 3px rgba(47, 142, 237, 0.2);
|
143
|
+
outline: none;
|
144
|
+
}
|
145
|
+
|
146
|
+
/* === FLASH MESSAGES === */
|
147
|
+
.flash {
|
148
|
+
padding: 1rem 1.5rem;
|
149
|
+
border-radius: 6px;
|
150
|
+
margin-bottom: 2rem;
|
151
|
+
font-weight: 500;
|
152
|
+
}
|
153
|
+
.flash.notice {
|
154
|
+
background: #e6f7ff;
|
155
|
+
color: #3178c6;
|
156
|
+
}
|
157
|
+
.flash.alert {
|
158
|
+
background: #ffebe8;
|
159
|
+
color: #c62828;
|
160
|
+
border: 1px solid #f2a9a4;
|
161
|
+
}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
class ArticlesController < ApplicationController
|
2
|
+
before_action :set_article, only: %i[ show edit update destroy ]
|
3
|
+
|
4
|
+
# GET /articles or /articles.json
|
5
|
+
def index
|
6
|
+
@articles = Article.all
|
7
|
+
end
|
8
|
+
|
9
|
+
# GET /articles/1 or /articles/1.json
|
10
|
+
def show
|
11
|
+
end
|
12
|
+
|
13
|
+
# GET /articles/new
|
14
|
+
def new
|
15
|
+
@article = Article.new
|
16
|
+
end
|
17
|
+
|
18
|
+
# GET /articles/1/edit
|
19
|
+
def edit
|
20
|
+
end
|
21
|
+
|
22
|
+
# POST /articles or /articles.json
|
23
|
+
def create
|
24
|
+
@article = Article.new(article_params)
|
25
|
+
|
26
|
+
respond_to do |format|
|
27
|
+
if @article.save
|
28
|
+
format.html { redirect_to @article, notice: "Article was successfully created." }
|
29
|
+
format.json { render :show, status: :created, location: @article }
|
30
|
+
else
|
31
|
+
format.html { render :new, status: :unprocessable_entity }
|
32
|
+
format.json { render json: @article.errors, status: :unprocessable_entity }
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# PATCH/PUT /articles/1 or /articles/1.json
|
38
|
+
def update
|
39
|
+
respond_to do |format|
|
40
|
+
if @article.update(article_params)
|
41
|
+
format.html { redirect_to @article, notice: "Article was successfully updated." }
|
42
|
+
format.json { render :show, status: :ok, location: @article }
|
43
|
+
else
|
44
|
+
format.html { render :edit, status: :unprocessable_entity }
|
45
|
+
format.json { render json: @article.errors, status: :unprocessable_entity }
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# DELETE /articles/1 or /articles/1.json
|
51
|
+
def destroy
|
52
|
+
@article.destroy!
|
53
|
+
|
54
|
+
respond_to do |format|
|
55
|
+
format.html { redirect_to articles_path, status: :see_other, notice: "Article was successfully destroyed." }
|
56
|
+
format.json { head :no_content }
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
private
|
61
|
+
# Use callbacks to share common setup or constraints between actions.
|
62
|
+
def set_article
|
63
|
+
@article = Article.find(params.expect(:id))
|
64
|
+
end
|
65
|
+
|
66
|
+
# Only allow a list of trusted parameters through.
|
67
|
+
def article_params
|
68
|
+
params.expect(article: [ :title, :body ])
|
69
|
+
end
|
70
|
+
end
|
File without changes
|