itsi 0.2.2 → 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/CHANGELOG.md +1 -1
- data/Cargo.lock +29 -30
- data/README.md +1 -0
- 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/ruby_types/itsi_server/itsi_server_config.rs +26 -3
- 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/docs/content/_index.md +1 -1
- data/docs/content/contact/_index.md +1 -1
- data/docs/content/directory_listing.jpg +0 -0
- data/docs/content/error_page.jpg +0 -0
- data/docs/content/getting_started/local_development.md +9 -2
- data/docs/content/getting_started/logging.md +1 -2
- data/docs/content/getting_started/signals.md +0 -1
- data/docs/hugo.yaml +3 -0
- 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 +74 -17
- data/gems/scheduler/itsi-scheduler.gemspec +2 -2
- data/gems/scheduler/lib/itsi/scheduler/version.rb +1 -1
- data/gems/server/Cargo.lock +28 -29
- data/gems/server/itsi-server.gemspec +2 -2
- data/gems/server/lib/itsi/http_request.rb +31 -34
- data/gems/server/lib/itsi/http_response.rb +10 -8
- data/gems/server/lib/itsi/passfile.rb +6 -6
- data/gems/server/lib/itsi/server/config/config_helpers.rb +33 -33
- data/gems/server/lib/itsi/server/config/dsl.rb +16 -21
- data/gems/server/lib/itsi/server/config/known_paths.rb +11 -7
- data/gems/server/lib/itsi/server/config/middleware/endpoint/endpoint.rb +0 -4
- data/gems/server/lib/itsi/server/config/middleware/error_response.md +13 -0
- 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.md +40 -0
- 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/option.rb +0 -1
- data/gems/server/lib/itsi/server/config/options/include.rb +1 -1
- data/gems/server/lib/itsi/server/config/options/nodelay.md +2 -2
- data/gems/server/lib/itsi/server/config/options/reuse_address.md +1 -1
- data/gems/server/lib/itsi/server/config/typed_struct.rb +32 -35
- data/gems/server/lib/itsi/server/config.rb +107 -92
- data/gems/server/lib/itsi/server/default_app/default_app.rb +1 -1
- data/gems/server/lib/itsi/server/grpc/grpc_call.rb +4 -5
- data/gems/server/lib/itsi/server/grpc/grpc_interface.rb +6 -7
- data/gems/server/lib/itsi/server/rack/handler/itsi.rb +0 -1
- data/gems/server/lib/itsi/server/rack_interface.rb +1 -2
- data/gems/server/lib/itsi/server/route_tester.rb +26 -24
- data/gems/server/lib/itsi/server/typed_handlers/param_parser.rb +25 -0
- data/gems/server/lib/itsi/server/typed_handlers/source_parser.rb +9 -7
- data/gems/server/lib/itsi/server/version.rb +1 -1
- data/gems/server/lib/itsi/server.rb +22 -22
- data/gems/server/lib/itsi/standard_headers.rb +80 -80
- data/gems/server/test/helpers/test_helper.rb +17 -16
- 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 +66 -2
- data/gems/server/test/options/test_workers.rb +12 -5
- data/lib/itsi/version.rb +1 -1
- metadata +435 -13
- data/examples/static_assets_example.rb +0 -83
- data/grpc_test/Itsi.rb +0 -11
- data/grpc_test/echo.proto +0 -14
- data/grpc_test/echo_pb.rb +0 -16
- data/grpc_test/echo_service_impl.rb +0 -8
- data/grpc_test/echo_services_pb.rb +0 -22
@@ -0,0 +1,84 @@
|
|
1
|
+
# Dummy in-memory data store
|
2
|
+
# for demo purposes only.
|
3
|
+
module DataStore
|
4
|
+
@users = {}
|
5
|
+
@posts = {}
|
6
|
+
class << self
|
7
|
+
attr_accessor :users, :posts
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
# Models
|
12
|
+
class User
|
13
|
+
attr_accessor :id, :name, :email
|
14
|
+
|
15
|
+
def initialize(id:, name:, email:)
|
16
|
+
@id, @name, @email = id, name, email
|
17
|
+
end
|
18
|
+
|
19
|
+
def to_h
|
20
|
+
{ id: id, name: name, email: email }
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.all
|
24
|
+
DataStore.users.values
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.find(id)
|
28
|
+
DataStore.users[id.to_i]
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.create!(params)
|
32
|
+
id = (DataStore.users.keys.max || 0) + 1
|
33
|
+
user = new(id: id, name: params[:name], email: params[:email])
|
34
|
+
DataStore.users[id] = user
|
35
|
+
user
|
36
|
+
end
|
37
|
+
|
38
|
+
def update!(params)
|
39
|
+
self.name = params[:name] if params[:name]
|
40
|
+
self.email = params[:email] if params[:email]
|
41
|
+
self
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.delete(id)
|
45
|
+
DataStore.users.delete(id.to_i)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
class Post
|
50
|
+
attr_accessor :id, :title, :body
|
51
|
+
|
52
|
+
def initialize(id:, title:, body:)
|
53
|
+
@id, @title, @body = id, title, body
|
54
|
+
end
|
55
|
+
|
56
|
+
def to_h
|
57
|
+
{ id: id, title: title, body: body }
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.all
|
61
|
+
DataStore.posts.values
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.find(id)
|
65
|
+
DataStore.posts[id.to_i]
|
66
|
+
end
|
67
|
+
|
68
|
+
def self.create!(params)
|
69
|
+
id = (DataStore.posts.keys.max || 0) + 1
|
70
|
+
post = new(id: id, title: params[:title], body: params[:body])
|
71
|
+
DataStore.posts[id] = post
|
72
|
+
post
|
73
|
+
end
|
74
|
+
|
75
|
+
def update!(params)
|
76
|
+
self.title = params[:title] if params[:title]
|
77
|
+
self.body = params[:body] if params[:body]
|
78
|
+
self
|
79
|
+
end
|
80
|
+
|
81
|
+
def self.delete(id)
|
82
|
+
DataStore.posts.delete(id.to_i)
|
83
|
+
end
|
84
|
+
end
|
Binary file
|
@@ -0,0 +1,82 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8" />
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6
|
+
<title>Home Media Server</title>
|
7
|
+
<style>
|
8
|
+
body {
|
9
|
+
font-family: Arial, sans-serif;
|
10
|
+
line-height: 1.6;
|
11
|
+
margin: 0;
|
12
|
+
padding: 0;
|
13
|
+
background-color: #f4f4f9;
|
14
|
+
color: #333;
|
15
|
+
}
|
16
|
+
.container {
|
17
|
+
max-width: 800px;
|
18
|
+
margin: 50px auto;
|
19
|
+
padding: 20px;
|
20
|
+
background: #fff;
|
21
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
22
|
+
border-radius: 8px;
|
23
|
+
}
|
24
|
+
h1 {
|
25
|
+
color: #6a0dad;
|
26
|
+
text-align: center;
|
27
|
+
}
|
28
|
+
p {
|
29
|
+
margin: 10px 0;
|
30
|
+
text-align: center;
|
31
|
+
}
|
32
|
+
.media-list {
|
33
|
+
margin-top: 20px;
|
34
|
+
}
|
35
|
+
.media-item {
|
36
|
+
padding: 10px;
|
37
|
+
margin: 10px 0;
|
38
|
+
background: #f9f9f9;
|
39
|
+
border: 1px solid #ddd;
|
40
|
+
border-radius: 5px;
|
41
|
+
display: flex;
|
42
|
+
justify-content: space-between;
|
43
|
+
align-items: center;
|
44
|
+
}
|
45
|
+
.media-item a {
|
46
|
+
text-decoration: none;
|
47
|
+
color: #6a0dad;
|
48
|
+
font-weight: bold;
|
49
|
+
}
|
50
|
+
.media-item a:hover {
|
51
|
+
text-decoration: underline;
|
52
|
+
}
|
53
|
+
</style>
|
54
|
+
</head>
|
55
|
+
<body>
|
56
|
+
<div class="container">
|
57
|
+
<h1>Welcome to My Media Server</h1>
|
58
|
+
<p>
|
59
|
+
Browse and enjoy a collection of movies, TV shows, and music. Click on
|
60
|
+
any item to explore!
|
61
|
+
</p>
|
62
|
+
<div class="media-list">
|
63
|
+
<div class="media-item">
|
64
|
+
<span>Movies</span>
|
65
|
+
<a href="movies/">Go</a>
|
66
|
+
</div>
|
67
|
+
<div class="media-item">
|
68
|
+
<span>TV Shows</span>
|
69
|
+
<a href="tv%20shows">Go</a>
|
70
|
+
</div>
|
71
|
+
<div class="media-item">
|
72
|
+
<span>Images</span>
|
73
|
+
<a href="images/">Go</a>
|
74
|
+
</div>
|
75
|
+
<div class="media-item">
|
76
|
+
<span>audio</span>
|
77
|
+
<a href="audio/">Go</a>
|
78
|
+
</div>
|
79
|
+
</div>
|
80
|
+
</div>
|
81
|
+
</body>
|
82
|
+
</html>
|
@@ -0,0 +1,66 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
|
4
|
+
gem 'rails', '~> 8.0.2'
|
5
|
+
gem 'sinatra'
|
6
|
+
# The modern asset pipeline for Rails [https://github.com/rails/propshaft]
|
7
|
+
gem 'propshaft'
|
8
|
+
# Use sqlite3 as the database for Active Record
|
9
|
+
gem 'sqlite3', '>= 2.1'
|
10
|
+
# Use the Puma web server [https://github.com/puma/puma]
|
11
|
+
gem 'puma', '>= 5.0'
|
12
|
+
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
|
13
|
+
gem 'importmap-rails'
|
14
|
+
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
|
15
|
+
gem 'turbo-rails'
|
16
|
+
# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
|
17
|
+
gem 'stimulus-rails'
|
18
|
+
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
|
19
|
+
gem 'jbuilder'
|
20
|
+
|
21
|
+
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
|
22
|
+
# gem "bcrypt", "~> 3.1.7"
|
23
|
+
|
24
|
+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
25
|
+
gem 'tzinfo-data', platforms: %i[windows jruby]
|
26
|
+
|
27
|
+
# Use the database-backed adapters for Rails.cache, Active Job, and Action Cable
|
28
|
+
gem 'solid_cable'
|
29
|
+
gem 'solid_cache'
|
30
|
+
gem 'solid_queue'
|
31
|
+
|
32
|
+
# Reduces boot times through caching; required in config/boot.rb
|
33
|
+
gem 'bootsnap', require: false
|
34
|
+
|
35
|
+
# Deploy this application anywhere as a Docker container [https://kamal-deploy.org]
|
36
|
+
gem 'kamal', require: false
|
37
|
+
|
38
|
+
# Add HTTP asset caching/compression and X-Sendfile acceleration to Puma [https://github.com/basecamp/thruster/]
|
39
|
+
gem 'thruster', require: false
|
40
|
+
|
41
|
+
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
|
42
|
+
# gem "image_processing", "~> 1.2"
|
43
|
+
|
44
|
+
group :development, :test do
|
45
|
+
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
|
46
|
+
gem 'debug', platforms: %i[mri windows], require: 'debug/prelude'
|
47
|
+
|
48
|
+
# Static analysis for security vulnerabilities [https://brakemanscanner.org/]
|
49
|
+
gem 'brakeman', require: false
|
50
|
+
|
51
|
+
# Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/]
|
52
|
+
gem 'rubocop-rails-omakase', require: false
|
53
|
+
end
|
54
|
+
|
55
|
+
group :development do
|
56
|
+
# Use console on exceptions pages [https://github.com/rails/web-console]
|
57
|
+
gem 'web-console'
|
58
|
+
end
|
59
|
+
|
60
|
+
group :test do
|
61
|
+
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
|
62
|
+
gem 'capybara'
|
63
|
+
gem 'selenium-webdriver'
|
64
|
+
end
|
65
|
+
|
66
|
+
gem 'itsi-server', path: '../../gems/server'
|
@@ -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,44 @@
|
|
1
|
+
# Make sure to run `bundle install` and `bundle exec rails db:migrate` before running this test.
|
2
|
+
#
|
3
|
+
# You can visit "/" to see an index file where you can pick between the Rails and Sinatra app.
|
4
|
+
# Go to rails/articles
|
5
|
+
|
6
|
+
auto_reload_config! # Auto-reload the server configuration each time it changes.
|
7
|
+
|
8
|
+
log_level :info
|
9
|
+
|
10
|
+
# First we mount our Rails app.
|
11
|
+
# When hosting a Rails app under a sub-directory,
|
12
|
+
# we also need to set our `config.relative_url_root`
|
13
|
+
# E.g.
|
14
|
+
#
|
15
|
+
# Inside application.rb
|
16
|
+
#
|
17
|
+
# config.relative_url_root = "/rails"
|
18
|
+
#
|
19
|
+
location '/' do
|
20
|
+
location '/rails*' do
|
21
|
+
location '/articles*' do
|
22
|
+
# Example of how we can selectively apply middleware to separate routes.
|
23
|
+
rate_limit \
|
24
|
+
requests: 1,
|
25
|
+
seconds: 10,
|
26
|
+
key: 'address',
|
27
|
+
store_config: 'in_memory',
|
28
|
+
error_response: 'too_many_requests'
|
29
|
+
end
|
30
|
+
|
31
|
+
rackup_file 'rails_subapp/config.ru'
|
32
|
+
end
|
33
|
+
|
34
|
+
# Next we mount our Sinatra app.
|
35
|
+
#
|
36
|
+
location '/sinatra*' do
|
37
|
+
rackup_file 'sinatra_subapp/config.ru'
|
38
|
+
end
|
39
|
+
|
40
|
+
# Create a fallback and root HTML page.
|
41
|
+
static_assets root_dir: './', not_found_behavior: 'fallthrough'
|
42
|
+
end
|
43
|
+
|
44
|
+
static_assets root_dir: './', not_found_behavior: { error: 'not_found' }
|