itsi 0.1.11 → 0.1.12

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.
Files changed (293) hide show
  1. checksums.yaml +4 -4
  2. data/Cargo.lock +1535 -45
  3. data/{sandbox/itsi_itsi_file/Itsi.rb → Itsi.rb} +19 -13
  4. data/Rakefile +8 -7
  5. data/crates/itsi_error/src/lib.rs +9 -0
  6. data/crates/itsi_rb_helpers/Cargo.toml +1 -0
  7. data/crates/itsi_rb_helpers/src/heap_value.rs +18 -0
  8. data/crates/itsi_rb_helpers/src/lib.rs +34 -7
  9. data/crates/itsi_server/Cargo.toml +69 -30
  10. data/crates/itsi_server/src/lib.rs +79 -147
  11. data/crates/itsi_server/src/{body_proxy → ruby_types/itsi_body_proxy}/big_bytes.rs +10 -5
  12. data/crates/itsi_server/src/{body_proxy/itsi_body_proxy.rs → ruby_types/itsi_body_proxy/mod.rs} +22 -3
  13. data/crates/itsi_server/src/ruby_types/itsi_grpc_request.rs +147 -0
  14. data/crates/itsi_server/src/ruby_types/itsi_grpc_response.rs +19 -0
  15. data/crates/itsi_server/src/ruby_types/itsi_grpc_stream/mod.rs +216 -0
  16. data/{gems/server/ext/itsi_server/src/request/itsi_request.rs → crates/itsi_server/src/ruby_types/itsi_http_request.rs} +101 -117
  17. data/crates/itsi_server/src/{response/itsi_response.rs → ruby_types/itsi_http_response.rs} +72 -41
  18. data/crates/itsi_server/src/ruby_types/itsi_server/file_watcher.rs +225 -0
  19. data/crates/itsi_server/src/ruby_types/itsi_server/itsi_server_config.rs +355 -0
  20. data/crates/itsi_server/src/ruby_types/itsi_server.rs +82 -0
  21. data/crates/itsi_server/src/ruby_types/mod.rs +55 -0
  22. data/crates/itsi_server/src/server/bind.rs +13 -5
  23. data/crates/itsi_server/src/server/byte_frame.rs +32 -0
  24. data/crates/itsi_server/src/server/cache_store.rs +74 -0
  25. data/crates/itsi_server/src/server/itsi_service.rs +172 -0
  26. data/crates/itsi_server/src/server/lifecycle_event.rs +3 -0
  27. data/crates/itsi_server/src/server/listener.rs +102 -2
  28. data/crates/itsi_server/src/server/middleware_stack/middleware.rs +153 -0
  29. data/crates/itsi_server/src/server/middleware_stack/middlewares/allow_list.rs +47 -0
  30. data/crates/itsi_server/src/server/middleware_stack/middlewares/auth_api_key.rs +58 -0
  31. data/crates/itsi_server/src/server/middleware_stack/middlewares/auth_basic.rs +82 -0
  32. data/crates/itsi_server/src/server/middleware_stack/middlewares/auth_jwt.rs +321 -0
  33. data/crates/itsi_server/src/server/middleware_stack/middlewares/cache_control.rs +139 -0
  34. data/crates/itsi_server/src/server/middleware_stack/middlewares/compression.rs +300 -0
  35. data/crates/itsi_server/src/server/middleware_stack/middlewares/cors.rs +287 -0
  36. data/crates/itsi_server/src/server/middleware_stack/middlewares/deny_list.rs +48 -0
  37. data/crates/itsi_server/src/server/middleware_stack/middlewares/error_response.rs +127 -0
  38. data/crates/itsi_server/src/server/middleware_stack/middlewares/etag.rs +191 -0
  39. data/crates/itsi_server/src/server/middleware_stack/middlewares/grpc_service.rs +72 -0
  40. data/crates/itsi_server/src/server/middleware_stack/middlewares/header_interpretation.rs +85 -0
  41. data/crates/itsi_server/src/server/middleware_stack/middlewares/intrusion_protection.rs +195 -0
  42. data/crates/itsi_server/src/server/middleware_stack/middlewares/log_requests.rs +82 -0
  43. data/crates/itsi_server/src/server/middleware_stack/middlewares/mod.rs +82 -0
  44. data/crates/itsi_server/src/server/middleware_stack/middlewares/proxy.rs +216 -0
  45. data/crates/itsi_server/src/server/middleware_stack/middlewares/rate_limit.rs +124 -0
  46. data/crates/itsi_server/src/server/middleware_stack/middlewares/redirect.rs +76 -0
  47. data/crates/itsi_server/src/server/middleware_stack/middlewares/request_headers.rs +43 -0
  48. data/crates/itsi_server/src/server/middleware_stack/middlewares/response_headers.rs +34 -0
  49. data/crates/itsi_server/src/server/middleware_stack/middlewares/ruby_app.rs +93 -0
  50. data/crates/itsi_server/src/server/middleware_stack/middlewares/static_assets.rs +162 -0
  51. data/crates/itsi_server/src/server/middleware_stack/middlewares/string_rewrite.rs +158 -0
  52. data/crates/itsi_server/src/server/middleware_stack/middlewares/token_source.rs +12 -0
  53. data/crates/itsi_server/src/server/middleware_stack/mod.rs +315 -0
  54. data/crates/itsi_server/src/server/mod.rs +8 -1
  55. data/crates/itsi_server/src/server/process_worker.rs +38 -12
  56. data/crates/itsi_server/src/server/rate_limiter.rs +565 -0
  57. data/crates/itsi_server/src/server/request_job.rs +11 -0
  58. data/crates/itsi_server/src/server/serve_strategy/cluster_mode.rs +119 -42
  59. data/crates/itsi_server/src/server/serve_strategy/mod.rs +9 -6
  60. data/crates/itsi_server/src/server/serve_strategy/single_mode.rs +256 -111
  61. data/crates/itsi_server/src/server/signal.rs +19 -0
  62. data/crates/itsi_server/src/server/static_file_server.rs +984 -0
  63. data/crates/itsi_server/src/server/thread_worker.rs +139 -94
  64. data/crates/itsi_server/src/server/types.rs +43 -0
  65. data/crates/itsi_server/test.md +14 -0
  66. data/crates/itsi_tracing/Cargo.toml +1 -0
  67. data/crates/itsi_tracing/src/lib.rs +216 -45
  68. data/docs/.gitignore +7 -0
  69. data/docs/.gitpod.yml +15 -0
  70. data/docs/Itsi.rb +17 -0
  71. data/docs/content/_index.md +17 -0
  72. data/docs/content/about.md +6 -0
  73. data/docs/content/docs/_index.md +18 -0
  74. data/docs/content/docs/first-page.md +9 -0
  75. data/docs/content/docs/folder/_index.md +10 -0
  76. data/docs/content/docs/folder/leaf.md +7 -0
  77. data/docs/go.mod +5 -0
  78. data/docs/go.sum +2 -0
  79. data/docs/hugo.yaml +77 -0
  80. data/examples/static_assets_example.rb +83 -0
  81. data/gems/_index.md +18 -0
  82. data/gems/scheduler/CODE_OF_CONDUCT.md +7 -0
  83. data/gems/scheduler/Cargo.lock +75 -14
  84. data/gems/scheduler/README.md +5 -0
  85. data/gems/scheduler/_index.md +7 -0
  86. data/gems/scheduler/itsi-scheduler.gemspec +4 -1
  87. data/gems/scheduler/lib/itsi/scheduler/version.rb +1 -1
  88. data/gems/scheduler/lib/itsi/scheduler.rb +2 -2
  89. data/gems/scheduler/test/test_file_io.rb +0 -1
  90. data/gems/scheduler/test/test_itsi_scheduler.rb +1 -1
  91. data/gems/server/CHANGELOG.md +5 -0
  92. data/gems/server/CODE_OF_CONDUCT.md +7 -0
  93. data/gems/server/Cargo.lock +1536 -45
  94. data/gems/server/README.md +4 -0
  95. data/gems/server/_index.md +6 -0
  96. data/gems/server/exe/itsi +33 -74
  97. data/gems/server/itsi-server.gemspec +3 -2
  98. data/gems/server/lib/itsi/{request.rb → http_request.rb} +29 -5
  99. data/gems/server/lib/itsi/http_response.rb +39 -0
  100. data/gems/server/lib/itsi/server/Itsi.rb +11 -19
  101. data/gems/server/lib/itsi/server/config/dsl.rb +506 -0
  102. data/gems/server/lib/itsi/server/config.rb +103 -8
  103. data/gems/server/lib/itsi/server/default_app/default_app.rb +38 -0
  104. data/gems/server/lib/itsi/server/grpc_interface.rb +213 -0
  105. data/gems/server/lib/itsi/server/rack/handler/itsi.rb +8 -17
  106. data/gems/server/lib/itsi/server/rack_interface.rb +23 -4
  107. data/gems/server/lib/itsi/server/scheduler_interface.rb +1 -1
  108. data/gems/server/lib/itsi/server/scheduler_mode.rb +4 -0
  109. data/gems/server/lib/itsi/server/signal_trap.rb +7 -1
  110. data/gems/server/lib/itsi/server/version.rb +1 -1
  111. data/gems/server/lib/itsi/server.rb +74 -63
  112. data/gems/server/lib/itsi/standard_headers.rb +86 -0
  113. data/gems/server/test/helpers/test_helper.rb +12 -12
  114. data/gems/server/test/test_itsi_server.rb +2 -2
  115. data/lib/itsi/version.rb +1 -1
  116. data/sandbox/itsi_file/Gemfile +11 -0
  117. data/sandbox/itsi_file/Gemfile.lock +69 -0
  118. data/sandbox/itsi_file/Itsi.rb +276 -0
  119. data/sandbox/itsi_file/error.html +2 -0
  120. data/sandbox/itsi_file/organisations_controller.rb +20 -0
  121. data/sandbox/itsi_file/public/assets/image.png +0 -0
  122. data/sandbox/itsi_file/public/assets/index.html +1 -0
  123. data/sandbox/itsi_sandbox_hanami/Gemfile.lock +2 -2
  124. data/sandbox/itsi_sandbox_rack/Gemfile.lock +2 -2
  125. data/sandbox/itsi_sandbox_rack/config.ru +2 -15
  126. data/sandbox/itsi_sandbox_rails/.dockerignore +2 -5
  127. data/sandbox/itsi_sandbox_rails/.github/workflows/ci.yml +1 -1
  128. data/sandbox/itsi_sandbox_rails/.gitignore +2 -1
  129. data/sandbox/itsi_sandbox_rails/Dockerfile +6 -9
  130. data/sandbox/itsi_sandbox_rails/Gemfile +16 -22
  131. data/sandbox/itsi_sandbox_rails/Gemfile.lock +100 -225
  132. data/sandbox/itsi_sandbox_rails/app/assets/config/manifest.js +4 -0
  133. data/sandbox/itsi_sandbox_rails/app/assets/stylesheets/application.css +11 -6
  134. data/sandbox/itsi_sandbox_rails/app/channels/application_cable/channel.rb +4 -0
  135. data/sandbox/itsi_sandbox_rails/app/channels/application_cable/connection.rb +4 -0
  136. data/sandbox/itsi_sandbox_rails/app/controllers/live_controller.rb +7 -8
  137. data/sandbox/itsi_sandbox_rails/app/controllers/uploads_controller.rb +0 -3
  138. data/sandbox/itsi_sandbox_rails/app/views/layouts/application.html.erb +2 -7
  139. data/sandbox/itsi_sandbox_rails/bin/docker-entrypoint +3 -4
  140. data/sandbox/itsi_sandbox_rails/bin/setup +8 -5
  141. data/sandbox/itsi_sandbox_rails/config/application.rb +1 -35
  142. data/sandbox/itsi_sandbox_rails/config/cable.yml +3 -10
  143. data/sandbox/itsi_sandbox_rails/config/credentials.yml.enc +1 -1
  144. data/sandbox/itsi_sandbox_rails/config/database.yml +9 -19
  145. data/sandbox/itsi_sandbox_rails/config/environment.rb +1 -1
  146. data/sandbox/itsi_sandbox_rails/config/environments/development.rb +21 -12
  147. data/sandbox/itsi_sandbox_rails/config/environments/production.rb +49 -34
  148. data/sandbox/itsi_sandbox_rails/config/environments/test.rb +19 -5
  149. data/sandbox/itsi_sandbox_rails/config/initializers/assets.rb +5 -0
  150. data/sandbox/itsi_sandbox_rails/config/initializers/filter_parameter_logging.rb +1 -1
  151. data/sandbox/itsi_sandbox_rails/config/initializers/permissions_policy.rb +13 -0
  152. data/sandbox/itsi_sandbox_rails/config/puma.rb +2 -9
  153. data/sandbox/itsi_sandbox_rails/config.ru +0 -1
  154. data/sandbox/itsi_sandbox_rails/db/migrate/20250301041554_create_posts.rb +1 -1
  155. data/sandbox/itsi_sandbox_rails/db/schema.rb +2 -2
  156. data/sandbox/itsi_sandbox_rails/lib/assets/.keep +0 -0
  157. data/sandbox/itsi_sandbox_rails/public/404.html +66 -113
  158. data/sandbox/itsi_sandbox_rails/public/406-unsupported-browser.html +65 -113
  159. data/sandbox/itsi_sandbox_rails/public/422.html +66 -113
  160. data/sandbox/itsi_sandbox_rails/public/500.html +65 -113
  161. data/sandbox/itsi_sandbox_rails/public/icon.png +0 -0
  162. data/sandbox/itsi_sandbox_rails/public/icon.svg +2 -2
  163. data/sandbox/itsi_sandbox_rails/test/channels/application_cable/connection_test.rb +13 -0
  164. data/sandbox/itsi_sandbox_roda/Gemfile.lock +3 -10
  165. data/tasks.txt +72 -35
  166. metadata +89 -139
  167. data/crates/itsi_server/src/body_proxy/mod.rs +0 -2
  168. data/crates/itsi_server/src/request/itsi_request.rs +0 -298
  169. data/crates/itsi_server/src/request/mod.rs +0 -1
  170. data/crates/itsi_server/src/response/mod.rs +0 -1
  171. data/crates/itsi_server/src/server/itsi_server.rs +0 -288
  172. data/gems/scheduler/ext/itsi_error/Cargo.lock +0 -368
  173. data/gems/scheduler/ext/itsi_error/Cargo.toml +0 -11
  174. data/gems/scheduler/ext/itsi_error/src/from.rs +0 -68
  175. data/gems/scheduler/ext/itsi_error/src/lib.rs +0 -24
  176. data/gems/scheduler/ext/itsi_instrument_entry/Cargo.toml +0 -15
  177. data/gems/scheduler/ext/itsi_instrument_entry/src/lib.rs +0 -31
  178. data/gems/scheduler/ext/itsi_rb_helpers/Cargo.lock +0 -355
  179. data/gems/scheduler/ext/itsi_rb_helpers/Cargo.toml +0 -10
  180. data/gems/scheduler/ext/itsi_rb_helpers/src/heap_value.rs +0 -121
  181. data/gems/scheduler/ext/itsi_rb_helpers/src/lib.rs +0 -201
  182. data/gems/scheduler/ext/itsi_scheduler/Cargo.toml +0 -24
  183. data/gems/scheduler/ext/itsi_scheduler/extconf.rb +0 -6
  184. data/gems/scheduler/ext/itsi_scheduler/src/itsi_scheduler/io_helpers.rs +0 -56
  185. data/gems/scheduler/ext/itsi_scheduler/src/itsi_scheduler/io_waiter.rs +0 -44
  186. data/gems/scheduler/ext/itsi_scheduler/src/itsi_scheduler/timer.rs +0 -44
  187. data/gems/scheduler/ext/itsi_scheduler/src/itsi_scheduler.rs +0 -308
  188. data/gems/scheduler/ext/itsi_scheduler/src/lib.rs +0 -38
  189. data/gems/scheduler/ext/itsi_server/Cargo.lock +0 -2956
  190. data/gems/scheduler/ext/itsi_server/Cargo.toml +0 -50
  191. data/gems/scheduler/ext/itsi_server/extconf.rb +0 -6
  192. data/gems/scheduler/ext/itsi_server/src/body_proxy/big_bytes.rs +0 -104
  193. data/gems/scheduler/ext/itsi_server/src/body_proxy/itsi_body_proxy.rs +0 -122
  194. data/gems/scheduler/ext/itsi_server/src/body_proxy/mod.rs +0 -2
  195. data/gems/scheduler/ext/itsi_server/src/env.rs +0 -43
  196. data/gems/scheduler/ext/itsi_server/src/lib.rs +0 -180
  197. data/gems/scheduler/ext/itsi_server/src/request/itsi_request.rs +0 -298
  198. data/gems/scheduler/ext/itsi_server/src/request/mod.rs +0 -1
  199. data/gems/scheduler/ext/itsi_server/src/response/itsi_response.rs +0 -357
  200. data/gems/scheduler/ext/itsi_server/src/response/mod.rs +0 -1
  201. data/gems/scheduler/ext/itsi_server/src/server/bind.rs +0 -174
  202. data/gems/scheduler/ext/itsi_server/src/server/bind_protocol.rs +0 -37
  203. data/gems/scheduler/ext/itsi_server/src/server/io_stream.rs +0 -104
  204. data/gems/scheduler/ext/itsi_server/src/server/itsi_server.rs +0 -288
  205. data/gems/scheduler/ext/itsi_server/src/server/lifecycle_event.rs +0 -9
  206. data/gems/scheduler/ext/itsi_server/src/server/listener.rs +0 -318
  207. data/gems/scheduler/ext/itsi_server/src/server/mod.rs +0 -11
  208. data/gems/scheduler/ext/itsi_server/src/server/process_worker.rs +0 -203
  209. data/gems/scheduler/ext/itsi_server/src/server/serve_strategy/cluster_mode.rs +0 -260
  210. data/gems/scheduler/ext/itsi_server/src/server/serve_strategy/mod.rs +0 -27
  211. data/gems/scheduler/ext/itsi_server/src/server/serve_strategy/single_mode.rs +0 -276
  212. data/gems/scheduler/ext/itsi_server/src/server/signal.rs +0 -74
  213. data/gems/scheduler/ext/itsi_server/src/server/thread_worker.rs +0 -399
  214. data/gems/scheduler/ext/itsi_server/src/server/tls/locked_dir_cache.rs +0 -132
  215. data/gems/scheduler/ext/itsi_server/src/server/tls.rs +0 -265
  216. data/gems/scheduler/ext/itsi_tracing/Cargo.lock +0 -274
  217. data/gems/scheduler/ext/itsi_tracing/Cargo.toml +0 -16
  218. data/gems/scheduler/ext/itsi_tracing/src/lib.rs +0 -58
  219. data/gems/server/ext/itsi_error/Cargo.lock +0 -368
  220. data/gems/server/ext/itsi_error/Cargo.toml +0 -11
  221. data/gems/server/ext/itsi_error/src/from.rs +0 -68
  222. data/gems/server/ext/itsi_error/src/lib.rs +0 -24
  223. data/gems/server/ext/itsi_instrument_entry/Cargo.toml +0 -15
  224. data/gems/server/ext/itsi_instrument_entry/src/lib.rs +0 -31
  225. data/gems/server/ext/itsi_rb_helpers/Cargo.lock +0 -355
  226. data/gems/server/ext/itsi_rb_helpers/Cargo.toml +0 -10
  227. data/gems/server/ext/itsi_rb_helpers/src/heap_value.rs +0 -121
  228. data/gems/server/ext/itsi_rb_helpers/src/lib.rs +0 -201
  229. data/gems/server/ext/itsi_scheduler/Cargo.toml +0 -24
  230. data/gems/server/ext/itsi_scheduler/extconf.rb +0 -6
  231. data/gems/server/ext/itsi_scheduler/src/itsi_scheduler/io_helpers.rs +0 -56
  232. data/gems/server/ext/itsi_scheduler/src/itsi_scheduler/io_waiter.rs +0 -44
  233. data/gems/server/ext/itsi_scheduler/src/itsi_scheduler/timer.rs +0 -44
  234. data/gems/server/ext/itsi_scheduler/src/itsi_scheduler.rs +0 -308
  235. data/gems/server/ext/itsi_scheduler/src/lib.rs +0 -38
  236. data/gems/server/ext/itsi_server/Cargo.lock +0 -2956
  237. data/gems/server/ext/itsi_server/Cargo.toml +0 -50
  238. data/gems/server/ext/itsi_server/extconf.rb +0 -6
  239. data/gems/server/ext/itsi_server/src/body_proxy/big_bytes.rs +0 -104
  240. data/gems/server/ext/itsi_server/src/body_proxy/itsi_body_proxy.rs +0 -122
  241. data/gems/server/ext/itsi_server/src/body_proxy/mod.rs +0 -2
  242. data/gems/server/ext/itsi_server/src/env.rs +0 -43
  243. data/gems/server/ext/itsi_server/src/lib.rs +0 -180
  244. data/gems/server/ext/itsi_server/src/request/mod.rs +0 -1
  245. data/gems/server/ext/itsi_server/src/response/itsi_response.rs +0 -357
  246. data/gems/server/ext/itsi_server/src/response/mod.rs +0 -1
  247. data/gems/server/ext/itsi_server/src/server/bind.rs +0 -174
  248. data/gems/server/ext/itsi_server/src/server/bind_protocol.rs +0 -37
  249. data/gems/server/ext/itsi_server/src/server/io_stream.rs +0 -104
  250. data/gems/server/ext/itsi_server/src/server/itsi_server.rs +0 -288
  251. data/gems/server/ext/itsi_server/src/server/lifecycle_event.rs +0 -9
  252. data/gems/server/ext/itsi_server/src/server/listener.rs +0 -318
  253. data/gems/server/ext/itsi_server/src/server/mod.rs +0 -11
  254. data/gems/server/ext/itsi_server/src/server/process_worker.rs +0 -203
  255. data/gems/server/ext/itsi_server/src/server/serve_strategy/cluster_mode.rs +0 -260
  256. data/gems/server/ext/itsi_server/src/server/serve_strategy/mod.rs +0 -27
  257. data/gems/server/ext/itsi_server/src/server/serve_strategy/single_mode.rs +0 -276
  258. data/gems/server/ext/itsi_server/src/server/signal.rs +0 -74
  259. data/gems/server/ext/itsi_server/src/server/thread_worker.rs +0 -399
  260. data/gems/server/ext/itsi_server/src/server/tls/locked_dir_cache.rs +0 -132
  261. data/gems/server/ext/itsi_server/src/server/tls.rs +0 -265
  262. data/gems/server/ext/itsi_tracing/Cargo.lock +0 -274
  263. data/gems/server/ext/itsi_tracing/Cargo.toml +0 -16
  264. data/gems/server/ext/itsi_tracing/src/lib.rs +0 -58
  265. data/gems/server/lib/itsi/server/options_dsl.rb +0 -401
  266. data/gems/server/lib/itsi/stream_io.rb +0 -38
  267. data/location_dsl.rb +0 -381
  268. data/sandbox/itsi_sandbox_rails/.kamal/hooks/docker-setup.sample +0 -3
  269. data/sandbox/itsi_sandbox_rails/.kamal/hooks/post-app-boot.sample +0 -3
  270. data/sandbox/itsi_sandbox_rails/.kamal/hooks/post-deploy.sample +0 -14
  271. data/sandbox/itsi_sandbox_rails/.kamal/hooks/post-proxy-reboot.sample +0 -3
  272. data/sandbox/itsi_sandbox_rails/.kamal/hooks/pre-app-boot.sample +0 -3
  273. data/sandbox/itsi_sandbox_rails/.kamal/hooks/pre-build.sample +0 -51
  274. data/sandbox/itsi_sandbox_rails/.kamal/hooks/pre-connect.sample +0 -47
  275. data/sandbox/itsi_sandbox_rails/.kamal/hooks/pre-deploy.sample +0 -109
  276. data/sandbox/itsi_sandbox_rails/.kamal/hooks/pre-proxy-reboot.sample +0 -3
  277. data/sandbox/itsi_sandbox_rails/.kamal/secrets +0 -17
  278. data/sandbox/itsi_sandbox_rails/bin/dev +0 -2
  279. data/sandbox/itsi_sandbox_rails/bin/jobs +0 -6
  280. data/sandbox/itsi_sandbox_rails/bin/kamal +0 -27
  281. data/sandbox/itsi_sandbox_rails/bin/thrust +0 -5
  282. data/sandbox/itsi_sandbox_rails/config/cache.yml +0 -16
  283. data/sandbox/itsi_sandbox_rails/config/deploy.yml +0 -116
  284. data/sandbox/itsi_sandbox_rails/config/queue.yml +0 -18
  285. data/sandbox/itsi_sandbox_rails/config/recurring.yml +0 -10
  286. data/sandbox/itsi_sandbox_rails/db/cable_schema.rb +0 -11
  287. data/sandbox/itsi_sandbox_rails/db/cache_schema.rb +0 -14
  288. data/sandbox/itsi_sandbox_rails/db/queue_schema.rb +0 -129
  289. data/sandbox/itsi_sandbox_rails/public/400.html +0 -114
  290. data/sandbox/itsi_sandbox_rails/test/fixtures/posts.yml +0 -9
  291. data/sandbox/itsi_sandbox_rails/test/models/post_test.rb +0 -7
  292. /data/{sandbox/itsi_sandbox_rails/script/.keep → crates/_index.md} +0 -0
  293. /data/gems/server/lib/itsi/{index.html → server/default_app/index.html} +0 -0
@@ -1,368 +0,0 @@
1
- # This file is automatically @generated by Cargo.
2
- # It is not intended for manual editing.
3
- version = 4
4
-
5
- [[package]]
6
- name = "aho-corasick"
7
- version = "1.1.3"
8
- source = "registry+https://github.com/rust-lang/crates.io-index"
9
- checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
10
- dependencies = [
11
- "memchr",
12
- ]
13
-
14
- [[package]]
15
- name = "bindgen"
16
- version = "0.69.5"
17
- source = "registry+https://github.com/rust-lang/crates.io-index"
18
- checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
19
- dependencies = [
20
- "bitflags",
21
- "cexpr",
22
- "clang-sys",
23
- "itertools",
24
- "lazy_static",
25
- "lazycell",
26
- "proc-macro2",
27
- "quote",
28
- "regex",
29
- "rustc-hash",
30
- "shlex",
31
- "syn",
32
- ]
33
-
34
- [[package]]
35
- name = "bitflags"
36
- version = "2.8.0"
37
- source = "registry+https://github.com/rust-lang/crates.io-index"
38
- checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
39
-
40
- [[package]]
41
- name = "cexpr"
42
- version = "0.6.0"
43
- source = "registry+https://github.com/rust-lang/crates.io-index"
44
- checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
45
- dependencies = [
46
- "nom",
47
- ]
48
-
49
- [[package]]
50
- name = "cfg-if"
51
- version = "1.0.0"
52
- source = "registry+https://github.com/rust-lang/crates.io-index"
53
- checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
54
-
55
- [[package]]
56
- name = "clang-sys"
57
- version = "1.8.1"
58
- source = "registry+https://github.com/rust-lang/crates.io-index"
59
- checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
60
- dependencies = [
61
- "glob",
62
- "libc",
63
- "libloading",
64
- ]
65
-
66
- [[package]]
67
- name = "either"
68
- version = "1.14.0"
69
- source = "registry+https://github.com/rust-lang/crates.io-index"
70
- checksum = "b7914353092ddf589ad78f25c5c1c21b7f80b0ff8621e7c814c3485b5306da9d"
71
-
72
- [[package]]
73
- name = "glob"
74
- version = "0.3.2"
75
- source = "registry+https://github.com/rust-lang/crates.io-index"
76
- checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"
77
-
78
- [[package]]
79
- name = "itertools"
80
- version = "0.12.1"
81
- source = "registry+https://github.com/rust-lang/crates.io-index"
82
- checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
83
- dependencies = [
84
- "either",
85
- ]
86
-
87
- [[package]]
88
- name = "itsi_error"
89
- version = "0.1.0"
90
- dependencies = [
91
- "magnus",
92
- "thiserror",
93
- ]
94
-
95
- [[package]]
96
- name = "lazy_static"
97
- version = "1.5.0"
98
- source = "registry+https://github.com/rust-lang/crates.io-index"
99
- checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
100
-
101
- [[package]]
102
- name = "lazycell"
103
- version = "1.3.0"
104
- source = "registry+https://github.com/rust-lang/crates.io-index"
105
- checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
106
-
107
- [[package]]
108
- name = "libc"
109
- version = "0.2.170"
110
- source = "registry+https://github.com/rust-lang/crates.io-index"
111
- checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828"
112
-
113
- [[package]]
114
- name = "libloading"
115
- version = "0.8.6"
116
- source = "registry+https://github.com/rust-lang/crates.io-index"
117
- checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
118
- dependencies = [
119
- "cfg-if",
120
- "windows-targets",
121
- ]
122
-
123
- [[package]]
124
- name = "magnus"
125
- version = "0.6.4"
126
- source = "registry+https://github.com/rust-lang/crates.io-index"
127
- checksum = "b1597ef40aa8c36be098249e82c9a20cf7199278ac1c1a1a995eeead6a184479"
128
- dependencies = [
129
- "magnus-macros",
130
- "rb-sys",
131
- "rb-sys-env",
132
- "seq-macro",
133
- ]
134
-
135
- [[package]]
136
- name = "magnus-macros"
137
- version = "0.6.0"
138
- source = "registry+https://github.com/rust-lang/crates.io-index"
139
- checksum = "5968c820e2960565f647819f5928a42d6e874551cab9d88d75e3e0660d7f71e3"
140
- dependencies = [
141
- "proc-macro2",
142
- "quote",
143
- "syn",
144
- ]
145
-
146
- [[package]]
147
- name = "memchr"
148
- version = "2.7.4"
149
- source = "registry+https://github.com/rust-lang/crates.io-index"
150
- checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
151
-
152
- [[package]]
153
- name = "minimal-lexical"
154
- version = "0.2.1"
155
- source = "registry+https://github.com/rust-lang/crates.io-index"
156
- checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
157
-
158
- [[package]]
159
- name = "nom"
160
- version = "7.1.3"
161
- source = "registry+https://github.com/rust-lang/crates.io-index"
162
- checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
163
- dependencies = [
164
- "memchr",
165
- "minimal-lexical",
166
- ]
167
-
168
- [[package]]
169
- name = "proc-macro2"
170
- version = "1.0.93"
171
- source = "registry+https://github.com/rust-lang/crates.io-index"
172
- checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
173
- dependencies = [
174
- "unicode-ident",
175
- ]
176
-
177
- [[package]]
178
- name = "quote"
179
- version = "1.0.38"
180
- source = "registry+https://github.com/rust-lang/crates.io-index"
181
- checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
182
- dependencies = [
183
- "proc-macro2",
184
- ]
185
-
186
- [[package]]
187
- name = "rb-sys"
188
- version = "0.9.110"
189
- source = "registry+https://github.com/rust-lang/crates.io-index"
190
- checksum = "56cf964f8e44115e50009921ea3d3791b6f74d1ae6d6ed37114fbe03a1cd7308"
191
- dependencies = [
192
- "rb-sys-build",
193
- ]
194
-
195
- [[package]]
196
- name = "rb-sys-build"
197
- version = "0.9.110"
198
- source = "registry+https://github.com/rust-lang/crates.io-index"
199
- checksum = "161480347f56473107d4135643b6b1909331eec61445e113b256708a28b691c5"
200
- dependencies = [
201
- "bindgen",
202
- "lazy_static",
203
- "proc-macro2",
204
- "quote",
205
- "regex",
206
- "shell-words",
207
- "syn",
208
- ]
209
-
210
- [[package]]
211
- name = "rb-sys-env"
212
- version = "0.1.2"
213
- source = "registry+https://github.com/rust-lang/crates.io-index"
214
- checksum = "a35802679f07360454b418a5d1735c89716bde01d35b1560fc953c1415a0b3bb"
215
-
216
- [[package]]
217
- name = "regex"
218
- version = "1.11.1"
219
- source = "registry+https://github.com/rust-lang/crates.io-index"
220
- checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
221
- dependencies = [
222
- "aho-corasick",
223
- "memchr",
224
- "regex-automata",
225
- "regex-syntax",
226
- ]
227
-
228
- [[package]]
229
- name = "regex-automata"
230
- version = "0.4.9"
231
- source = "registry+https://github.com/rust-lang/crates.io-index"
232
- checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
233
- dependencies = [
234
- "aho-corasick",
235
- "memchr",
236
- "regex-syntax",
237
- ]
238
-
239
- [[package]]
240
- name = "regex-syntax"
241
- version = "0.8.5"
242
- source = "registry+https://github.com/rust-lang/crates.io-index"
243
- checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
244
-
245
- [[package]]
246
- name = "rustc-hash"
247
- version = "1.1.0"
248
- source = "registry+https://github.com/rust-lang/crates.io-index"
249
- checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
250
-
251
- [[package]]
252
- name = "seq-macro"
253
- version = "0.3.5"
254
- source = "registry+https://github.com/rust-lang/crates.io-index"
255
- checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4"
256
-
257
- [[package]]
258
- name = "shell-words"
259
- version = "1.1.0"
260
- source = "registry+https://github.com/rust-lang/crates.io-index"
261
- checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
262
-
263
- [[package]]
264
- name = "shlex"
265
- version = "1.3.0"
266
- source = "registry+https://github.com/rust-lang/crates.io-index"
267
- checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
268
-
269
- [[package]]
270
- name = "syn"
271
- version = "2.0.98"
272
- source = "registry+https://github.com/rust-lang/crates.io-index"
273
- checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1"
274
- dependencies = [
275
- "proc-macro2",
276
- "quote",
277
- "unicode-ident",
278
- ]
279
-
280
- [[package]]
281
- name = "thiserror"
282
- version = "2.0.11"
283
- source = "registry+https://github.com/rust-lang/crates.io-index"
284
- checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc"
285
- dependencies = [
286
- "thiserror-impl",
287
- ]
288
-
289
- [[package]]
290
- name = "thiserror-impl"
291
- version = "2.0.11"
292
- source = "registry+https://github.com/rust-lang/crates.io-index"
293
- checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2"
294
- dependencies = [
295
- "proc-macro2",
296
- "quote",
297
- "syn",
298
- ]
299
-
300
- [[package]]
301
- name = "unicode-ident"
302
- version = "1.0.17"
303
- source = "registry+https://github.com/rust-lang/crates.io-index"
304
- checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe"
305
-
306
- [[package]]
307
- name = "windows-targets"
308
- version = "0.52.6"
309
- source = "registry+https://github.com/rust-lang/crates.io-index"
310
- checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
311
- dependencies = [
312
- "windows_aarch64_gnullvm",
313
- "windows_aarch64_msvc",
314
- "windows_i686_gnu",
315
- "windows_i686_gnullvm",
316
- "windows_i686_msvc",
317
- "windows_x86_64_gnu",
318
- "windows_x86_64_gnullvm",
319
- "windows_x86_64_msvc",
320
- ]
321
-
322
- [[package]]
323
- name = "windows_aarch64_gnullvm"
324
- version = "0.52.6"
325
- source = "registry+https://github.com/rust-lang/crates.io-index"
326
- checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
327
-
328
- [[package]]
329
- name = "windows_aarch64_msvc"
330
- version = "0.52.6"
331
- source = "registry+https://github.com/rust-lang/crates.io-index"
332
- checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
333
-
334
- [[package]]
335
- name = "windows_i686_gnu"
336
- version = "0.52.6"
337
- source = "registry+https://github.com/rust-lang/crates.io-index"
338
- checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
339
-
340
- [[package]]
341
- name = "windows_i686_gnullvm"
342
- version = "0.52.6"
343
- source = "registry+https://github.com/rust-lang/crates.io-index"
344
- checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
345
-
346
- [[package]]
347
- name = "windows_i686_msvc"
348
- version = "0.52.6"
349
- source = "registry+https://github.com/rust-lang/crates.io-index"
350
- checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
351
-
352
- [[package]]
353
- name = "windows_x86_64_gnu"
354
- version = "0.52.6"
355
- source = "registry+https://github.com/rust-lang/crates.io-index"
356
- checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
357
-
358
- [[package]]
359
- name = "windows_x86_64_gnullvm"
360
- version = "0.52.6"
361
- source = "registry+https://github.com/rust-lang/crates.io-index"
362
- checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
363
-
364
- [[package]]
365
- name = "windows_x86_64_msvc"
366
- version = "0.52.6"
367
- source = "registry+https://github.com/rust-lang/crates.io-index"
368
- checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
@@ -1,11 +0,0 @@
1
- [package]
2
- name = "itsi_error"
3
- version = "0.1.0"
4
- edition = "2024"
5
-
6
- [dependencies]
7
- thiserror = "2.0.11"
8
- magnus = { version = "0.7.1" }
9
- rcgen = "0.13.2"
10
- nix = "0.29.0"
11
- httparse = "1.10.1"
@@ -1,68 +0,0 @@
1
- use magnus::{
2
- Error,
3
- error::ErrorType,
4
- exception::{self, arg_error, exception},
5
- };
6
- use nix::errno::Errno;
7
-
8
- use crate::ItsiError;
9
- use std::{ffi::NulError, io};
10
-
11
- pub static CLIENT_CONNECTION_CLOSED: &str = "Client disconnected";
12
-
13
- impl From<httparse::Error> for ItsiError {
14
- fn from(err: httparse::Error) -> Self {
15
- ItsiError::ArgumentError(err.to_string())
16
- }
17
- }
18
-
19
- impl From<Errno> for ItsiError {
20
- fn from(err: Errno) -> Self {
21
- ItsiError::ArgumentError(err.to_string())
22
- }
23
- }
24
-
25
- impl From<io::Error> for ItsiError {
26
- fn from(err: io::Error) -> Self {
27
- ItsiError::ArgumentError(err.to_string())
28
- }
29
- }
30
-
31
- impl From<rcgen::Error> for ItsiError {
32
- fn from(err: rcgen::Error) -> Self {
33
- ItsiError::ArgumentError(err.to_string())
34
- }
35
- }
36
-
37
- impl From<NulError> for ItsiError {
38
- fn from(err: NulError) -> Self {
39
- ItsiError::ArgumentError(err.to_string())
40
- }
41
- }
42
-
43
- impl From<Error> for ItsiError {
44
- fn from(err: Error) -> Self {
45
- match err.error_type() {
46
- ErrorType::Jump(tag) => ItsiError::Jump(tag.to_string()),
47
- ErrorType::Error(_exception_class, cow) => ItsiError::ArgumentError(cow.to_string()),
48
- ErrorType::Exception(exception) => ItsiError::ArgumentError(exception.to_string()),
49
- }
50
- }
51
- }
52
-
53
- impl From<ItsiError> for Error {
54
- fn from(err: ItsiError) -> Self {
55
- match err {
56
- ItsiError::InvalidInput(msg) => Error::new(arg_error(), msg),
57
- ItsiError::InternalServerError(msg) => Error::new(exception(), msg),
58
- ItsiError::UnsupportedProtocol(msg) => Error::new(arg_error(), msg),
59
- ItsiError::ArgumentError(msg) => Error::new(arg_error(), msg),
60
- ItsiError::Jump(msg) => Error::new(exception::local_jump_error(), msg),
61
- ItsiError::Break() => Error::new(exception::interrupt(), "Break"),
62
- ItsiError::ClientConnectionClosed => {
63
- Error::new(exception::eof_error(), CLIENT_CONNECTION_CLOSED)
64
- }
65
- ItsiError::Pass() => Error::new(exception::interrupt(), "Pass"),
66
- }
67
- }
68
- }
@@ -1,24 +0,0 @@
1
- pub mod from;
2
- use thiserror::Error;
3
-
4
- pub type Result<T> = std::result::Result<T, ItsiError>;
5
-
6
- #[derive(Error, Debug, Clone)]
7
- pub enum ItsiError {
8
- #[error("Invalid input {0}")]
9
- InvalidInput(String),
10
- #[error("Internal server error {0}")]
11
- InternalServerError(String),
12
- #[error("Unsupported protocol {0}")]
13
- UnsupportedProtocol(String),
14
- #[error("Argument error: {0}")]
15
- ArgumentError(String),
16
- #[error("Client Connection Closed")]
17
- ClientConnectionClosed,
18
- #[error("Jump")]
19
- Jump(String),
20
- #[error("Break")]
21
- Break(),
22
- #[error("Pass")]
23
- Pass(),
24
- }
@@ -1,15 +0,0 @@
1
- [package]
2
- name = "itsi_instrument_entry"
3
- version = "0.1.0"
4
- edition = "2021"
5
- authors = ["Wouter Coppieters <wc@pico.net.nz>"]
6
- license = "MIT"
7
- publish = false
8
-
9
-
10
- [lib]
11
- proc-macro = true
12
- [dependencies]
13
- proc-macro2 = "1.0"
14
- quote = "1.0"
15
- syn = { version = "1.0", features = ["full"] }
@@ -1,31 +0,0 @@
1
- use proc_macro::TokenStream;
2
- use proc_macro2::TokenStream as TokenStream2;
3
- use quote::quote;
4
- use syn::{parse_macro_input, ItemFn};
5
-
6
- #[proc_macro_attribute]
7
- pub fn instrument_with_entry(attr: TokenStream, item: TokenStream) -> TokenStream {
8
- let attr_tokens = TokenStream2::from(attr);
9
- let input_fn = parse_macro_input!(item as ItemFn);
10
- let attrs = input_fn.attrs;
11
- let vis = input_fn.vis;
12
- let sig = input_fn.sig;
13
- let block = input_fn.block;
14
- let output = quote! {
15
- #[cfg(debug_assertions)]
16
- #[tracing::instrument(#attr_tokens)]
17
- #(#attrs)*
18
- #vis #sig {
19
- tracing::trace!("");
20
- #block
21
- }
22
-
23
- #[cfg(not(debug_assertions))]
24
- #(#attrs)*
25
- #vis #sig {
26
- #block
27
- }
28
- };
29
-
30
- output.into()
31
- }