From a800faf6e842be8f7be4463bf42b2a542e2ffcba Mon Sep 17 00:00:00 2001 From: Yessiest Date: Tue, 19 Sep 2023 22:58:15 +0400 Subject: [PATCH] Rebranding & better cookie DSL --- .gitignore | 2 + .yardoc/checksums | 31 - .yardoc/complete | 0 .yardoc/object_types | Bin 9047 -> 0 bytes .yardoc/objects/root.dat | Bin 159880 -> 0 bytes .yardoc/proxy_types | Bin 4 -> 0 bytes HACKING.md | 8 +- LAYOUT.md | 58 +- README.md | 30 +- doc/Hyde.html | 185 -- doc/Hyde/CONNECTHandler.html | 221 --- doc/Hyde/Cookie.html | 830 --------- doc/Hyde/DELETEHandler.html | 221 --- doc/Hyde/DSL.html | 127 -- doc/Hyde/DSL/CommonMethods.html | 337 ---- doc/Hyde/DSL/PathConstructors.html | 964 ---------- doc/Hyde/DSL/PathMethods.html | 777 --------- doc/Hyde/DSL/ProbeConstructors.html | 327 ---- doc/Hyde/DSL/ProbeMethods.html | 936 ---------- doc/Hyde/DSL/TemplateMethods.html | 200 --- doc/Hyde/Error.html | 138 -- doc/Hyde/GETHandler.html | 366 ---- doc/Hyde/HEADHandler.html | 221 --- doc/Hyde/Handler.html | 609 ------- doc/Hyde/Handlers.html | 127 -- doc/Hyde/Handlers/CONNECT.html | 220 --- doc/Hyde/Handlers/DELETE.html | 220 --- doc/Hyde/Handlers/GET.html | 360 ---- doc/Hyde/Handlers/HEAD.html | 220 --- doc/Hyde/Handlers/Handler.html | 597 ------- doc/Hyde/Handlers/OPTIONS.html | 220 --- doc/Hyde/Handlers/PATCH.html | 220 --- doc/Hyde/Handlers/POST.html | 220 --- doc/Hyde/Handlers/PUT.html | 220 --- doc/Hyde/Handlers/Serve.html | 469 ----- doc/Hyde/Handlers/TRACE.html | 220 --- doc/Hyde/Node.html | 702 -------- doc/Hyde/OPTIONSHandler.html | 221 --- doc/Hyde/PATCHHandler.html | 221 --- doc/Hyde/POSTHandler.html | 221 --- doc/Hyde/PUTHandler.html | 221 --- doc/Hyde/ParsingError.html | 142 -- doc/Hyde/Path.html | 897 ---------- doc/Hyde/PathBinding.html | 245 --- doc/Hyde/PathContext.html | 242 --- doc/Hyde/Pattern.html | 552 ------ doc/Hyde/PatternMatching.html | 241 --- doc/Hyde/PatternMatching/Glob.html | 648 ------- doc/Hyde/PatternMatching/ReMatch.html | 557 ------ doc/Hyde/Probe.html | 465 ----- doc/Hyde/ProbeBinding.html | 219 --- doc/Hyde/ProbeContext.html | 249 --- doc/Hyde/ProcessorContext.html | 227 --- doc/Hyde/Request.html | 1548 ----------------- doc/Hyde/Response.html | 1150 ------------ doc/Hyde/ServeHandler.html | 476 ----- doc/Hyde/Server.html | 442 ----- doc/Hyde/ServerBinding.html | 162 -- doc/Hyde/ServerContext.html | 162 -- doc/Hyde/TRACEHandler.html | 221 --- doc/Hyde/Template.html | 766 -------- doc/Hyde/TemplateContext.html | 342 ---- doc/Hyde/Templates.html | 127 -- doc/Hyde/Templates/ERB.html | 312 ---- doc/Hyde/Templates/Erubi.html | 330 ---- doc/Hyde/Util.html | 582 ------- doc/Hyde/Util/FormPart.html | 1022 ----------- doc/Hyde/Util/HeaderRegexp.html | 274 --- doc/Hyde/Util/Lookup.html | 599 ------- doc/Hyde/Util/MultipartParser.html | 487 ------ doc/Hyde/Util/ParserCommon.html | 476 ----- doc/Hyde/Util/ParserSorting.html | 120 -- doc/Hyde/Util/Query.html | 498 ------ doc/_index.html | 576 ------ doc/class_list.html | 51 - doc/css/common.css | 1 - doc/css/full_list.css | 58 - doc/css/style.css | 497 ------ doc/file.README.html | 200 --- doc/file_list.html | 56 - doc/frames.html | 17 - doc/index.html | 200 --- doc/js/app.js | 314 ---- doc/js/full_list.js | 216 --- doc/js/jquery.js | 4 - doc/method_list.html | 1275 -------------- doc/top-level-namespace.html | 110 -- examples/buckets.ru | 4 +- examples/cookies/cookie.ru | 10 +- examples/extension_testing/extension.ru | 4 +- .../extension_testing/external_methods.rb | 2 +- examples/extension_testing/readme.txt | 2 +- examples/form/form.ru | 4 +- examples/form/readme.txt | 2 +- examples/form2/form.ru | 4 +- examples/form2/readme.txt | 2 +- examples/helloworld.ru | 4 +- examples/logging.ru | 4 +- examples/norxondor_gorgonax/config.ru | 6 +- examples/plugins/config.ru | 4 +- examples/plugins/helloworld.ru | 4 +- examples/query/config.ru | 4 +- examples/stack.ru | 4 +- examples/staticfiles.ru | 4 +- examples/templates/helloworld.ru | 4 +- hyde.gemspec => landline.gemspec | 9 +- lib/hyde.rb | 20 - lib/hyde/dsl/constructors_path.rb | 78 - lib/hyde/util/cookie.rb | 62 - lib/landline.rb | 20 + lib/landline/dsl/constructors_path.rb | 78 + .../dsl/constructors_probe.rb | 10 +- lib/{hyde => landline}/dsl/methods_common.rb | 2 +- lib/{hyde => landline}/dsl/methods_path.rb | 12 +- lib/{hyde => landline}/dsl/methods_probe.rb | 53 +- .../dsl/methods_template.rb | 2 +- lib/{hyde => landline}/node.rb | 10 +- lib/{hyde => landline}/path.rb | 34 +- lib/{hyde => landline}/pattern_matching.rb | 10 +- .../pattern_matching/glob.rb | 8 +- .../pattern_matching/rematch.rb | 8 +- .../pattern_matching/util.rb | 2 +- lib/{hyde => landline}/probe.rb | 38 +- lib/{hyde => landline}/probe/handler.rb | 12 +- lib/{hyde => landline}/probe/http_method.rb | 8 +- lib/{hyde => landline}/probe/serve_handler.rb | 8 +- lib/{hyde => landline}/request.rb | 11 +- lib/{hyde => landline}/response.rb | 42 +- lib/{hyde => landline}/server.rb | 12 +- lib/{hyde => landline}/template.rb | 16 +- lib/{hyde => landline}/template/erb.rb | 6 +- lib/{hyde => landline}/template/erubi.rb | 6 +- lib/landline/util/cookie.rb | 112 ++ lib/{hyde => landline}/util/errors.rb | 4 +- lib/{hyde => landline}/util/html.rb | 10 +- lib/{hyde => landline}/util/lookup.rb | 2 +- lib/{hyde => landline}/util/multipart.rb | 8 +- lib/{hyde => landline}/util/parsesorting.rb | 2 +- lib/{hyde => landline}/util/parseutils.rb | 26 +- lib/{hyde => landline}/util/query.rb | 4 +- test/{Hyde_Pattern.rb => Landline_Pattern.rb} | 4 +- ...ob.rb => Landline_PatternMatching_Glob.rb} | 4 +- ...rb => Landline_PatternMatching_ReMatch.rb} | 4 +- ...Util_Lookup.rb => Landline_Util_Lookup.rb} | 4 +- ...e_Util_Query.rb => Landline_Util_Query.rb} | 4 +- 145 files changed, 518 insertions(+), 30161 deletions(-) delete mode 100644 .yardoc/checksums delete mode 100644 .yardoc/complete delete mode 100644 .yardoc/object_types delete mode 100644 .yardoc/objects/root.dat delete mode 100644 .yardoc/proxy_types delete mode 100644 doc/Hyde.html delete mode 100644 doc/Hyde/CONNECTHandler.html delete mode 100644 doc/Hyde/Cookie.html delete mode 100644 doc/Hyde/DELETEHandler.html delete mode 100644 doc/Hyde/DSL.html delete mode 100644 doc/Hyde/DSL/CommonMethods.html delete mode 100644 doc/Hyde/DSL/PathConstructors.html delete mode 100644 doc/Hyde/DSL/PathMethods.html delete mode 100644 doc/Hyde/DSL/ProbeConstructors.html delete mode 100644 doc/Hyde/DSL/ProbeMethods.html delete mode 100644 doc/Hyde/DSL/TemplateMethods.html delete mode 100644 doc/Hyde/Error.html delete mode 100644 doc/Hyde/GETHandler.html delete mode 100644 doc/Hyde/HEADHandler.html delete mode 100644 doc/Hyde/Handler.html delete mode 100644 doc/Hyde/Handlers.html delete mode 100644 doc/Hyde/Handlers/CONNECT.html delete mode 100644 doc/Hyde/Handlers/DELETE.html delete mode 100644 doc/Hyde/Handlers/GET.html delete mode 100644 doc/Hyde/Handlers/HEAD.html delete mode 100644 doc/Hyde/Handlers/Handler.html delete mode 100644 doc/Hyde/Handlers/OPTIONS.html delete mode 100644 doc/Hyde/Handlers/PATCH.html delete mode 100644 doc/Hyde/Handlers/POST.html delete mode 100644 doc/Hyde/Handlers/PUT.html delete mode 100644 doc/Hyde/Handlers/Serve.html delete mode 100644 doc/Hyde/Handlers/TRACE.html delete mode 100644 doc/Hyde/Node.html delete mode 100644 doc/Hyde/OPTIONSHandler.html delete mode 100644 doc/Hyde/PATCHHandler.html delete mode 100644 doc/Hyde/POSTHandler.html delete mode 100644 doc/Hyde/PUTHandler.html delete mode 100644 doc/Hyde/ParsingError.html delete mode 100644 doc/Hyde/Path.html delete mode 100644 doc/Hyde/PathBinding.html delete mode 100644 doc/Hyde/PathContext.html delete mode 100644 doc/Hyde/Pattern.html delete mode 100644 doc/Hyde/PatternMatching.html delete mode 100644 doc/Hyde/PatternMatching/Glob.html delete mode 100644 doc/Hyde/PatternMatching/ReMatch.html delete mode 100644 doc/Hyde/Probe.html delete mode 100644 doc/Hyde/ProbeBinding.html delete mode 100644 doc/Hyde/ProbeContext.html delete mode 100644 doc/Hyde/ProcessorContext.html delete mode 100644 doc/Hyde/Request.html delete mode 100644 doc/Hyde/Response.html delete mode 100644 doc/Hyde/ServeHandler.html delete mode 100644 doc/Hyde/Server.html delete mode 100644 doc/Hyde/ServerBinding.html delete mode 100644 doc/Hyde/ServerContext.html delete mode 100644 doc/Hyde/TRACEHandler.html delete mode 100644 doc/Hyde/Template.html delete mode 100644 doc/Hyde/TemplateContext.html delete mode 100644 doc/Hyde/Templates.html delete mode 100644 doc/Hyde/Templates/ERB.html delete mode 100644 doc/Hyde/Templates/Erubi.html delete mode 100644 doc/Hyde/Util.html delete mode 100644 doc/Hyde/Util/FormPart.html delete mode 100644 doc/Hyde/Util/HeaderRegexp.html delete mode 100644 doc/Hyde/Util/Lookup.html delete mode 100644 doc/Hyde/Util/MultipartParser.html delete mode 100644 doc/Hyde/Util/ParserCommon.html delete mode 100644 doc/Hyde/Util/ParserSorting.html delete mode 100644 doc/Hyde/Util/Query.html delete mode 100644 doc/_index.html delete mode 100644 doc/class_list.html delete mode 100644 doc/css/common.css delete mode 100644 doc/css/full_list.css delete mode 100644 doc/css/style.css delete mode 100644 doc/file.README.html delete mode 100644 doc/file_list.html delete mode 100644 doc/frames.html delete mode 100644 doc/index.html delete mode 100644 doc/js/app.js delete mode 100644 doc/js/full_list.js delete mode 100644 doc/js/jquery.js delete mode 100644 doc/method_list.html delete mode 100644 doc/top-level-namespace.html rename hyde.gemspec => landline.gemspec (59%) delete mode 100644 lib/hyde.rb delete mode 100644 lib/hyde/dsl/constructors_path.rb delete mode 100644 lib/hyde/util/cookie.rb create mode 100644 lib/landline.rb create mode 100644 lib/landline/dsl/constructors_path.rb rename lib/{hyde => landline}/dsl/constructors_probe.rb (80%) rename lib/{hyde => landline}/dsl/methods_common.rb (98%) rename lib/{hyde => landline}/dsl/methods_path.rb (87%) rename lib/{hyde => landline}/dsl/methods_probe.rb (61%) rename lib/{hyde => landline}/dsl/methods_template.rb (94%) rename lib/{hyde => landline}/node.rb (90%) rename lib/{hyde => landline}/path.rb (83%) rename lib/{hyde => landline}/pattern_matching.rb (88%) rename lib/{hyde => landline}/pattern_matching/glob.rb (96%) rename lib/{hyde => landline}/pattern_matching/rematch.rb (84%) rename lib/{hyde => landline}/pattern_matching/util.rb (95%) rename lib/{hyde => landline}/probe.rb (55%) rename lib/{hyde => landline}/probe/handler.rb (87%) rename lib/{hyde => landline}/probe/http_method.rb (92%) rename lib/{hyde => landline}/probe/serve_handler.rb (84%) rename lib/{hyde => landline}/request.rb (93%) rename lib/{hyde => landline}/response.rb (72%) rename lib/{hyde => landline}/server.rb (80%) rename lib/{hyde => landline}/template.rb (86%) rename lib/{hyde => landline}/template/erb.rb (87%) rename lib/{hyde => landline}/template/erubi.rb (90%) create mode 100644 lib/landline/util/cookie.rb rename lib/{hyde => landline}/util/errors.rb (69%) rename lib/{hyde => landline}/util/html.rb (94%) rename lib/{hyde => landline}/util/lookup.rb (98%) rename lib/{hyde => landline}/util/multipart.rb (96%) rename lib/{hyde => landline}/util/parsesorting.rb (98%) rename lib/{hyde => landline}/util/parseutils.rb (86%) rename lib/{hyde => landline}/util/query.rb (96%) rename test/{Hyde_Pattern.rb => Landline_Pattern.rb} (87%) rename test/{Hyde_PatternMatching_Glob.rb => Landline_PatternMatching_Glob.rb} (98%) rename test/{Hyde_PatternMatching_ReMatch.rb => Landline_PatternMatching_ReMatch.rb} (88%) rename test/{Hyde_Util_Lookup.rb => Landline_Util_Lookup.rb} (89%) rename test/{Hyde_Util_Query.rb => Landline_Util_Query.rb} (87%) diff --git a/.gitignore b/.gitignore index 8966b04..e15841d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ /*.gem +/doc +/.yardoc diff --git a/.yardoc/checksums b/.yardoc/checksums deleted file mode 100644 index 55daed0..0000000 --- a/.yardoc/checksums +++ /dev/null @@ -1,31 +0,0 @@ -lib/hyde.rb 632d043ed6e7484bca963c37e1629e1d88c89b69 -lib/hyde/node.rb 6f1292fd88ba86988aaae75fb3d94c473b667654 -lib/hyde/path.rb 42c04e42ea879ad73f639f2086b3ab5ca40489dc -lib/hyde/probe.rb 673b55e9aa8c8286a770bd23ae00bff1ac2047fe -lib/hyde/server.rb b68b932a689a2f8dbebebc2dc7eef5972c13d974 -lib/hyde/request.rb 792427908273455eb694e13d3517cdae43af3454 -lib/hyde/response.rb a82971ec8f86201de804e61b4dd277b48d28e8b2 -lib/hyde/template.rb 69e46f8095e5e06dd69129ed975a5ce1e6d3de1f -lib/hyde/util/html.rb 258126a18f9e73068f2becc09a29bd8461941400 -lib/hyde/util/query.rb b1e7b6da88a5d29198fba7188660a13ad47ac499 -lib/hyde/util/cookie.rb 9a2eb0fdf1f716380c5314cf8fd21df2a60c8237 -lib/hyde/util/errors.rb c275348668ee17c6478e60f3ecfb0c3b9d614480 -lib/hyde/util/lookup.rb 5b8e28a8471bb786f4e0a0d616885d238c806661 -lib/hyde/template/erb.rb d8c808a1fafaa65b400780204063bae6046e2f54 -lib/hyde/probe/handler.rb 9b3eb4ce702c40920c04ed0cb3b93984683de447 -lib/hyde/template/erubi.rb 74793cda58f79d6be3ce4ca25dc231296485bd4c -lib/hyde/util/multipart.rb 4c29eea87eb2093bad9cea228032121021aa38b9 -lib/hyde/util/parseutils.rb 14376e92c85209d4ba46f4659652bb87a28e3a82 -lib/hyde/dsl/methods_path.rb a695d61027389799893e15db5ae29de2a7511992 -lib/hyde/pattern_matching.rb fe86f6529a2d22c128d9d3a74217862e9fa59c15 -lib/hyde/dsl/methods_probe.rb c9fa8a2f095f6c99d356851f65786d70a288f690 -lib/hyde/probe/http_method.rb 26ba5c9dabff5508dbd6efcba1711d6417cf957b -lib/hyde/util/parsesorting.rb a5eb853e443944ff678d70652fce86998c6b02c6 -lib/hyde/dsl/methods_common.rb ea06161f4324127fbbacd51918eadc4e059e4fcf -lib/hyde/probe/serve_handler.rb 6c1d2a7b949700468342ced4c23c7fe60df4d3f0 -lib/hyde/dsl/methods_template.rb 5ea0be9ad7411ed0d5bd50435edf2b7be9bd0b6f -lib/hyde/dsl/constructors_path.rb 9609d3470a1b0f3c30b83a15ef7683ab8c751960 -lib/hyde/pattern_matching/glob.rb 16595083bc8d6f7b98f4adda502a05bd411bc1ca -lib/hyde/pattern_matching/util.rb 188dc7d5d9a9a6538a01943a83eb132c385dc092 -lib/hyde/dsl/constructors_probe.rb c447b87b77ddb476584a3d77c5bf58f8122492ee -lib/hyde/pattern_matching/rematch.rb 54a4f94791e68d85c38034d954e4c3174e01511b diff --git a/.yardoc/complete b/.yardoc/complete deleted file mode 100644 index e69de29..0000000 diff --git a/.yardoc/object_types b/.yardoc/object_types deleted file mode 100644 index 79149b8257323f98728099bdaaf5082c96a385f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9047 zcma)CYi}#J5p99uwn@=<`hHtYnl`D?wBI%;3Psk9h1ixN%K-|bSgf?PytTC4?Bn*{ z_TTlFb+~iLCuqI2_L7aLD!7zVY9;qqj<}>-%RPe^#H*yNR5{bfqt03UZJvE`d&PhM-2ELztE7IsR`sJ!vG&hcNaM9C^XsJEJ!biy zC;q~pSn913Gk?WWW3|z1thm)>?Pg;WWJVORd1CsnJ>}LP0`MCTV9cKBysFD)S8MCd z-}(q+Ump^EYiA}Ud3}GjIQu@sznHIY7t0&o;&(B2wYZt{2tqVluKuxJe0sSNt}u4c zW=p-J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?koyJ*%KAhocEES`fkNnS zf$kN#du=}Hl)6l8GM&Vck1flI66~+6i#nq)vW+J-R_4WvacDOv5{8WJe+Tdvv>=(G zbQtWBF+6z!2V(jYpWK7M^Iek1y$`9Qwk!rRJk2UzyX;1>UBQiHhgOd;)ZGuJYn%( S=s?}4p$NyAgP}GE;Qs+Hb7!Lf diff --git a/.yardoc/objects/root.dat b/.yardoc/objects/root.dat deleted file mode 100644 index 828991337fd2c39ed3002ce315150d259c9a2d41..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 159880 zcmeFad2n1wdLP)p%rr?5Jeu9?gMB>~y2%0?EP!lsx~Gb4f=z-=O!FE5oY4%LgDC(H zKn;N^s16>(=1B6`vNX0(!08Jp9?Inc3;<*UC>!wi=!0 zQoPW7bGb$KOfKIC5^76xjmpr0 z%5K8s1eB$apwSQ< zDz8izW_WCvet|xYk38_8^)M>VfPCR`;=VzwhxjdHx)+ZUPOO4I@&D!c(+mNY&W$JSRz*kcM zdaN=gQ2|3dS-_P$LLA8tciy${aPs8{Oc~s^X!U5BTgGQE(*U=;i zG!(BrAvoNZ^uS2;`Qov?MAT2s?`RkaGzVc-F5|yL5H=7r3nccY3qw3E9wP)=e6KxS zc#OKK>~)5SDU&pWh@CF%7RYd!=O<4!DicGM6L{T>+nr{e8mgR}E<9h2>haykKqzXg zL384s4--;pM zJN0($F_7L#OgFx_35i{6&k@fK{P=Rbf{_{g6sfB*bjS!89f~3hp$$aUL5?@%R|%8h za-*e{W*mPd=2A^iL9-3&L_tCQ&30|QT)xt1-0o~@9cuMRY15YF4rpmbrFw0h8fwNH z)lEFERM%Va5Tr597xK7OTdh|CRiLTRb<7MOV)bKBS6;hR8LJ#OBze#wN$T`0ie9Re zWUWj{P-X7f+98#>TsA;gW3zFaF&WWP8u2`e>$ThZvsRC;VNtm^YRON@BOx=Qjx2=< zMeLsCRg|am{N#+Gt)XVM)?z+#Dk~8kINx0D&{96tY&M#vrlF?ueGZpaJFurxos7b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c#ZB-bq<$uJ9WJDeo%`oEv22x z<`T;`kCZ6nLZSJ%6JhYuVdXOQx)kTuF! [], "2" => [], "3" => [] } -app = Hyde::Server.new do +app = Landline::Server.new do path "bucket_(1|2|3)" do get "pop" do |bucket| header "content-type", "text/plain" @@ -70,9 +70,9 @@ Static file serving (Note: index applies *only* to /var/www (to the path its defined in)) ```ruby -require 'hyde' +require 'landline' -app = Hyde::Server.new do +app = Landline::Server.new do root "/var/www" index ["index.html","index.htm"] serve "**/*.(html|htm)" @@ -84,9 +84,9 @@ run app Logging on a particular path ```ruby -require 'hyde' +require 'landline' -app = Hyde::Server.new do +app = Landline::Server.new do path "unimportant" do get "version" do header "content-type", "text/plain" @@ -117,7 +117,7 @@ Someday it's gonna be there somewhere # License ``` - Hyde - an HTTP request pattern matching system + Landline - an HTTP request pattern matching system Copyright (C) 2022 yessiest (yessiest@memeware.net) This program is free software: you can redistribute it and/or modify diff --git a/doc/Hyde.html b/doc/Hyde.html deleted file mode 100644 index ad6dd8e..0000000 --- a/doc/Hyde.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - Module: Hyde - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - -

- -
- - -

Module: Hyde - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde.rb,
- lib/hyde/node.rb,
lib/hyde/path.rb,
lib/hyde/probe.rb,
lib/hyde/server.rb,
lib/hyde/request.rb,
lib/hyde/response.rb,
lib/hyde/template.rb,
lib/hyde/util/html.rb,
lib/hyde/util/query.rb,
lib/hyde/util/cookie.rb,
lib/hyde/util/errors.rb,
lib/hyde/util/lookup.rb,
lib/hyde/template/erb.rb,
lib/hyde/probe/handler.rb,
lib/hyde/template/erubi.rb,
lib/hyde/util/multipart.rb,
lib/hyde/util/parseutils.rb,
lib/hyde/dsl/methods_path.rb,
lib/hyde/pattern_matching.rb,
lib/hyde/dsl/methods_probe.rb,
lib/hyde/probe/http_method.rb,
lib/hyde/util/parsesorting.rb,
lib/hyde/dsl/methods_common.rb,
lib/hyde/probe/serve_handler.rb,
lib/hyde/dsl/methods_template.rb,
lib/hyde/dsl/constructors_path.rb,
lib/hyde/pattern_matching/glob.rb,
lib/hyde/pattern_matching/util.rb,
lib/hyde/dsl/constructors_probe.rb,
lib/hyde/pattern_matching/rematch.rb
-
-
- -
- -

Overview

-
-

Hyde is a hideously simple ruby web framework

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: DSL, Handlers, PatternMatching, Templates, Util - - - - Classes: Cookie, Error, Node, ParsingError, Path, PathContext, Pattern, Probe, ProbeContext, ProcessorContext, Request, Response, Server, ServerContext, Template, TemplateContext - - -

- - -

- Constant Summary - collapse -

- -
- -
VERSION = -
-
-

Hyde version

- - -
-
-
- - -
-
-
'0.8 (beta/rewrite)'
- -
VLINE = -
-
-

Hyde branding and version

- - -
-
-
- - -
-
-
"Hyde/#{Hyde::VERSION} (Ruby/#{RUBY_VERSION}/#{RUBY_RELEASE_DATE})\n"
- - -
"Copyright 2023 Yessiest"
- -
- - - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/CONNECTHandler.html b/doc/Hyde/CONNECTHandler.html deleted file mode 100644 index 7de4a2c..0000000 --- a/doc/Hyde/CONNECTHandler.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Class: Hyde::CONNECTHandler - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::CONNECTHandler - - - -

-
- -
-
Inherits:
-
- GETHandler - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/http_method.rb
-
- -
- -

Overview

-
- -

Probe that executes callback on a CONNECT

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
METHOD = - -
-
"CONNECT"
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Handler

-

#request, #response

- - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - - - - - - - -

Method Summary

- -

Methods inherited from GETHandler

-

#process

- - - - - - - - - -

Methods inherited from Handler

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Probe

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Node

-

#go, #initialize, #process, #reject

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::Handler

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Cookie.html b/doc/Hyde/Cookie.html deleted file mode 100644 index 717cf83..0000000 --- a/doc/Hyde/Cookie.html +++ /dev/null @@ -1,830 +0,0 @@ - - - - - - - Class: Hyde::Cookie - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Cookie - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/util/cookie.rb
-
- -
- -

Overview

-
-

Utility class for handling cookies

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #key ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute key.

    -
    - -
  • - - -
  • - - - #params ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute params.

    -
    - -
  • - - -
  • - - - #value ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute value.

    -
    - -
  • - - -
- - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(key, value, params = {}) ⇒ Cookie - - - - - -

-
-

Returns a new instance of Cookie.

- - -
-
-
-

Parameters:

-
    - -
  • - - data - - - (String) - - - - — -

    raw cookie data

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-
-
# File 'lib/hyde/util/cookie.rb', line 10
-
-def initialize(key, value, params = {})
-  unless key.match? Hyde::Util::HeaderRegexp::COOKIE_KEY
-    raise Hyde::ParsingError, "invalid cookie key: #{key}"
-  end
-
-  unless value.match? Hyde::Util::HeaderRegexp::COOKIE_VALUE
-    raise Hyde::ParsingError, "invalid cookie value: #{value}"
-  end
-
-  @key = key
-  @value = value
-  @params = params
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #keyObject - - - - - -

-
-

Returns the value of attribute key.

- - -
-
-
- - -
- - - - -
-
-
-
-35
-36
-37
-
-
# File 'lib/hyde/util/cookie.rb', line 35
-
-def key
-  @key
-end
-
-
- - - -
-

- - #paramsObject (readonly) - - - - - -

-
-

Returns the value of attribute params.

- - -
-
-
- - -
- - - - -
-
-
-
-36
-37
-38
-
-
# File 'lib/hyde/util/cookie.rb', line 36
-
-def params
-  @params
-end
-
-
- - - -
-

- - #valueObject - - - - - -

-
-

Returns the value of attribute value.

- - -
-
-
- - -
- - - - -
-
-
-
-35
-36
-37
-
-
# File 'lib/hyde/util/cookie.rb', line 35
-
-def value
-  @value
-end
-
-
- -
- - -
-

Class Method Details

- - -
-
-
-

Create cookie(s) from a "Cookie: " format

- - -
-
-
-

Parameters:

-
    - -
  • - - data - - - (String) - - - - — -

    value part of "Cookie: " header

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Array(Cookie)) - - - -
  • - -
- -
- - - - -
-
-
-
-53
-54
-55
-56
-57
-
-
# File 'lib/hyde/util/cookie.rb', line 53
-
-def self.from_cookie_string(data)
-  data.split(";").map do |cookiestr|
-    Cookie.new(*cookiestr.split("=").map(&:strip))
-  end
-end
-
-
- -
-

- - .from_setcookie_string(data) ⇒ Cookie - - - - - -

-
-

Create cookie from a "Set-Cookie: " format

- - -
-
-
-

Parameters:

-
    - -
  • - - data - - - (String) - - - - — -

    value part of "Set-Cookie: " header

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Cookie) - - - -
  • - -
- -
- - - - -
-
-
-
-41
-42
-43
-44
-45
-46
-47
-48
-
-
# File 'lib/hyde/util/cookie.rb', line 41
-
-def self.from_setcookie_string(data)
-  kvpair, params = Hyde::Util::ParserCommon.parse_value(
-    data,
-    regexp: Hyde::Util::HeaderRegexp::COOKIE_PARAM
-  )
-  key, value = kvpair.split("=").map(&:strip)
-  Cookie.new(key, value, params)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #to_sString - - - - - -

-
-

Convert cookie to "Set-Cookie: " string representation.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'lib/hyde/util/cookie.rb', line 26
-
-def to_s
-  Hyde::Util.make_value(to_short, @params)
-end
-
-
- -
-

- - #to_shortObject - - - - - -

-
-

Convert cookie to "Cookie: " string representation (no params)

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'lib/hyde/util/cookie.rb', line 31
-
-def to_short
-  "#{key.to_s.strip}=#{value.to_s.strip}"
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/DELETEHandler.html b/doc/Hyde/DELETEHandler.html deleted file mode 100644 index 3dc250b..0000000 --- a/doc/Hyde/DELETEHandler.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Class: Hyde::DELETEHandler - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::DELETEHandler - - - -

-
- -
-
Inherits:
-
- GETHandler - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/http_method.rb
-
- -
- -

Overview

-
- -

Probe that executes callback on a DELETE

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
METHOD = - -
-
"DELETE"
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Handler

-

#request, #response

- - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - - - - - - - -

Method Summary

- -

Methods inherited from GETHandler

-

#process

- - - - - - - - - -

Methods inherited from Handler

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Probe

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Node

-

#go, #initialize, #process, #reject

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::Handler

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/DSL.html b/doc/Hyde/DSL.html deleted file mode 100644 index b8ed01d..0000000 --- a/doc/Hyde/DSL.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - Module: Hyde::DSL - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Hyde::DSL - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/dsl/methods_path.rb,
- lib/hyde/dsl/methods_probe.rb,
lib/hyde/dsl/methods_common.rb,
lib/hyde/dsl/methods_template.rb,
lib/hyde/dsl/constructors_path.rb,
lib/hyde/dsl/constructors_probe.rb
-
-
- -
- -

Overview

-
-

Shared DSL methods

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: CommonMethods, PathConstructors, PathMethods, ProbeConstructors, ProbeMethods, TemplateMethods - - - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/DSL/CommonMethods.html b/doc/Hyde/DSL/CommonMethods.html deleted file mode 100644 index 506563a..0000000 --- a/doc/Hyde/DSL/CommonMethods.html +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - - Module: Hyde::DSL::CommonMethods - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Hyde::DSL::CommonMethods - - - -

-
- - - - - - - - - -
-
Included in:
-
ProbeContext, ProcessorContext, TemplateContext
-
- - - -
-
Defined in:
-
lib/hyde/dsl/methods_common.rb
-
- -
- -

Overview

-
-

Methods shared by probes, preprocessors and filters.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #bounceObject - - - - - -

-
-

Bounce request to the next handler

- - -
-
-
- -

Raises:

-
    - -
  • - - - (UncaughtThrowError) - - - - — -

    throws :break to get out of the callback

    -
    - -
  • - -
- -
- - - - -
-
-
-
-23
-24
-25
-
-
# File 'lib/hyde/dsl/methods_common.rb', line 23
-
-def bounce
-  throw :break
-end
-
-
- -
-

- - #die(errorcode, backtrace: nil) ⇒ Object - - - - - -

-
-

Stop execution and generate a boilerplate response with the given code

- - -
-
-
-

Parameters:

-
    - -
  • - - errorcode - - - (Integer) - - - -
  • - -
  • - - backtrace - - - (Array(String), nil) - - - (defaults to: nil) - - -
  • - -
- -

Raises:

-
    - -
  • - - - (UncaughtThrowError) - - - - — -

    throws :finish to return back to Server

    -
    - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-19
-
-
# File 'lib/hyde/dsl/methods_common.rb', line 11
-
-def die(errorcode, backtrace: nil)
-  throw :finish, [errorcode].append(
-    *(@origin.properties["handle.#{errorcode}"] or
-      @origin.properties["handle.default"]).call(
-        errorcode,
-        backtrace: backtrace
-      )
-  )
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/DSL/PathConstructors.html b/doc/Hyde/DSL/PathConstructors.html deleted file mode 100644 index 85beb8b..0000000 --- a/doc/Hyde/DSL/PathConstructors.html +++ /dev/null @@ -1,964 +0,0 @@ - - - - - - - Module: Hyde::DSL::PathConstructors - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Hyde::DSL::PathConstructors - - - -

-
- - - - - - - - - -
-
Included in:
-
PathContext
-
- - - -
-
Defined in:
-
lib/hyde/dsl/constructors_path.rb
-
- -
- -

Overview

-
-

Path (and subclasses) DSL constructors

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #connect(path, &setup) ⇒ Object - - - - - -

-
-

Create a new Handlers::CONNECTHandler object

- - -
-
-
- - -
- - - - -
-
-
-
-53
-54
-55
-
-
# File 'lib/hyde/dsl/constructors_path.rb', line 53
-
-def connect(path, &setup)
-  register(Hyde::Handlers::CONNECT.new(path, parent: @origin, &setup))
-end
-
-
- -
-

- - #delete(path, &setup) ⇒ Object - - - - - -

-
-

Create a new Handlers::DELETEHandler object

- - -
-
-
- - -
- - - - -
-
-
-
-48
-49
-50
-
-
# File 'lib/hyde/dsl/constructors_path.rb', line 48
-
-def delete(path, &setup)
-  register(Hyde::Handlers::DELETE.new(path, parent: @origin, &setup))
-end
-
-
- -
-

- - #get(path, &setup) ⇒ Object - - - - - -

-
-

Create a new Handlers::GETHandler object

- - -
-
-
- - -
- - - - -
-
-
-
-28
-29
-30
-
-
# File 'lib/hyde/dsl/constructors_path.rb', line 28
-
-def get(path, &setup)
-  register(Hyde::Handlers::GET.new(path, parent: @origin, &setup))
-end
-
-
- -
-

- - #head(path, &setup) ⇒ Object - - - - - -

-
-

Create a new Handlers::HEADHandler object

- - -
-
-
- - -
- - - - -
-
-
-
-43
-44
-45
-
-
# File 'lib/hyde/dsl/constructors_path.rb', line 43
-
-def head(path, &setup)
-  register(Hyde::Handlers::HEAD.new(path, parent: @origin, &setup))
-end
-
-
- -
-

- - #options(path, &setup) ⇒ Object - - - - - -

-
-

Create a new Handlers::OPTIONSHandler object

- - -
-
-
- - -
- - - - -
-
-
-
-68
-69
-70
-
-
# File 'lib/hyde/dsl/constructors_path.rb', line 68
-
-def options(path, &setup)
-  register(Hyde::Handlers::OPTIONS.new(path, parent: @origin, &setup))
-end
-
-
- -
-

- - #patch(path, &setup) ⇒ Object - - - - - -

-
-

Create a new Handlers::PATCHHandler object

- - -
-
-
- - -
- - - - -
-
-
-
-63
-64
-65
-
-
# File 'lib/hyde/dsl/constructors_path.rb', line 63
-
-def patch(path, &setup)
-  register(Hyde::Handlers::PATCH.new(path, parent: @origin, &setup))
-end
-
-
- -
-

- - #path(path, &setup) ⇒ Object - - - - - -

-
-

Create a new Path object

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'lib/hyde/dsl/constructors_path.rb', line 18
-
-def path(path, &setup)
-  register(Hyde::Path.new(path, parent: @origin, &setup))
-end
-
-
- -
-

- - #post(path, &setup) ⇒ Object - - - - - -

-
-

create a new Handlers::POSTHandler object

- - -
-
-
- - -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'lib/hyde/dsl/constructors_path.rb', line 33
-
-def post(path, &setup)
-  register(Hyde::Handlers::POST.new(path, parent: @origin, &setup))
-end
-
-
- -
-

- - #probe(path, &_setup) ⇒ Object - - - - - -

-
-

Create a new Handlers::Probe object

- - -
-
-
- - -
- - - - -
-
-
-
-23
-24
-25
-
-
# File 'lib/hyde/dsl/constructors_path.rb', line 23
-
-def probe(path, &_setup)
-  register(Hyde::Handlers::Probe.new(path, parent: @origin))
-end
-
-
- -
-

- - #put(path, &setup) ⇒ Object - - - - - -

-
-

Create a new Handlers::PUTHandler object

- - -
-
-
- - -
- - - - -
-
-
-
-38
-39
-40
-
-
# File 'lib/hyde/dsl/constructors_path.rb', line 38
-
-def put(path, &setup)
-  register(Hyde::Handlers::PUT.new(path, parent: @origin, &setup))
-end
-
-
- -
-

- - #register(obj) ⇒ Object - - - - - -

-
-

Append a Node child object to the list of children

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-12
-13
-14
-15
-
-
# File 'lib/hyde/dsl/constructors_path.rb', line 9
-
-def register(obj)
-  unless obj.is_a? Hyde::Node
-    raise ArgumentError, "register accepts node children only"
-  end
-
-  @origin.children.append(obj)
-end
-
-
- -
-

- - #serve(path) ⇒ Object - - - - - -

-
-

Create a new Handlers::GETHandler that serves static files

- - -
-
-
- - -
- - - - -
-
-
-
-73
-74
-75
-
-
# File 'lib/hyde/dsl/constructors_path.rb', line 73
-
-def serve(path)
-  register(Hyde::Handlers::Serve.new(path, parent: @origin))
-end
-
-
- -
-

- - #trace(path, &setup) ⇒ Object - - - - - -

-
-

Create a new Handlers::TRACEHandler object

- - -
-
-
- - -
- - - - -
-
-
-
-58
-59
-60
-
-
# File 'lib/hyde/dsl/constructors_path.rb', line 58
-
-def trace(path, &setup)
-  register(Hyde::Handlers::TRACE.new(path, parent: @origin, &setup))
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/DSL/PathMethods.html b/doc/Hyde/DSL/PathMethods.html deleted file mode 100644 index ab46ee9..0000000 --- a/doc/Hyde/DSL/PathMethods.html +++ /dev/null @@ -1,777 +0,0 @@ - - - - - - - Module: Hyde::DSL::PathMethods - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Hyde::DSL::PathMethods - - - -

-
- - - - - - - - - -
-
Included in:
-
PathContext
-
- - - -
-
Defined in:
-
lib/hyde/dsl/methods_path.rb
-
- -
- -

Overview

-
-

Common path methods

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #filter(&block) {|request| ... } ⇒ Object - - - - - -

-
-

Add a filter to the path. -Blocks path access if a filter returns false.

- - -
-
-
-

Parameters:

-
    - -
  • - - block - - - (#call) - - - -
  • - -
- -

Yield Parameters:

- - -
- - - - -
-
-
-
-55
-56
-57
-58
-
-
# File 'lib/hyde/dsl/methods_path.rb', line 55
-
-def filter(&block)
-  @origin.filter(&block)
-  block
-end
-
-
- -
-

- - #index(index) ⇒ Object - - - - - -

-
-

Set path index

- - -
-
-
-

Parameters:

-
    - -
  • - - index - - - (Array, String) - - - -
  • - -
- - -
- - - - -
-
-
-
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-
-
# File 'lib/hyde/dsl/methods_path.rb', line 10
-
-def index(index)
-  case index
-  when Array
-    @origin.properties['index'] = index
-  when String
-    @origin.properties['index'] = [index]
-  else
-    raise ArgumentError, "index should be an Array or a String"
-  end
-end
-
-
- -
-

- - #plugin(filename) ⇒ Object - - - - - -

-
-

Include an application as a child of path.

- - -
-
-
-

Parameters:

-
    - -
  • - - filename - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-
-
# File 'lib/hyde/dsl/methods_path.rb', line 62
-
-def plugin(filename)
-  self.define_singleton_method(:run) do |object|
-    unless object.is_a? Hyde::Node
-      raise ArgumentError, "not a node instance or subclass instance"
-    end
-
-    object
-  end
-  @origin.children.append(self.instance_eval(File.read(filename)))
-  self.singleton_class.undef_method :run
-end
-
-
- -
-

- - #postprocess(&block) {|request, response| ... } ⇒ Object - - - - - -

-
-

Add a postprocessor to the path.

- - -
-
-
-

Parameters:

-
    - -
  • - - block - - - (#call) - - - -
  • - -
- -

Yield Parameters:

- - -
- - - - -
-
-
-
-46
-47
-48
-49
-
-
# File 'lib/hyde/dsl/methods_path.rb', line 46
-
-def postprocess(&block)
-  @origin.postprocess(&block)
-  block
-end
-
-
- -
-

- - #preprocess(&block) {|request| ... } ⇒ Object - - - - - -

-
-

Add a preprocessor to the path. -Does not modify path execution.

- - -
-
-
-

Parameters:

-
    - -
  • - - block - - - (#call) - - - -
  • - -
- -

Yield Parameters:

- - -
- - - - -
-
-
-
-37
-38
-39
-40
-
-
# File 'lib/hyde/dsl/methods_path.rb', line 37
-
-def preprocess(&block)
-  @origin.preprocess(&block)
-  block
-end
-
-
- -
-

- - #remap(path) ⇒ Object - - - - - -

-
-

Set root path (without appending matched part).

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'lib/hyde/dsl/methods_path.rb', line 29
-
-def remap(path)
-  @origin.remap = path
-end
-
-
- -
-

- - #root(path) ⇒ Object - - - - - -

-
-

Set root path (appends matched part of the path).

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-23
-24
-25
-
-
# File 'lib/hyde/dsl/methods_path.rb', line 23
-
-def root(path)
-  @origin.root = path
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/DSL/ProbeConstructors.html b/doc/Hyde/DSL/ProbeConstructors.html deleted file mode 100644 index d0da29a..0000000 --- a/doc/Hyde/DSL/ProbeConstructors.html +++ /dev/null @@ -1,327 +0,0 @@ - - - - - - - Module: Hyde::DSL::ProbeConstructors - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Hyde::DSL::ProbeConstructors - - - -

-
- - - - - - - - - -
-
Included in:
-
ProbeContext, TemplateContext
-
- - - -
-
Defined in:
-
lib/hyde/dsl/constructors_probe.rb
-
- -
- -

Overview

-
-

Probe (and subclasses) DSL construct

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #erb(input, vars = {}) ⇒ Object - - - - - -

-
-

Create a new erb template

- - -
-
-
- - -

See Also:

-
    - -
  • Hyde::DSL::ProbeConstructors.{Hyde{Hyde::Template{Hyde::Template#new}
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-12
-13
-
-
# File 'lib/hyde/dsl/constructors_probe.rb', line 9
-
-def erb(input, vars = {})
-  Hyde::Templates::ERB.new(input,
-                           vars,
-                           parent: @origin)
-end
-
-
- -
-

- - #erubi(input, vars = {}, freeze: true, capture: false) ⇒ Object - - - - - -

-
-

Create a new erb template using Erubi engine

- - -
-
-
-

Parameters:

-
    - -
  • - - freeze - - - (Boolean) - - - (defaults to: true) - - - — -

    whether to use frozen string literal

    -
    - -
  • - -
  • - - capture - - - (Boolean) - - - (defaults to: false) - - - — -

    whether to enable output capturing

    -
    - -
  • - -
- - -

See Also:

-
    - -
  • Hyde::DSL::ProbeConstructors.{Hyde{Hyde::Template{Hyde::Template#new}
  • - -
- -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-
-
# File 'lib/hyde/dsl/constructors_probe.rb', line 19
-
-def erubi(input, vars = {}, freeze: true, capture: false)
-  Hyde::Templates::Erubi.new(input,
-                             vars,
-                             parent: @origin,
-                             freeze: freeze,
-                             capture: capture)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/DSL/ProbeMethods.html b/doc/Hyde/DSL/ProbeMethods.html deleted file mode 100644 index b6447e4..0000000 --- a/doc/Hyde/DSL/ProbeMethods.html +++ /dev/null @@ -1,936 +0,0 @@ - - - - - - - Module: Hyde::DSL::ProbeMethods - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Hyde::DSL::ProbeMethods - - - -

-
- - - - - - - - - -
-
Included in:
-
ProbeContext, TemplateContext
-
- - - -
-
Defined in:
-
lib/hyde/dsl/methods_probe.rb
-
- -
- -

Overview

-
-

Common methods for Probe objects

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #escape_html(text) ⇒ Object - - - - - -

-
-

Escape HTML entities

- - -
-
-
- - -

See Also:

- - -
- - - - -
-
-
-
-99
-100
-101
-
-
# File 'lib/hyde/dsl/methods_probe.rb', line 99
-
-def escape_html(text)
-  Hyde::Util.escape_html(text)
-end
-
-
- -
-

- - #file(path, mode = "r", *all, &block) ⇒ Object - - - - - -

-
-

Open a file relative to current filepath

- - -
-
-
- - -

See Also:

-
    - -
  • File.open
  • - -
- -
- - - - -
-
-
-
-93
-94
-95
-
-
# File 'lib/hyde/dsl/methods_probe.rb', line 93
-
-def file(path, mode = "r", *all, &block)
-  File.open("#{request.filepath}/#{path}", mode, *all, &block)
-end
-
-
- -
-

- - #formHash{String=>(String,Hyde::Util::FormPart)} - - - - - -

-
-

Returns formdata

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-82
-83
-84
-85
-86
-87
-88
-89
-
-
# File 'lib/hyde/dsl/methods_probe.rb', line 82
-
-def form
-  _, opts = Hyde::Util::ParserCommon.parse_value(
-    request.headers["content-type"]
-  )
-  Hyde::Util::MultipartParser.new(
-    request.input, opts["boundary"]
-  ).to_h
-end
-
-
- -
-

- - #form?Boolean - - - - - -

-
-

Checks if current request has multipart/form-data associated with it

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-
-
# File 'lib/hyde/dsl/methods_probe.rb', line 68
-
-def form?
-  value, opts = Hyde::Util::ParserCommon.parse_value(
-    request.headers["content-type"]
-  )
-  if value == "multipart/form-data" and
-     opts["boundary"]
-    true
-  else
-    false
-  end
-end
-
-
- -
-

- - #header(key, value) ⇒ Object - - - - - -

-
-

Set response header (generate response if one doesn't exist yet)

- - -
-
-
-

Parameters:

-
    - -
  • - - key - - - (String) - - - - — -

    header name

    -
    - -
  • - -
  • - - value - - - (String) - - - - — -

    header value

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-
-
# File 'lib/hyde/dsl/methods_probe.rb', line 30
-
-def header(key, value)
-  return status(value) if key.downcase == "status"
-
-  if key.match(Hyde::Util::HeaderRegexp::TOKEN)
-    raise ArgumentError, "header key has invalid characters"
-  end
-
-  if value&.match(Hyde::Util::HeaderRegexp::PRINTABLE)
-    raise ArgumentError, "value key has invalid characters"
-  end
-
-  @origin.response = (@origin.response or Hyde::Response.new)
-  key = key.downcase
-  @origin.response.add_header(key, value)
-end
-
-
- -
-

- - #remove_header(key, value = nil) ⇒ Object - - - - - -

-
-

Delete a header value from the headers hash -If no value is provided, deletes all key entries

- - -
-
-
-

Parameters:

-
    - -
  • - - key - - - (String) - - - - — -

    header name

    -
    - -
  • - -
  • - - value - - - (String, nil) - - - (defaults to: nil) - - - — -

    header value

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-
-
# File 'lib/hyde/dsl/methods_probe.rb', line 50
-
-def remove_header(key, value = nil)
-  return unless @origin.response
-
-  return if key.downcase == "status"
-
-  if key.match(Hyde::Util::HeaderRegexp::TOKEN)
-    raise ArgumentError, "header key has invalid characters"
-  end
-
-  if value&.match(Hyde::Util::HeaderRegexp::PRINTABLE)
-    raise ArgumentError, "value key has invalid characters"
-  end
-
-  @origin.response.delete_header(key, value)
-end
-
-
- -
-

- - #requestHyde::Request - - - - - -

-
-

Get the current request

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'lib/hyde/dsl/methods_probe.rb', line 14
-
-def request
-  @origin.request
-end
-
-
- -
-

- - #status(status) ⇒ Object - - - - Also known as: - code - - - - -

-
-

Set response status (generate response if one doesn't exist yet)

- - -
-
-
-

Parameters:

-
    - -
  • - - status - - - (Integer) - - - - — -

    http status code

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-20
-21
-22
-23
-
-
# File 'lib/hyde/dsl/methods_probe.rb', line 20
-
-def status(status)
-  @origin.response = (@origin.response or Hyde::Response.new)
-  @origin.response.status = status
-end
-
-
- -
-

- - #unescape_html(text) ⇒ Object - - - - - -

-
-

Unescape HTML entities

- - -
-
-
- - -

See Also:

- - -
- - - - -
-
-
-
-105
-106
-107
-
-
# File 'lib/hyde/dsl/methods_probe.rb', line 105
-
-def unescape_html(text)
-  Hyde::Util.unescape_html(text)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/DSL/TemplateMethods.html b/doc/Hyde/DSL/TemplateMethods.html deleted file mode 100644 index ee6e23f..0000000 --- a/doc/Hyde/DSL/TemplateMethods.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - Module: Hyde::DSL::TemplateMethods - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Hyde::DSL::TemplateMethods - - - -

-
- - - - - - - - - -
-
Included in:
-
TemplateContext
-
- - - -
-
Defined in:
-
lib/hyde/dsl/methods_template.rb
-
- -
- -

Overview

-
-

Common methods for template contexts

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #import(filepath) ⇒ Object - - - - - -

-
-

Import a template part

- - -
-
-
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'lib/hyde/dsl/methods_template.rb', line 11
-
-def import(filepath)
-  @parent_template.import(file(filepath)).run
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Error.html b/doc/Hyde/Error.html deleted file mode 100644 index 1c6964a..0000000 --- a/doc/Hyde/Error.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - Exception: Hyde::Error - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Hyde::Error - - - -

-
- -
-
Inherits:
-
- StandardError - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/util/errors.rb
-
- -
- -

Overview

-
-

Generic error class, as recommended by Ruby documentation.

- - -
-
-
- - -
-

Direct Known Subclasses

-

ParsingError

-
- - - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/GETHandler.html b/doc/Hyde/GETHandler.html deleted file mode 100644 index 9f60e36..0000000 --- a/doc/Hyde/GETHandler.html +++ /dev/null @@ -1,366 +0,0 @@ - - - - - - - Class: Hyde::GETHandler - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::GETHandler - - - -

-
- -
-
Inherits:
-
- Handler - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/http_method.rb
-
- -
- -

Overview

-
- -

Probe that executes callback on a GET

- - -
-
-
- - -
- - -

- Constant Summary - collapse -

- -
- -
METHOD = - -
-
"GET"
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Handler

-

#request, #response

- - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Handler

-

#initialize

- - - - - - - - - -

Methods inherited from Probe

-

#initialize

- - - - - - - - - -

Methods inherited from Node

-

#go, #initialize, #reject

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::Handler

- -
- - -
-

Instance Method Details

- - -
-

- - #process(request) ⇒ Boolean - - - - - -

-
- -

Method callback on successful request navigation. Runs block supplied with object initialization. Request’s #splat and #param are passed to block.

- -

Callback’s returned should be one of viable responses:

-
  • -

    Response object

    -
  • -

    An array that matches Rack return form

    -
  • -

    An array that matches old (Rack 2.x) return form

    -
  • -

    A string (returned as HTML with code 200)

    -
  • -

    false (bounces the request to next handler)

    -
- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -
    -

    true if further navigation is possible

    -
    - -
  • - -
-

Raises:

-
    - -
  • - - - (UncaughtThrowError) - - - - — -
    -

    may raise if die() is called.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-24
-25
-26
-27
-28
-29
-30
-
-
# File 'lib/hyde/probe/http_method.rb', line 24
-
-def process(request)
-  unless request.request_method.casecmp(self.class::METHOD).zero?
-    return false
-  end
-
-  super(request)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/HEADHandler.html b/doc/Hyde/HEADHandler.html deleted file mode 100644 index 555ed79..0000000 --- a/doc/Hyde/HEADHandler.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Class: Hyde::HEADHandler - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::HEADHandler - - - -

-
- -
-
Inherits:
-
- GETHandler - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/http_method.rb
-
- -
- -

Overview

-
- -

Probe that executes callback on a HEAD

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
METHOD = - -
-
"HEAD"
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Handler

-

#request, #response

- - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - - - - - - - -

Method Summary

- -

Methods inherited from GETHandler

-

#process

- - - - - - - - - -

Methods inherited from Handler

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Probe

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Node

-

#go, #initialize, #process, #reject

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::Handler

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Handler.html b/doc/Hyde/Handler.html deleted file mode 100644 index 2cc8daf..0000000 --- a/doc/Hyde/Handler.html +++ /dev/null @@ -1,609 +0,0 @@ - - - - - - - Class: Hyde::Handler - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Handler - - - -

-
- -
-
Inherits:
-
- Probe - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/handler.rb
-
- -
- -

Overview

-
- -

Probe that executes a callback on request

- - -
-
-
- - -
-

Direct Known Subclasses

-

GETHandler

-
- - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #request ⇒ Object - - - - - - - - - readonly - - - - - - - - - -
    -

    Returns the value of attribute request.

    -
    - -
  • - - -
  • - - - #response ⇒ Object - - - - - - - - - - - - - - - - -
    -

    Returns the value of attribute response.

    -
    - -
  • - - -
- - - - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - - - -

Methods inherited from Node

-

#go, #reject

-
-

Constructor Details

- -
-

- - #initialize(path, parent:, &exec) ⇒ Handler - - - - - -

-
- -

Returns a new instance of Handler.

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (Object) - - - -
  • - -
  • - - parent - - - (Hyde::Node) - - - -
  • - -
  • - - exec - - - (#call) - - - -
  • - -
- - -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-
-
# File 'lib/hyde/probe/handler.rb', line 11
-
-def initialize(path, parent:, &exec)
-  super(path, parent: parent)
-  @callback = exec
-  @context = Hyde::ProbeContext.new(self)
-  @response = nil
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #requestObject (readonly) - - - - - -

-
- -

Returns the value of attribute request.

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'lib/hyde/probe/handler.rb', line 19
-
-def request
-  @request
-end
-
-
- - - -
-

- - #responseObject - - - - - -

-
- -

Returns the value of attribute response.

- - -
-
-
- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'lib/hyde/probe/handler.rb', line 18
-
-def response
-  @response
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #process(request) ⇒ Boolean - - - - - -

-
- -

Method callback on successful request navigation. Runs block supplied with object initialization. Request’s #splat and #param are passed to block.

- -

Callback’s returned should be one of viable responses:

-
  • -

    Response object

    -
  • -

    An array that matches Rack return form

    -
  • -

    An array that matches old (Rack 2.x) return form

    -
  • -

    A string (returned as HTML with code 200)

    -
  • -

    false (bounces the request to next handler)

    -
- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -
    -

    true if further navigation is possible

    -
    - -
  • - -
-

Raises:

-
    - -
  • - - - (UncaughtThrowError) - - - - — -
    -

    may raise if die() is called.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-
-
# File 'lib/hyde/probe/handler.rb', line 35
-
-def process(request)
-  @response = nil
-  return reject(request) unless request.path.match?(/^\/?$/)
-
-  @request = request
-  response = catch(:break) do
-    @context.instance_exec(*request.splat,
-                           **request.param,
-                           &@callback)
-  end
-  return false unless response
-
-  if @response and [String, File, IO].include? response.class
-    @response.body = response
-    throw :finish, @response
-  end
-  throw :finish, response
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Handlers.html b/doc/Hyde/Handlers.html deleted file mode 100644 index 83d1c61..0000000 --- a/doc/Hyde/Handlers.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - Module: Hyde::Handlers - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Hyde::Handlers - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe.rb,
- lib/hyde/probe/handler.rb,
lib/hyde/probe/http_method.rb,
lib/hyde/probe/serve_handler.rb
-
-
- -
- -

Overview

-
-

All subclasses of Hyde::Probe that respond to requests

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: CONNECT, DELETE, GET, HEAD, Handler, OPTIONS, PATCH, POST, PUT, Serve, TRACE - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Handlers/CONNECT.html b/doc/Hyde/Handlers/CONNECT.html deleted file mode 100644 index cb7913c..0000000 --- a/doc/Hyde/Handlers/CONNECT.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - Class: Hyde::Handlers::CONNECT - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Handlers::CONNECT - - - -

-
- -
-
Inherits:
-
- GET - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/http_method.rb
-
- -
- -

Overview

-
-

Probe that executes callback on a CONNECT

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
METHOD = - -
-
"CONNECT"
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Handler

-

#request, #response

- - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - - - - - - - -

Method Summary

- -

Methods inherited from GET

-

#process

- - - - - - - - - -

Methods inherited from Handler

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Probe

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Node

-

#go, #initialize, #process, #reject

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::Handlers::Handler

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Handlers/DELETE.html b/doc/Hyde/Handlers/DELETE.html deleted file mode 100644 index 1cd40c1..0000000 --- a/doc/Hyde/Handlers/DELETE.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - Class: Hyde::Handlers::DELETE - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Handlers::DELETE - - - -

-
- -
-
Inherits:
-
- GET - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/http_method.rb
-
- -
- -

Overview

-
-

Probe that executes callback on a DELETE

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
METHOD = - -
-
"DELETE"
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Handler

-

#request, #response

- - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - - - - - - - -

Method Summary

- -

Methods inherited from GET

-

#process

- - - - - - - - - -

Methods inherited from Handler

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Probe

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Node

-

#go, #initialize, #process, #reject

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::Handlers::Handler

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Handlers/GET.html b/doc/Hyde/Handlers/GET.html deleted file mode 100644 index e8ad466..0000000 --- a/doc/Hyde/Handlers/GET.html +++ /dev/null @@ -1,360 +0,0 @@ - - - - - - - Class: Hyde::Handlers::GET - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Handlers::GET - - - -

-
- -
-
Inherits:
-
- Handler - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/http_method.rb
-
- -
- -

Overview

-
-

Probe that executes callback on a GET

- - -
-
-
- - -
-

Direct Known Subclasses

-

CONNECT, DELETE, HEAD, OPTIONS, PATCH, POST, PUT, TRACE

-
- - -

- Constant Summary - collapse -

- -
- -
METHOD = - -
-
"GET"
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Handler

-

#request, #response

- - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Handler

-

#initialize

- - - - - - - - - -

Methods inherited from Probe

-

#initialize

- - - - - - - - - -

Methods inherited from Node

-

#go, #initialize, #reject

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::Handlers::Handler

- -
- - -
-

Instance Method Details

- - -
-

- - #process(request) ⇒ Boolean - - - - - -

-
-

Method callback on successful request navigation. -Runs block supplied with object initialization. -Request's #splat and #param are passed to block.

- -

Callback's returned should be one of viable responses:

- -
    -
  • Response object
  • -
  • An array that matches Rack return form
  • -
  • An array that matches old (Rack 2.x) return form
  • -
  • A string (returned as HTML with code 200)
  • -
  • false (bounces the request to next handler)
  • -
- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -

    true if further navigation is possible

    -
    - -
  • - -
-

Raises:

-
    - -
  • - - - (UncaughtThrowError) - - - - — -

    may raise if die() is called.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-25
-26
-27
-28
-29
-30
-31
-
-
# File 'lib/hyde/probe/http_method.rb', line 25
-
-def process(request)
-  unless request.request_method.casecmp(self.class::METHOD).zero?
-    return false
-  end
-
-  super(request)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Handlers/HEAD.html b/doc/Hyde/Handlers/HEAD.html deleted file mode 100644 index 91a32be..0000000 --- a/doc/Hyde/Handlers/HEAD.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - Class: Hyde::Handlers::HEAD - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Handlers::HEAD - - - -

-
- -
-
Inherits:
-
- GET - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/http_method.rb
-
- -
- -

Overview

-
-

Probe that executes callback on a HEAD

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
METHOD = - -
-
"HEAD"
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Handler

-

#request, #response

- - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - - - - - - - -

Method Summary

- -

Methods inherited from GET

-

#process

- - - - - - - - - -

Methods inherited from Handler

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Probe

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Node

-

#go, #initialize, #process, #reject

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::Handlers::Handler

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Handlers/Handler.html b/doc/Hyde/Handlers/Handler.html deleted file mode 100644 index b023bcf..0000000 --- a/doc/Hyde/Handlers/Handler.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - - - - Class: Hyde::Handlers::Handler - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Handlers::Handler - - - -

-
- -
-
Inherits:
-
- Probe - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/handler.rb
-
- -
- -

Overview

-
-

Probe that executes a callback on request

- - -
-
-
- - -
-

Direct Known Subclasses

-

GET

-
- - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #request ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute request.

    -
    - -
  • - - -
  • - - - #response ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute response.

    -
    - -
  • - - -
- - - - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - - - -

Methods inherited from Node

-

#go, #reject

-
-

Constructor Details

- -
-

- - #initialize(path, parent:, &exec) ⇒ Handler - - - - - -

-
-

Returns a new instance of Handler.

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (Object) - - - -
  • - -
  • - - parent - - - (Hyde::Node) - - - -
  • - -
  • - - exec - - - (#call) - - - -
  • - -
- - -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-17
-
-
# File 'lib/hyde/probe/handler.rb', line 12
-
-def initialize(path, parent:, &exec)
-  super(path, parent: parent)
-  @callback = exec
-  @context = Hyde::ProbeContext.new(self)
-  @response = nil
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #requestObject (readonly) - - - - - -

-
-

Returns the value of attribute request.

- - -
-
-
- - -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'lib/hyde/probe/handler.rb', line 20
-
-def request
-  @request
-end
-
-
- - - -
-

- - #responseObject - - - - - -

-
-

Returns the value of attribute response.

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'lib/hyde/probe/handler.rb', line 19
-
-def response
-  @response
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #process(request) ⇒ Boolean - - - - - -

-
-

Method callback on successful request navigation. -Runs block supplied with object initialization. -Request's #splat and #param are passed to block.

- -

Callback's returned should be one of viable responses:

- -
    -
  • Response object
  • -
  • An array that matches Rack return form
  • -
  • An array that matches old (Rack 2.x) return form
  • -
  • A string (returned as HTML with code 200)
  • -
  • false (bounces the request to next handler)
  • -
- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -

    true if further navigation is possible

    -
    - -
  • - -
-

Raises:

-
    - -
  • - - - (UncaughtThrowError) - - - - — -

    may raise if die() is called.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-
-
# File 'lib/hyde/probe/handler.rb', line 36
-
-def process(request)
-  @response = nil
-  return reject(request) unless request.path.match?(/^\/?$/)
- 
-  @request = request
-  response = catch(:break) do
-    @context.instance_exec(*request.splat,
-                           **request.param,
-                           &@callback)
-  end
-  return false unless response
- 
-  if @response and [String, File, IO].include? response.class
-    @response.body = response
-    throw :finish, @response
-  end
-  throw :finish, response
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Handlers/OPTIONS.html b/doc/Hyde/Handlers/OPTIONS.html deleted file mode 100644 index 18161bd..0000000 --- a/doc/Hyde/Handlers/OPTIONS.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - Class: Hyde::Handlers::OPTIONS - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Handlers::OPTIONS - - - -

-
- -
-
Inherits:
-
- GET - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/http_method.rb
-
- -
- -

Overview

-
-

Probe that executes callback on a OPTIONS

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
METHOD = - -
-
"OPTIONS"
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Handler

-

#request, #response

- - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - - - - - - - -

Method Summary

- -

Methods inherited from GET

-

#process

- - - - - - - - - -

Methods inherited from Handler

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Probe

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Node

-

#go, #initialize, #process, #reject

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::Handlers::Handler

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Handlers/PATCH.html b/doc/Hyde/Handlers/PATCH.html deleted file mode 100644 index b92c5b3..0000000 --- a/doc/Hyde/Handlers/PATCH.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - Class: Hyde::Handlers::PATCH - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Handlers::PATCH - - - -

-
- -
-
Inherits:
-
- GET - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/http_method.rb
-
- -
- -

Overview

-
-

Probe that executes callback on a PATCH

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
METHOD = - -
-
"PATCH"
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Handler

-

#request, #response

- - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - - - - - - - -

Method Summary

- -

Methods inherited from GET

-

#process

- - - - - - - - - -

Methods inherited from Handler

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Probe

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Node

-

#go, #initialize, #process, #reject

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::Handlers::Handler

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Handlers/POST.html b/doc/Hyde/Handlers/POST.html deleted file mode 100644 index 5aaf444..0000000 --- a/doc/Hyde/Handlers/POST.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - Class: Hyde::Handlers::POST - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Handlers::POST - - - -

-
- -
-
Inherits:
-
- GET - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/http_method.rb
-
- -
- -

Overview

-
-

Probe that executes callback on a POST

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
METHOD = - -
-
"POST"
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Handler

-

#request, #response

- - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - - - - - - - -

Method Summary

- -

Methods inherited from GET

-

#process

- - - - - - - - - -

Methods inherited from Handler

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Probe

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Node

-

#go, #initialize, #process, #reject

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::Handlers::Handler

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Handlers/PUT.html b/doc/Hyde/Handlers/PUT.html deleted file mode 100644 index 2aeb100..0000000 --- a/doc/Hyde/Handlers/PUT.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - Class: Hyde::Handlers::PUT - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Handlers::PUT - - - -

-
- -
-
Inherits:
-
- GET - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/http_method.rb
-
- -
- -

Overview

-
-

Probe that executes callback on a PUT

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
METHOD = - -
-
"PUT"
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Handler

-

#request, #response

- - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - - - - - - - -

Method Summary

- -

Methods inherited from GET

-

#process

- - - - - - - - - -

Methods inherited from Handler

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Probe

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Node

-

#go, #initialize, #process, #reject

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::Handlers::Handler

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Handlers/Serve.html b/doc/Hyde/Handlers/Serve.html deleted file mode 100644 index 6adbff5..0000000 --- a/doc/Hyde/Handlers/Serve.html +++ /dev/null @@ -1,469 +0,0 @@ - - - - - - - Class: Hyde::Handlers::Serve - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Handlers::Serve - - - -

-
- -
-
Inherits:
-
- Probe - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/serve_handler.rb
-
- -
- -

Overview

-
-

Probe that sends files from a location

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #response ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute response.

    -
    - -
  • - - -
- - - - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - - - -

Methods inherited from Node

-

#go, #reject

-
-

Constructor Details

- -
-

- - #initialize(path, parent:) ⇒ Serve - - - - - -

-
-

Returns a new instance of Serve.

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (Object) - - - -
  • - -
  • - - parent - - - (Hyde::Node) - - - -
  • - -
  • - - exec - - - (#call) - - - -
  • - -
- - -
- - - - -
-
-
-
-12
-13
-14
-
-
# File 'lib/hyde/probe/serve_handler.rb', line 12
-
-def initialize(path, parent:)
-  super(path, parent: parent)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #responseObject - - - - - -

-
-

Returns the value of attribute response.

- - -
-
-
- - -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'lib/hyde/probe/serve_handler.rb', line 16
-
-def response
-  @response
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #process(request) ⇒ Boolean - - - - - -

-
-

Method callback on successful request navigation. -Tries to serve files matched by handler

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -

    true if file was found

    -
    - -
  • - -
- -
- - - - -
-
-
-
-22
-23
-24
-25
-26
-27
-28
-29
-
-
# File 'lib/hyde/probe/serve_handler.rb', line 22
-
-def process(request)
-  path = File.expand_path(request.filepath)
-  return unless path.start_with? @properties["path"]
-
-  File.open(path.delete_suffix("/"))
-rescue StandardError
-  false
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Handlers/TRACE.html b/doc/Hyde/Handlers/TRACE.html deleted file mode 100644 index c319859..0000000 --- a/doc/Hyde/Handlers/TRACE.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - Class: Hyde::Handlers::TRACE - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Handlers::TRACE - - - -

-
- -
-
Inherits:
-
- GET - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/http_method.rb
-
- -
- -

Overview

-
-

Probe that executes callback on a TRACE

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
METHOD = - -
-
"TRACE"
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Handler

-

#request, #response

- - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - - - - - - - -

Method Summary

- -

Methods inherited from GET

-

#process

- - - - - - - - - -

Methods inherited from Handler

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Probe

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Node

-

#go, #initialize, #process, #reject

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::Handlers::Handler

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Node.html b/doc/Hyde/Node.html deleted file mode 100644 index 8d5957b..0000000 --- a/doc/Hyde/Node.html +++ /dev/null @@ -1,702 +0,0 @@ - - - - - - - Class: Hyde::Node - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Node - Abstract - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/node.rb
-
- -
- -

Overview

-
-
- This class is abstract. -
-
-

Abstract class that reacts to request navigation. -Does nothing by default, behaviour should be overriden through

- -

reject and #process

- - -
-
-
- - -
-

Direct Known Subclasses

-

Path, Probe

-
- - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #remap ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute remap.

    -
    - -
  • - - -
  • - - - #root ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute root.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(path, parent:) ⇒ Node - - - - - -

-
-

Returns a new instance of Node.

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (Object) - - - -
  • - -
- - -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-17
-
-
# File 'lib/hyde/node.rb', line 12
-
-def initialize(path, parent:)
-  @pattern = Pattern.new(path).freeze
-  @properties = Hyde::Util::Lookup.new(parent&.properties)
-  @root = nil
-  @remap = false
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #remapObject - - - - - -

-
-

Returns the value of attribute remap.

- - -
-
-
- - -
- - - - -
-
-
-
-69
-70
-71
-
-
# File 'lib/hyde/node.rb', line 69
-
-def remap
-  @remap
-end
-
-
- - - -
-

- - #rootObject - - - - - -

-
-

Returns the value of attribute root.

- - -
-
-
- - -
- - - - -
-
-
-
-69
-70
-71
-
-
# File 'lib/hyde/node.rb', line 69
-
-def root
-  @root
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #go(request) ⇒ Boolean - - - - - -

-
-

Try to navigate the path. Run method callback in response.

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-
-
# File 'lib/hyde/node.rb', line 38
-
-def go(request)
-  # rejected at pattern
-  return reject(request) unless @pattern.match?(request.path)
-
-  request.push_state
-  path, splat, param = @pattern.match(request.path)
-  do_filepath(request, request.path.delete_suffix(path))
-  request.path = path
-  request.splat.append(*splat)
-  request.param.merge!(param)
-  value = process(request)
-  # rejected at callback - restore state
-  request.pop_state unless value
-  # finally, return process value
-  value
-end
-
-
- -
-

- - #process(_request) ⇒ Object - - - - - -

-
-

Method callback on successful request navigation

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - - - - - -

    true

    -
    - -
  • - -
- -
- - - - -
-
-
-
-65
-66
-67
-
-
# File 'lib/hyde/node.rb', line 65
-
-def process(_request)
-  true
-end
-
-
- -
-

- - #reject(_request) ⇒ Object - - - - - -

-
-

Method callback on failed request navigation

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - - - - - -

    false

    -
    - -
  • - -
- -
- - - - -
-
-
-
-58
-59
-60
-
-
# File 'lib/hyde/node.rb', line 58
-
-def reject(_request)
-  false
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/OPTIONSHandler.html b/doc/Hyde/OPTIONSHandler.html deleted file mode 100644 index 481dcee..0000000 --- a/doc/Hyde/OPTIONSHandler.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Class: Hyde::OPTIONSHandler - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::OPTIONSHandler - - - -

-
- -
-
Inherits:
-
- GETHandler - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/http_method.rb
-
- -
- -

Overview

-
- -

Probe that executes callback on a OPTIONS

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
METHOD = - -
-
"OPTIONS"
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Handler

-

#request, #response

- - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - - - - - - - -

Method Summary

- -

Methods inherited from GETHandler

-

#process

- - - - - - - - - -

Methods inherited from Handler

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Probe

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Node

-

#go, #initialize, #process, #reject

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::Handler

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/PATCHHandler.html b/doc/Hyde/PATCHHandler.html deleted file mode 100644 index 9ade95d..0000000 --- a/doc/Hyde/PATCHHandler.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Class: Hyde::PATCHHandler - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::PATCHHandler - - - -

-
- -
-
Inherits:
-
- GETHandler - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/http_method.rb
-
- -
- -

Overview

-
- -

Probe that executes callback on a PATCH

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
METHOD = - -
-
"PATCH"
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Handler

-

#request, #response

- - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - - - - - - - -

Method Summary

- -

Methods inherited from GETHandler

-

#process

- - - - - - - - - -

Methods inherited from Handler

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Probe

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Node

-

#go, #initialize, #process, #reject

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::Handler

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/POSTHandler.html b/doc/Hyde/POSTHandler.html deleted file mode 100644 index 4954867..0000000 --- a/doc/Hyde/POSTHandler.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Class: Hyde::POSTHandler - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::POSTHandler - - - -

-
- -
-
Inherits:
-
- GETHandler - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/http_method.rb
-
- -
- -

Overview

-
- -

Probe that executes callback on a POST

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
METHOD = - -
-
"POST"
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Handler

-

#request, #response

- - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - - - - - - - -

Method Summary

- -

Methods inherited from GETHandler

-

#process

- - - - - - - - - -

Methods inherited from Handler

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Probe

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Node

-

#go, #initialize, #process, #reject

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::Handler

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/PUTHandler.html b/doc/Hyde/PUTHandler.html deleted file mode 100644 index 3d3f53c..0000000 --- a/doc/Hyde/PUTHandler.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Class: Hyde::PUTHandler - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::PUTHandler - - - -

-
- -
-
Inherits:
-
- GETHandler - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/http_method.rb
-
- -
- -

Overview

-
- -

Probe that executes callback on a PUT

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
METHOD = - -
-
"PUT"
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Handler

-

#request, #response

- - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - - - - - - - -

Method Summary

- -

Methods inherited from GETHandler

-

#process

- - - - - - - - - -

Methods inherited from Handler

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Probe

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Node

-

#go, #initialize, #process, #reject

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::Handler

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/ParsingError.html b/doc/Hyde/ParsingError.html deleted file mode 100644 index b2e3c0a..0000000 --- a/doc/Hyde/ParsingError.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - Exception: Hyde::ParsingError - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Exception: Hyde::ParsingError - - - -

-
- -
-
Inherits:
-
- Error - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/util/errors.rb
-
- -
- -

Overview

-
-

Error class raised by hyde/util/parseutils module.

- - -
-
-
- - -
- - - - - - - - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Path.html b/doc/Hyde/Path.html deleted file mode 100644 index 17e3c53..0000000 --- a/doc/Hyde/Path.html +++ /dev/null @@ -1,897 +0,0 @@ - - - - - - - Class: Hyde::Path - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Path - - - -

-
- -
-
Inherits:
-
- Node - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/path.rb
-
- -
- -

Overview

-
-

Primary building block of request navigation.

- - -
-
-
- - -
-

Direct Known Subclasses

-

Server

-
- - -

- Constant Summary - collapse -

- -
- -
ProcContext = - -
-
Hyde::ProcessorContext
- -
Context = - -
-
Hyde::PathContext
- -
- - - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #children ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute children.

    -
    - -
  • - - -
  • - - - #properties ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute properties.

    -
    - -
  • - - -
- - - - - -

Attributes inherited from Node

-

#remap, #root

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Node

-

#go, #reject

-
-

Constructor Details

- -
-

- - #initialize(path, parent:, &setup) ⇒ Path - - - - - -

-
-

Returns a new instance of Path.

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (Object) - - - - — -

    Object to generate Hyde::Pattern from

    -
    - -
  • - -
  • - - parent - - - (Hyde::Node) - - - - — -

    Parent object to inherit properties to

    -
    - -
  • - -
  • - - setup - - - (#call) - - - - — -

    Setup block

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-
-
# File 'lib/hyde/path.rb', line 38
-
-def initialize(path, parent:, &setup)
-  super(path, parent: parent)
-  # Child nodes array
-  @children = []
-  # Arrays of preprocessors, postprocessors and filters
-  @preprocessors = []
-  @postprocessors = []
-  @filters = []
-  # Contexts setup
-  context = self.class::Context.new(self)
-  context.instance_exec(&setup)
-  @proccontext = self.class::ProcContext.new(self)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #childrenObject (readonly) - - - - - -

-
-

Returns the value of attribute children.

- - -
-
-
- - -
- - - - -
-
-
-
-98
-99
-100
-
-
# File 'lib/hyde/path.rb', line 98
-
-def children
-  @children
-end
-
-
- - - -
-

- - #propertiesObject (readonly) - - - - - -

-
-

Returns the value of attribute properties.

- - -
-
-
- - -
- - - - -
-
-
-
-98
-99
-100
-
-
# File 'lib/hyde/path.rb', line 98
-
-def properties
-  @properties
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #filter(&block) {|request| ... } ⇒ Object - - - - - -

-
-

Add a filter to the path. -Blocks path access if a filter returns false.

- - -
-
-
-

Parameters:

-
    - -
  • - - block - - - (#call) - - - -
  • - -
- -

Yield Parameters:

- - -
- - - - -
-
-
-
-94
-95
-96
-
-
# File 'lib/hyde/path.rb', line 94
-
-def filter(&block)
-  @filters.append(block)
-end
-
-
- -
-

- - #postprocess(&block) {|request, response| ... } ⇒ Object - - - - - -

-
-

Add a postprocessor to the path.

- - -
-
-
-

Parameters:

-
    - -
  • - - block - - - (#call) - - - -
  • - -
- -

Yield Parameters:

- - -
- - - - -
-
-
-
-86
-87
-88
-
-
# File 'lib/hyde/path.rb', line 86
-
-def postprocess(&block)
-  @postprocessors.append(block)
-end
-
-
- -
-

- - #preprocess(&block) {|request| ... } ⇒ Object - - - - - -

-
-

Add a preprocessor to the path. -Does not modify path execution.

- - -
-
-
-

Parameters:

-
    - -
  • - - block - - - (#call) - - - -
  • - -
- -

Yield Parameters:

- - -
- - - - -
-
-
-
-78
-79
-80
-
-
# File 'lib/hyde/path.rb', line 78
-
-def preprocess(&block)
-  @preprocessors.append(block)
-end
-
-
- -
-

- - #process(request) ⇒ Boolean - - - - - -

-
-

Method callback on successful request navigation. -Finds the next appropriate path to go to.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -

    true if further navigation will be done

    -
    - -
  • - -
-

Raises:

-
    - -
  • - - - (UncaughtThrowError) - - - - — -

    by default throws :response if no matches found.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-
-
# File 'lib/hyde/path.rb', line 56
-
-def process(request)
-  return false unless run_filters(request)
-
-  run_preprocessors(request)
-  enqueue_postprocessors(request)
-  @children.each do |x|
-    if (value = x.go(request))
-      return value
-    end
-  end
-  value = index(request)
-  return value if value
-
-  _die(404)
-rescue StandardError => e
-  _die(500, backtrace: [e.to_s] + e.backtrace)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/PathBinding.html b/doc/Hyde/PathBinding.html deleted file mode 100644 index 3bb71a0..0000000 --- a/doc/Hyde/PathBinding.html +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - Class: Hyde::PathBinding - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::PathBinding - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
DSL::PathConstructors, DSL::PathMethods
-
- - - - - - -
-
Defined in:
-
lib/hyde/path.rb
-
- -
- -

Overview

-
- -

Protected interface that provides DSL context for setup block.

- - -
-
-
- - -
-

Direct Known Subclasses

-

ServerBinding

-
- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from DSL::PathMethods

-

#filter, #index, #postprocess, #preprocess, #remap, #root

- - - - - - - - - -

Methods included from DSL::PathConstructors

-

#connect, #delete, #get, #head, #options, #patch, #path, #post, #probe, #put, #register, #serve, #trace

-
-

Constructor Details

- -
-

- - #initialize(path) ⇒ PathBinding - - - - - -

-
- -

Returns a new instance of PathBinding.

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-
-
# File 'lib/hyde/path.rb', line 15
-
-def initialize(path)
-  @origin = path
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/PathContext.html b/doc/Hyde/PathContext.html deleted file mode 100644 index f2ce1b0..0000000 --- a/doc/Hyde/PathContext.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - - Class: Hyde::PathContext - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::PathContext - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
DSL::PathConstructors, DSL::PathMethods
-
- - - - - - -
-
Defined in:
-
lib/hyde/path.rb
-
- -
- -

Overview

-
-

Execution context for path setup block.

- - -
-
-
- - -
-

Direct Known Subclasses

-

ServerContext

-
- - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from DSL::PathMethods

-

#filter, #index, #plugin, #postprocess, #preprocess, #remap, #root

- - - - - - - - - -

Methods included from DSL::PathConstructors

-

#connect, #delete, #get, #head, #options, #patch, #path, #post, #probe, #put, #register, #serve, #trace

-
-

Constructor Details

- -
-

- - #initialize(path) ⇒ PathContext - - - - - -

-
-

Returns a new instance of PathContext.

- - -
-
-
- - -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'lib/hyde/path.rb', line 25
-
-def initialize(path)
-  @origin = path
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Pattern.html b/doc/Hyde/Pattern.html deleted file mode 100644 index b48ad74..0000000 --- a/doc/Hyde/Pattern.html +++ /dev/null @@ -1,552 +0,0 @@ - - - - - - - Class: Hyde::Pattern - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Pattern - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/pattern_matching.rb
-
- -
- -

Overview

-
-

Delegate class for all available patterns. -Picks appropriate pattern based on contents.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(pattern) ⇒ Pattern - - - - - -

-
-

Returns a new instance of Pattern.

- - -
-
-
-

Parameters:

-
    - -
  • - - pattern - - - (Object) - - - - — -

    object to generate pattern from

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-16
-17
-18
-19
-
-
# File 'lib/hyde/pattern_matching.rb', line 16
-
-def initialize(pattern)
-  @pattern = patternify(pattern)
-  @static = @pattern.is_a? String
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #match(input) ⇒ Array(String,Array,Hash), FalseClass - - - - - -

-
-

Match the string and assign matches to parameters. -Returns:

- -
    -
  • Unmatched part of a string
  • -
  • Unnamed parameters
  • -
  • Named parameters
  • -
- - -
-
-
-

Parameters:

-
    - -
  • - - input - - - (String) - - - - — -

    String to match

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Array(String,Array,Hash)) - - - -
  • - -
  • - - - (FalseClass) - - - - — -

    if input doesn't match pattern

    -
    - -
  • - -
- -
- - - - -
-
-
-
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-
-
# File 'lib/hyde/pattern_matching.rb', line 35
-
-def match(input)
-  if @pattern.is_a? String
-    input = Hyde::PatternMatching.canonicalize(input)
-    if input.start_with?(@pattern)
-      [input.delete_prefix(@pattern), [], {}]
-    else
-      false
-    end
-  else
-    @pattern.match(input)
-  end
-end
-
-
- -
-

- - #match?(input) ⇒ Boolean - - - - - -

-
-

Test if a string can be matched. -Lighter version of match that doesn't assign any variables.

- - -
-
-
-

Parameters:

-
    - -
  • - - input - - - (String) - - - - — -

    String to match

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-52
-53
-54
-55
-56
-57
-58
-
-
# File 'lib/hyde/pattern_matching.rb', line 52
-
-def match?(input)
-  if @pattern.is_a? String
-    Hyde::PatternMatching.canonicalize(input).start_with? @pattern
-  else
-    @pattern.match?(input)
-  end
-end
-
-
- -
-

- - #static?Boolean - - - - - -

-
-

Checks if pattern object is static (is a simple String pattern).

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-22
-23
-24
-
-
# File 'lib/hyde/pattern_matching.rb', line 22
-
-def static?
-  @static
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/PatternMatching.html b/doc/Hyde/PatternMatching.html deleted file mode 100644 index f7b9650..0000000 --- a/doc/Hyde/PatternMatching.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - Module: Hyde::PatternMatching - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Hyde::PatternMatching - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/pattern_matching.rb,
- lib/hyde/pattern_matching/glob.rb,
lib/hyde/pattern_matching/util.rb,
lib/hyde/pattern_matching/rematch.rb
-
-
- -
- -

Overview

-
-

Utility functions and pattern-generator classes. -Used primarily to create patterns for path definitions.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: Glob, ReMatch - - -

- - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .canonicalize(string) ⇒ String - - - - - -

-
-

Strips extra slashes from a string. -(including slashes at the start and end of the string)

- - -
-
-
-

Parameters:

-
    - -
  • - - string - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-12
-13
-
-
# File 'lib/hyde/pattern_matching/util.rb', line 9
-
-def self.canonicalize(string)
-  string.gsub(/\/+/, "/")
-        .delete_prefix("/")
-        .delete_suffix("/")
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/PatternMatching/Glob.html b/doc/Hyde/PatternMatching/Glob.html deleted file mode 100644 index a86db66..0000000 --- a/doc/Hyde/PatternMatching/Glob.html +++ /dev/null @@ -1,648 +0,0 @@ - - - - - - - Class: Hyde::PatternMatching::Glob - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::PatternMatching::Glob - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/pattern_matching/glob.rb
-
- -
- -

Overview

-
-

Implements glob-like pattern matching. -Exact specifications for globbing rules:

- -

"/"

- -
    -
  • act as directory separators
  • -
  • multiple slashes (i.e. "///") are the same as one slash ("/")
  • -
  • slashes are stripped at start and end of an expression or path
  • -
  • slashes are not matched by anything but the globstar ("**")
  • -
- -

"" ( regexp: /([^/])/ )

- -
    -
  • matches from 0 to any number of characters
  • -
  • does not match nothing if placed between two slashes (i.e "/*/")
  • -
  • result is captured in an array
  • -
  • stops at slashes
  • -
  • greedy (matches as much as possible)
  • -
- -

"*" ( regexp: /(.)/ )

- -
    -
  • matches any number of characters
  • -
  • matches slashes ("/")
  • -
  • result is captured in an array
  • -
  • does not stop at slashes
  • -
  • greedy (matches as much as possible)
  • -
- -

"[...]+" ( regexp: itself, ! and ^ at the start are interchangeable )

- -
    -
  • acts like a regexp range
  • -
  • matches any characters, including slashes if specified
  • -
  • matches any number of characters
  • -
  • valid ways to specify a range: [A-z], [a-z], 9-z
  • -
  • ! or ^ at the start invert meaning (any character not in range)
  • -
  • result is captured in an array
  • -
- -

":name" ( regexp: acts like a named group for /[^/]*/ )

- -
    -
  • acts like * as defined above
  • -
  • result is captured in a hash with "name" as key
  • -
  • name allows alphanumeric characters and underscores
  • -
  • ignored unless placed between two slashes
  • -
- -

"(name|name2|...)" ( regexp: itself )

- -
    -
  • matches any of (full keywords) name, name2, ...
  • -
  • result is captured in an array
  • -
  • each name may include only these groups of characters: - -
      -
    • alphanumeric
    • -
    • slashes
    • -
    • underscores
    • -
    • dashes
    • -
  • -
- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(pattern) ⇒ Glob - - - - - -

-
-

Returns a new instance of Glob.

- - -
-
-
-

Parameters:

-
    - -
  • - - input - - - (String) - - - - — -

    Glob pattern

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-56
-57
-58
-59
-60
-61
-62
-63
-
-
# File 'lib/hyde/pattern_matching/glob.rb', line 56
-
-def initialize(pattern)
-  pattern = Hyde::PatternMatching.canonicalize(pattern)
-  pieces = pattern.split(TOKENS)
-  # @type [Array<String,Integer>]
-  @index = build_index(pieces)
-  # @type [Regexp]
-  @glob = build_regexp(pieces)
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .can_convert?(input) ⇒ Boolean - - - - - -

-
-

Test if input is convertible to a Glob and if it should be converted

- - -
-
-
-

Parameters:

-
    - -
  • - - input - - - - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -

    Input can be safely converted to Glob

    -
    - -
  • - -
- -
- - - - -
-
-
-
-96
-97
-98
-99
-
-
# File 'lib/hyde/pattern_matching/glob.rb', line 96
-
-def self.can_convert?(input)
-  input.is_a? String and
-    input.match?(TOKENS)
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #match(input) ⇒ Array(String,Array,Hash), FalseClass - - - - - -

-
-

Match the string and assign matches to parameters. -Returns:

- -
    -
  • Unmatched part of a string
  • -
  • Unnamed parameters
  • -
  • Named parameters
  • -
- - -
-
-
-

Parameters:

-
    - -
  • - - input - - - (String) - - - - — -

    String to match

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Array(String,Array,Hash)) - - - -
  • - -
  • - - - (FalseClass) - - - - — -

    if input doesn't match glob

    -
    - -
  • - -
- -
- - - - -
-
-
-
-74
-75
-76
-77
-78
-79
-80
-81
-82
-
-
# File 'lib/hyde/pattern_matching/glob.rb', line 74
-
-def match(input)
-  input = Hyde::PatternMatching.canonicalize(input)
-  result = input.match(@glob)
-  return false unless result
-
-  input = result.post_match
-  named_params, params = assign_by_index(@index, result.captures)
-  [input, params, named_params]
-end
-
-
- -
-

- - #match?(input) ⇒ Boolean - - - - - -

-
-

Test if a string can be matched. -Lighter version of match that doesn't assign any variables.

- - -
-
-
-

Parameters:

-
    - -
  • - - input - - - (String) - - - - — -

    String to match

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-88
-89
-90
-91
-
-
# File 'lib/hyde/pattern_matching/glob.rb', line 88
-
-def match?(input)
-  input = Hyde::PatternMatching.canonicalize(input)
-  input.match? @glob
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/PatternMatching/ReMatch.html b/doc/Hyde/PatternMatching/ReMatch.html deleted file mode 100644 index 4d33f18..0000000 --- a/doc/Hyde/PatternMatching/ReMatch.html +++ /dev/null @@ -1,557 +0,0 @@ - - - - - - - Class: Hyde::PatternMatching::ReMatch - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::PatternMatching::ReMatch - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/pattern_matching/rematch.rb
-
- -
- -

Overview

-
- -
- Note: -

If you are planning to write your own pattern, this is the easiest one to read.

-
-
- -

Regexp pattern matching wrapper. -Following principles apply to the wrapper:

- -
    -
  • Regexp input is canonicalized using Hyde::PatternMatching.canonicalize
  • -
  • Matched content and anything before it is consumed in #match output
  • -
- - -
-
-
- - -
- - - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(pattern) ⇒ ReMatch - - - - - -

-
-

Returns a new instance of ReMatch.

- - -
-
-
- - -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'lib/hyde/pattern_matching/rematch.rb', line 13
-
-def initialize(pattern)
-  @glob = pattern
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .can_convert?(string) ⇒ Boolean - - - - - -

-
-

Test if input is convertible and if it should be converted.

- - -
-
-
-

Parameters:

-
    - -
  • - - input - - - - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -

    Input can be safely converted to Glob

    -
    - -
  • - -
- -
- - - - -
-
-
-
-44
-45
-46
-
-
# File 'lib/hyde/pattern_matching/rematch.rb', line 44
-
-def self.can_convert?(string)
-  string.is_a? Regexp
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #match(input) ⇒ Array(String,Array,Hash), FalseClass - - - - - -

-
-

Match the string and assign matches to parameters. -Returns:

- -
    -
  • Unmatched part of a string
  • -
  • Unnamed parameters
  • -
  • Named parameters
  • -
- - -
-
-
-

Parameters:

-
    - -
  • - - input - - - (String) - - - - — -

    String to match

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Array(String,Array,Hash)) - - - -
  • - -
  • - - - (FalseClass) - - - - — -

    if input doesn't match regexp

    -
    - -
  • - -
- -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-
-
# File 'lib/hyde/pattern_matching/rematch.rb', line 26
-
-def match(input)
-  result = Hyde::PatternMatching.canonicalize(input).match(@glob)
-  return false unless result
-
-  [result.post_match, result.captures, result.named_captures]
-end
-
-
- -
-

- - #match?(input) ⇒ Boolean - - - - - -

-
-

Test if a string can be matched. -Lighter version of match that doesn't assign any variables.

- - -
-
-
-

Parameters:

-
    - -
  • - - input - - - (String) - - - - — -

    String to match

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-37
-38
-39
-
-
# File 'lib/hyde/pattern_matching/rematch.rb', line 37
-
-def match?(input)
-  Hyde::PatternMatching.canonicalize(input).match? @glob
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Probe.html b/doc/Hyde/Probe.html deleted file mode 100644 index 5c58e55..0000000 --- a/doc/Hyde/Probe.html +++ /dev/null @@ -1,465 +0,0 @@ - - - - - - - Class: Hyde::Probe - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Probe - - - -

-
- -
-
Inherits:
-
- Node - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe.rb
-
- -
- -

Overview

-
-

Test probe. Also base for all "reactive" nodes.

- - -
-
-
- - -
-

Direct Known Subclasses

-

Handlers::Handler, Handlers::Serve

-
- - - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #properties ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute properties.

    -
    - -
  • - - -
- - - - - -

Attributes inherited from Node

-

#remap, #root

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Node

-

#go, #reject

-
-

Constructor Details

- -
-

- - #initialize(path, parent:) ⇒ Probe - - - - - -

-
-

Returns a new instance of Probe.

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (Object) - - - -
  • - -
  • - - parent - - - (Hyde::Node) - - - -
  • - -
- - -
- - - - -
-
-
-
-41
-42
-43
-
-
# File 'lib/hyde/probe.rb', line 41
-
-def initialize(path, parent:)
-  super(path, parent: parent)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #propertiesObject (readonly) - - - - - -

-
-

Returns the value of attribute properties.

- - -
-
-
- - -
- - - - -
-
-
-
-45
-46
-47
-
-
# File 'lib/hyde/probe.rb', line 45
-
-def properties
-  @properties
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #process(request) ⇒ Boolean - - - - - -

-
-

Method callback on successful request navigation. -Throws an error upon reaching the path. -This behaviour should only be used internally.

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -

    true if further navigation is possible

    -
    - -
  • - -
-

Raises:

-
    - -
  • - - - (StandardError) - - - -
  • - -
- -
- - - - -
-
-
-
-53
-54
-55
-56
-57
-58
-59
-60
-
-
# File 'lib/hyde/probe.rb', line 53
-
-def process(request)
-  return reject(request) unless request.path.match?(/^\/?$/)
-
-  raise StandardError, <<~STREND
-    probe reached #{request.splat.inspect}, #{request.param.inspect}
-    #{request.pretty_inspect}
-  STREND
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/ProbeBinding.html b/doc/Hyde/ProbeBinding.html deleted file mode 100644 index 84d9a19..0000000 --- a/doc/Hyde/ProbeBinding.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - Class: Hyde::ProbeBinding - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::ProbeBinding - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
DSL::ProbeMethods
-
- - - - - - -
-
Defined in:
-
lib/hyde/probe/binding.rb
-
- -
- - - - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from DSL::ProbeMethods

-

#bounce, #die, #header, #remove_header, #request, #status

-
-

Constructor Details

- -
-

- - #initialize(origin) ⇒ ProbeBinding - - - - - -

-
- -

Returns a new instance of ProbeBinding.

- - -
-
-
- - -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/hyde/probe/binding.rb', line 7
-
-def initialize(origin)
-  @origin = origin
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/ProbeContext.html b/doc/Hyde/ProbeContext.html deleted file mode 100644 index 314a636..0000000 --- a/doc/Hyde/ProbeContext.html +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - - Class: Hyde::ProbeContext - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::ProbeContext - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
DSL::CommonMethods, DSL::ProbeConstructors, DSL::ProbeMethods
-
- - - - - - -
-
Defined in:
-
lib/hyde/probe.rb
-
- -
- -

Overview

-
-

Context that provides execution context for Probes.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from DSL::CommonMethods

-

#bounce, #die

- - - - - - - - - -

Methods included from DSL::ProbeMethods

-

#escape_html, #file, #form, #form?, #header, #remove_header, #request, #status, #unescape_html

- - - - - - - - - -

Methods included from DSL::ProbeConstructors

-

#erb, #erubi

-
-

Constructor Details

- -
-

- - #initialize(origin) ⇒ ProbeContext - - - - - -

-
-

Returns a new instance of ProbeContext.

- - -
-
-
- - -
- - - - -
-
-
-
-32
-33
-34
-
-
# File 'lib/hyde/probe.rb', line 32
-
-def initialize(origin)
-  @origin = origin
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/ProcessorContext.html b/doc/Hyde/ProcessorContext.html deleted file mode 100644 index d600ae6..0000000 --- a/doc/Hyde/ProcessorContext.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - Class: Hyde::ProcessorContext - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::ProcessorContext - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
DSL::CommonMethods
-
- - - - - - -
-
Defined in:
-
lib/hyde/path.rb
-
- -
- -

Overview

-
-

Execution context for filters and preprocessors.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from DSL::CommonMethods

-

#bounce, #die

-
-

Constructor Details

- -
-

- - #initialize(path) ⇒ ProcessorContext - - - - - -

-
-

Returns a new instance of ProcessorContext.

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-
-
# File 'lib/hyde/path.rb', line 15
-
-def initialize(path)
-  @origin = path
-end
-
-
- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Request.html b/doc/Hyde/Request.html deleted file mode 100644 index cd4f3bb..0000000 --- a/doc/Hyde/Request.html +++ /dev/null @@ -1,1548 +0,0 @@ - - - - - - - Class: Hyde::Request - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Request - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/request.rb
-
- -
- -

Overview

-
-

Request wrapper for Rack protocol

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #filepath ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute filepath.

    -
    - -
  • - - -
  • - - - #headers ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute headers.

    -
    - -
  • - - -
  • - - - #param ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute param.

    -
    - -
  • - - -
  • - - - #path ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute path.

    -
    - -
  • - - -
  • - - - #path_info ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute path_info.

    -
    - -
  • - - -
  • - - - #postprocessors ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute postprocessors.

    -
    - -
  • - - -
  • - - - #query ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute query.

    -
    - -
  • - - -
  • - - - #request_method ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute request_method.

    -
    - -
  • - - -
  • - - - #script_name ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute script_name.

    -
    - -
  • - - -
  • - - - #server_name ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute server_name.

    -
    - -
  • - - -
  • - - - #server_port ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute server_port.

    -
    - -
  • - - -
  • - - - #server_protocol ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute server_protocol.

    -
    - -
  • - - -
  • - - - #splat ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Returns the value of attribute splat.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(env) ⇒ Request - - - - - -

-
-

Returns a new instance of Request.

- - -
-
-
-

Parameters:

-
    - -
  • - - env - - - (Array) - - - -
  • - -
- - -
- - - - -
-
-
-
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-
-
# File 'lib/hyde/request.rb', line 10
-
-def initialize(env)
-  # Should not be used under regular circumstances or depended upon.
-  @_original_env = env
-  # Rack environment variable bindings. Should be public and frozen.
-  init_request_params(env)
-  # Query parsing
-  @query = Hyde::Util::Query.new(@query_string)
-  # Pattern matching parameters. Public, readable, unfrozen.
-  @param = {}
-  @splat = []
-  # Traversal route. Public and writable.
-  @path = URI.decode_www_form_component(env["PATH_INFO"].dup)
-  # File serving path. Public and writable.
-  @filepath = "/"
-  # Encapsulates all rack variables. Should not be public.
-  @rack = init_rack_vars(env)
-  # Internal navigation states. Private.
-  @states = []
-  # Postprocessors for current request
-  @postprocessors = []
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #filepathObject - - - - - -

-
-

Returns the value of attribute filepath.

- - -
-
-
- - -
- - - - -
-
-
-
-65
-66
-67
-
-
# File 'lib/hyde/request.rb', line 65
-
-def filepath
-  @filepath
-end
-
-
- - - -
-

- - #headersObject (readonly) - - - - - -

-
-

Returns the value of attribute headers.

- - -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-
-
# File 'lib/hyde/request.rb', line 62
-
-def headers
-  @headers
-end
-
-
- - - -
-

- - #paramObject (readonly) - - - - - -

-
-

Returns the value of attribute param.

- - -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-
-
# File 'lib/hyde/request.rb', line 62
-
-def param
-  @param
-end
-
-
- - - -
-

- - #pathObject - - - - - -

-
-

Returns the value of attribute path.

- - -
-
-
- - -
- - - - -
-
-
-
-65
-66
-67
-
-
# File 'lib/hyde/request.rb', line 65
-
-def path
-  @path
-end
-
-
- - - -
-

- - #path_infoObject (readonly) - - - - - -

-
-

Returns the value of attribute path_info.

- - -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-
-
# File 'lib/hyde/request.rb', line 62
-
-def path_info
-  @path_info
-end
-
-
- - - -
-

- - #postprocessorsObject (readonly) - - - - - -

-
-

Returns the value of attribute postprocessors.

- - -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-
-
# File 'lib/hyde/request.rb', line 62
-
-def postprocessors
-  @postprocessors
-end
-
-
- - - -
-

- - #queryObject (readonly) - - - - - -

-
-

Returns the value of attribute query.

- - -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-
-
# File 'lib/hyde/request.rb', line 62
-
-def query
-  @query
-end
-
-
- - - -
-

- - #request_methodObject (readonly) - - - - - -

-
-

Returns the value of attribute request_method.

- - -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-
-
# File 'lib/hyde/request.rb', line 62
-
-def request_method
-  @request_method
-end
-
-
- - - -
-

- - #script_nameObject (readonly) - - - - - -

-
-

Returns the value of attribute script_name.

- - -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-
-
# File 'lib/hyde/request.rb', line 62
-
-def script_name
-  @script_name
-end
-
-
- - - -
-

- - #server_nameObject (readonly) - - - - - -

-
-

Returns the value of attribute server_name.

- - -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-
-
# File 'lib/hyde/request.rb', line 62
-
-def server_name
-  @server_name
-end
-
-
- - - -
-

- - #server_portObject (readonly) - - - - - -

-
-

Returns the value of attribute server_port.

- - -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-
-
# File 'lib/hyde/request.rb', line 62
-
-def server_port
-  @server_port
-end
-
-
- - - -
-

- - #server_protocolObject (readonly) - - - - - -

-
-

Returns the value of attribute server_protocol.

- - -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-
-
# File 'lib/hyde/request.rb', line 62
-
-def server_protocol
-  @server_protocol
-end
-
-
- - - -
-

- - #splatObject (readonly) - - - - - -

-
-

Returns the value of attribute splat.

- - -
-
-
- - -
- - - - -
-
-
-
-62
-63
-64
-
-
# File 'lib/hyde/request.rb', line 62
-
-def splat
-  @splat
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #bodynil, String - - - - - -

-
-

Returns request body (if POST data exists)

- - -
-
-
- -

Returns:

-
    - -
  • - - - (nil, String) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-43
-44
-
-
# File 'lib/hyde/request.rb', line 42
-
-def body
-  @body ||= @rack.input&.read
-end
-
-
- -
-

- - #inputIO - - - - - -

-
-

Returns raw Rack input object

- - -
-
-
- -

Returns:

-
    - -
  • - - - (IO) - - - - — -

    (May not entirely be compatible with IO, see Rack/SPEC.rdoc)

    -
    - -
  • - -
- -
- - - - -
-
-
-
-48
-49
-50
-
-
# File 'lib/hyde/request.rb', line 48
-
-def input
-  @rack.input
-end
-
-
- -
-

- - #pop_stateObject - - - - - -

-
-

Load last navigation state (path, splat, param) from state stack

- - -
-
-
- - -
- - - - -
-
-
-
-58
-59
-60
-
-
# File 'lib/hyde/request.rb', line 58
-
-def pop_state
-  @path, @param, @splat, @filepath = @states.pop
-end
-
-
- -
-

- - #push_stateObject - - - - - -

-
-

Push current navigation state (path, splat, param) onto state stack

- - -
-
-
- - -
- - - - -
-
-
-
-53
-54
-55
-
-
# File 'lib/hyde/request.rb', line 53
-
-def push_state
-  @states.push([@path, @param.dup, @splat.dup, @filepath.dup])
-end
-
-
- -
-

- - #run_postprocessors(response) ⇒ Object - - - - - -

-
-

Run postprocessors

- - -
-
-
-

Parameters:

- - - -
- - - - -
-
-
-
-34
-35
-36
-37
-38
-
-
# File 'lib/hyde/request.rb', line 34
-
-def run_postprocessors(response)
-  @postprocessors.each do |postproc|
-    postproc.call(self, response)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Response.html b/doc/Hyde/Response.html deleted file mode 100644 index 42a8eba..0000000 --- a/doc/Hyde/Response.html +++ /dev/null @@ -1,1150 +0,0 @@ - - - - - - - Class: Hyde::Response - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Response - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/response.rb
-
- -
- -

Overview

-
-

Rack protocol response wrapper.

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #body ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute body.

    -
    - -
  • - - -
  • - - - #chunk_size ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute chunk_size.

    -
    - -
  • - - -
  • - - - #headers ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute headers.

    -
    - -
  • - - -
  • - - - #status ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute status.

    -
    - -
  • - - -
- - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(response = nil) ⇒ Response - - - - - -

-
-

Returns a new instance of Response.

- - -
-
-
-

Parameters:

-
    - -
  • - - response - - - (Array(Integer, Hash, Array), nil) - - - (defaults to: nil) - - -
  • - -
- - -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-
-
# File 'lib/hyde/response.rb', line 11
-
-def initialize(response = nil)
-  if response
-    @status = response[0]
-    @headers = response[1]
-    @body = response[2]
-  else
-    @status = 404
-    @headers = {}
-    @body = []
-  end
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #bodyObject - - - - - -

-
-

Returns the value of attribute body.

- - -
-
-
- - -
- - - - -
-
-
-
-71
-72
-73
-
-
# File 'lib/hyde/response.rb', line 71
-
-def body
-  @body
-end
-
-
- - - -
-

- - #chunk_sizeObject - - - - - -

-
-

Returns the value of attribute chunk_size.

- - -
-
-
- - -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'lib/hyde/response.rb', line 8
-
-def chunk_size
-  @chunk_size
-end
-
-
- - - -
-

- - #headersObject - - - - - -

-
-

Returns the value of attribute headers.

- - -
-
-
- - -
- - - - -
-
-
-
-71
-72
-73
-
-
# File 'lib/hyde/response.rb', line 71
-
-def headers
-  @headers
-end
-
-
- - - -
-

- - #statusObject - - - - - -

-
-

Returns the value of attribute status.

- - -
-
-
- - -
- - - - -
-
-
-
-71
-72
-73
-
-
# File 'lib/hyde/response.rb', line 71
-
-def status
-  @status
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .chunk_body(text) ⇒ Array(String) - - - - - -

-
-

Turn body into array of chunks

- - -
-
-
-

Parameters:

-
    - -
  • - - text - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Array(String)) - - - -
  • - -
- -
- - - - -
-
-
-
-96
-97
-98
-
-
# File 'lib/hyde/response.rb', line 96
-
-def self.chunk_body(text)
-  text.chars.each_slice(@chunk_size).map(&:join)
-end
-
-
- -
-

- - .convert(obj) ⇒ Object - - - - - -

-
-

Ensure response correctness

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - - - - - -

    Response

    -
    - -
  • - -
- -
- - - - -
-
-
-
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-
-
# File 'lib/hyde/response.rb', line 76
-
-def self.convert(obj)
-  case obj
-  when Response
-    obj.validate
-  when Array
-    Response.new(obj).validate
-  when String, File, IO
-    Response.new([200,
-                  {
-                    "content-type" => "text/html"
-                  },
-                  obj]).validate
-  else
-    Response.new([404, {}, []])
-  end
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #add_header(key, value) ⇒ Object - - - - - -

-
-

Add a header to the headers hash

- - -
-
-
-

Parameters:

-
    - -
  • - - key - - - (String) - - - - — -

    header name

    -
    - -
  • - -
  • - - value - - - (String) - - - - — -

    header value

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-49
-50
-51
-52
-53
-54
-55
-56
-57
-
-
# File 'lib/hyde/response.rb', line 49
-
-def add_header(key, value)
-  if @headers[key].is_a? String
-    @headers[key] = [@headers[key], value]
-  elsif @headers[key].is_a? Array
-    @headers[key].append(value)
-  else
-    @headers[key] = value
-  end
-end
-
-
- -
-

- - #delete_header(key, value = nil) ⇒ Object - - - - - -

-
-

Delete a header value from the headers hash -If no value is provided, deletes all key entries

- - -
-
-
-

Parameters:

-
    - -
  • - - key - - - (String) - - - - — -

    header name

    -
    - -
  • - -
  • - - value - - - (String, nil) - - - (defaults to: nil) - - - — -

    header value

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-63
-64
-65
-66
-67
-68
-69
-
-
# File 'lib/hyde/response.rb', line 63
-
-def delete_header(key, value = nil)
-  if value and @response[key]
-    @response[key].delete(value)
-  else
-    @response.delete(key)
-  end
-end
-
-
- -
-

- - #finalizeArray(Integer,Hash,Array) - - - - - -

-
-

Return internal representation of Rack response

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array(Integer,Hash,Array)) - - - -
  • - -
- -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'lib/hyde/response.rb', line 25
-
-def finalize
-  [@status, @headers, @body]
-end
-
-
- -
-

- - #validateHyde::Response - - - - - -

-
-

Make internal representation conformant

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-
-
# File 'lib/hyde/response.rb', line 31
-
-def validate
-  if [204, 304].include?(@status) or (100..199).include?(@status)
-    @headers.delete "content-length"
-    @headers.delete "content-type"
-    @body = []
-  elsif @headers.empty?
-    @headers = {
-      "content-length" => content_size,
-      "content-type" => "text/html"
-    }
-  end
-  @body = self.class.chunk_body(@body) if @body.is_a? String
-  self
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/ServeHandler.html b/doc/Hyde/ServeHandler.html deleted file mode 100644 index 1d0b2d9..0000000 --- a/doc/Hyde/ServeHandler.html +++ /dev/null @@ -1,476 +0,0 @@ - - - - - - - Class: Hyde::ServeHandler - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::ServeHandler - - - -

-
- -
-
Inherits:
-
- Probe - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/serve_handler.rb
-
- -
- -

Overview

-
- -

Probe that sends files from a location

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #response ⇒ Object - - - - - - - - - - - - - - - - -
    -

    Returns the value of attribute response.

    -
    - -
  • - - -
- - - - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - - - - - - - -

Methods inherited from Node

-

#go, #reject

-
-

Constructor Details

- -
-

- - #initialize(path, parent:) ⇒ ServeHandler - - - - - -

-
- -

Returns a new instance of ServeHandler.

- - -
-
-
-

Parameters:

-
    - -
  • - - path - - - (Object) - - - -
  • - -
  • - - parent - - - (Hyde::Node) - - - -
  • - -
  • - - exec - - - (#call) - - - -
  • - -
- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'lib/hyde/probe/serve_handler.rb', line 11
-
-def initialize(path, parent:)
-  super(path, parent: parent)
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #responseObject - - - - - -

-
- -

Returns the value of attribute response.

- - -
-
-
- - -
- - - - -
-
-
-
-15
-16
-17
-
-
# File 'lib/hyde/probe/serve_handler.rb', line 15
-
-def response
-  @response
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #process(request) ⇒ Boolean - - - - - -

-
- -

Method callback on successful request navigation. Tries to serve files matched by handler

- - -
-
-
-

Parameters:

- - -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -
    -

    true if file was found

    -
    - -
  • - -
- -
- - - - -
-
-
-
-21
-22
-23
-24
-25
-26
-27
-28
-
-
# File 'lib/hyde/probe/serve_handler.rb', line 21
-
-def process(request)
-  path = File.expand_path(request.filepath)
-  return unless path.start_with? @properties["path"]
-
-  File.open(path.delete_suffix("/"))
-rescue StandardError
-  false
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Server.html b/doc/Hyde/Server.html deleted file mode 100644 index a64c5a4..0000000 --- a/doc/Hyde/Server.html +++ /dev/null @@ -1,442 +0,0 @@ - - - - - - - Class: Hyde::Server - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Server - - - -

-
- -
-
Inherits:
-
- Path - -
    -
  • Object
  • - - - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/server.rb
-
- -
- -

Overview

-
-

A specialized path that can be used directly as a Rack application.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
Context = - -
-
ServerContext
- -
- - - - - - -

Constants inherited - from Path

-

Path::ProcContext

- - - - -

Instance Attribute Summary

- -

Attributes inherited from Path

-

#children, #properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Path

-

#filter, #postprocess, #preprocess, #process

- - - - - - - - - -

Methods inherited from Node

-

#go, #process, #reject

-
-

Constructor Details

- -
-

- - #initialize(parent: nil, &setup) ⇒ Server - - - - - -

-
-

Returns a new instance of Server.

- - -
-
-
-

Parameters:

-
    - -
  • - - parent - - - (Hyde::Node, nil) - - - (defaults to: nil) - - - — -

    Parent object to inherit properties to

    -
    - -
  • - -
  • - - setup - - - (#call) - - - - — -

    Setup block

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-
-
# File 'lib/hyde/server.rb', line 17
-
-def initialize(parent: nil, &setup)
-  super("", parent: parent, &setup)
-  return if parent
-
-  {
-    "index" => [],
-    "handle.default" => proc do |code, backtrace: nil|
-      page = Hyde::Util.default_error_page(code, backtrace)
-      headers = {
-        "content-length": page.bytesize,
-        "content-type": "text/html"
-      }
-      [headers, page]
-    end,
-    "path" => "/"
-  }.each { |k, v| @properties[k] = v unless @properties[k] }
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #call(env) ⇒ Array(Integer,Hash,Array) - - - - - -

-
-

Rack ingress point. -This should not be called under any circumstances twice in the same application, -although server nesting for the purpose of creating virtual hosts is allowed.

- - -
-
-
-

Parameters:

-
    - -
  • - - env - - - (Hash) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Array(Integer,Hash,Array)) - - - -
  • - -
- -
- - - - -
-
-
-
-40
-41
-42
-43
-44
-45
-46
-47
-
-
# File 'lib/hyde/server.rb', line 40
-
-def call(env)
-  request = Hyde::Request.new(env)
-  response = catch(:finish) do
-    go(request)
-  end
-  request.run_postprocessors(response)
-  Response.convert(response).finalize
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/ServerBinding.html b/doc/Hyde/ServerBinding.html deleted file mode 100644 index ce91faf..0000000 --- a/doc/Hyde/ServerBinding.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - Class: Hyde::ServerBinding - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::ServerBinding - - - -

-
- -
-
Inherits:
-
- PathBinding - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/server.rb
-
- -
- - - - - - - - - - - - - - - -

Method Summary

- -

Methods inherited from PathBinding

-

#initialize

- - - - - - - - - -

Methods included from DSL::PathMethods

-

#filter, #index, #postprocess, #preprocess, #remap, #root

- - - - - - - - - -

Methods included from DSL::PathConstructors

-

#connect, #delete, #get, #head, #options, #patch, #path, #post, #probe, #put, #register, #serve, #trace

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::PathBinding

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/ServerContext.html b/doc/Hyde/ServerContext.html deleted file mode 100644 index da1c964..0000000 --- a/doc/Hyde/ServerContext.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - Class: Hyde::ServerContext - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::ServerContext - - - -

-
- -
-
Inherits:
-
- PathContext - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/server.rb
-
- -
- - - - - - - - - - - - - - - -

Method Summary

- -

Methods inherited from PathContext

-

#initialize

- - - - - - - - - -

Methods included from DSL::PathMethods

-

#filter, #index, #plugin, #postprocess, #preprocess, #remap, #root

- - - - - - - - - -

Methods included from DSL::PathConstructors

-

#connect, #delete, #get, #head, #options, #patch, #path, #post, #probe, #put, #register, #serve, #trace

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::PathContext

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/TRACEHandler.html b/doc/Hyde/TRACEHandler.html deleted file mode 100644 index 169d3a8..0000000 --- a/doc/Hyde/TRACEHandler.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - Class: Hyde::TRACEHandler - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::TRACEHandler - - - -

-
- -
-
Inherits:
-
- GETHandler - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/probe/http_method.rb
-
- -
- -

Overview

-
- -

Probe that executes callback on a TRACE

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
METHOD = - -
-
"TRACE"
- -
- - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Handler

-

#request, #response

- - - -

Attributes inherited from Probe

-

#properties

- - - -

Attributes inherited from Node

-

#remap, #root

- - - - - - - - - -

Method Summary

- -

Methods inherited from GETHandler

-

#process

- - - - - - - - - -

Methods inherited from Handler

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Probe

-

#initialize, #process

- - - - - - - - - -

Methods inherited from Node

-

#go, #initialize, #process, #reject

-
-

Constructor Details

- -

This class inherits a constructor from Hyde::Handler

- -
- - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Template.html b/doc/Hyde/Template.html deleted file mode 100644 index 5f044f8..0000000 --- a/doc/Hyde/Template.html +++ /dev/null @@ -1,766 +0,0 @@ - - - - - - - Class: Hyde::Template - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Template - Abstract - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/template.rb
-
- -
- -

Overview

-
-
- This class is abstract. -

does not represent any actual template engine.

-
-
-

Interface for Template engines

- - -
-
-
- - -
-

Direct Known Subclasses

-

Hyde::Templates::ERB, Hyde::Templates::Erubi

-
- - - - - - - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(input, vars = {}, parent:) ⇒ Template - - - - - -

-
-

Returns a new instance of Template.

- - -
-
-
-

Parameters:

-
    - -
  • - - input - - - (String, File) - - - - — -

    template text

    -
    - -
  • - -
  • - - vars - - - (Hash) - - - (defaults to: {}) - - - — -

    local variables for tempalte

    -
    - -
  • - -
  • - - parent - - - (Hyde::Node) - - - - — -

    parent node

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-
-
# File 'lib/hyde/template.rb', line 39
-
-def initialize(input, vars = {}, parent:)
-  @template = input.is_a?(File) ? input.read : input
-  @context = TemplateContext.new(parent, self)
-  @parent = parent
-  input.close if input.is_a? File
-  @binding = @context.binding
-  vars.each do |k, v|
-    @binding.local_variable_set(k, v)
-  end
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #import(filepath) ⇒ Object - - - - - -

-
-

Import a template from within current template

- - -
-
-
- - -
- - - - -
-
-
-
-85
-86
-87
-88
-89
-
-
# File 'lib/hyde/template.rb', line 85
-
-def import(filepath)
-  newtemp = self.class.new(filepath, {}, parent: @parent)
-  newtemp.binding = @binding
-  newtemp
-end
-
-
- -
-

- - #local_variable_get(key) ⇒ Object - - - - - -

-
-

Get local variable

- - -
-
-
-

Parameters:

-
    - -
  • - - key - - - (Symbol) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (Object) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-61
-62
-
-
# File 'lib/hyde/template.rb', line 60
-
-def local_variable_get(key)
-  @binding.local_variable_get(key)
-end
-
-
- -
-

- - #local_variable_set(key, value) ⇒ Object - - - - - -

-
-

Set local variable

- - -
-
-
-

Parameters:

-
    - -
  • - - key - - - (Symbol) - - - -
  • - -
  • - - value - - - (Object) - - - -
  • - -
- - -
- - - - -
-
-
-
-53
-54
-55
-
-
# File 'lib/hyde/template.rb', line 53
-
-def local_variable_set(key, value)
-  @binding.local_variable_set(key, value)
-end
-
-
- -
-

- - #local_variablesArray(Symbol) - - - - - -

-
-

Get an array of defined local variables

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array(Symbol)) - - - -
  • - -
- -
- - - - -
-
-
-
-66
-67
-68
-
-
# File 'lib/hyde/template.rb', line 66
-
-def local_variables
-  @binding.local_variables
-end
-
-
- -
-

- - #override_locals(vars) ⇒ Object - - - - - -

-
-

Override binding variables.

- - -
-
-
-

Parameters:

-
    - -
  • - - vars - - - (Hash{Symbol => Object}) - - - -
  • - -
- - -
- - - - -
-
-
-
-72
-73
-74
-75
-76
-
-
# File 'lib/hyde/template.rb', line 72
-
-def override_locals(vars)
-  vars.each do |k, v|
-    @binding.local_variable_set(k, v)
-  end
-end
-
-
- -
-

- - #runObject - - - - - -

-
- -
- Note: -

This method is a stub.

-
-
- -

Run the template

- - -
-
-
- - -
- - - - -
-
-
-
-80
-81
-82
-
-
# File 'lib/hyde/template.rb', line 80
-
-def run
-  # ... (stub)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/TemplateContext.html b/doc/Hyde/TemplateContext.html deleted file mode 100644 index 331ffa9..0000000 --- a/doc/Hyde/TemplateContext.html +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - - Class: Hyde::TemplateContext - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::TemplateContext - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
DSL::CommonMethods, DSL::ProbeConstructors, DSL::ProbeMethods, DSL::TemplateMethods
-
- - - - - - -
-
Defined in:
-
lib/hyde/template.rb
-
- -
- -

Overview

-
-

Context for template engines

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from DSL::TemplateMethods

-

#import

- - - - - - - - - -

Methods included from DSL::CommonMethods

-

#bounce, #die

- - - - - - - - - -

Methods included from DSL::ProbeMethods

-

#escape_html, #file, #form, #form?, #header, #remove_header, #request, #status, #unescape_html

- - - - - - - - - -

Methods included from DSL::ProbeConstructors

-

#erb, #erubi

-
-

Constructor Details

- -
-

- - #initialize(parent, parent_template) ⇒ TemplateContext - - - - - -

-
-

Returns a new instance of TemplateContext.

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-30
-
-
# File 'lib/hyde/template.rb', line 27
-
-def initialize(parent, parent_template)
-  @origin = parent
-  @parent_template = parent_template
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #bindingBinding - - - - - -

-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Binding) - - - -
  • - -
- -
- - - - -
-
-
-
-23
-24
-25
-
-
# File 'lib/hyde/template.rb', line 23
-
-def binding
-  Kernel.binding
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Templates.html b/doc/Hyde/Templates.html deleted file mode 100644 index 94d6577..0000000 --- a/doc/Hyde/Templates.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - Module: Hyde::Templates - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Hyde::Templates - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/template.rb,
- lib/hyde/template/erb.rb,
lib/hyde/template/erubi.rb
-
-
- -
- -

Overview

-
-

All template engine adapters subclassed from Template

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: ERB, Erubi - - -

- - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Templates/ERB.html b/doc/Hyde/Templates/ERB.html deleted file mode 100644 index 8707eb5..0000000 --- a/doc/Hyde/Templates/ERB.html +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - - Class: Hyde::Templates::ERB - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Templates::ERB - - - -

-
- -
-
Inherits:
-
- Hyde::Template - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/template/erb.rb
-
- -
- -

Overview

-
-

ERB Template language adapter

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Hyde::Template

-

#import, #local_variable_get, #local_variable_set, #local_variables, #override_locals

-
-

Constructor Details

- -
-

- - #initialize(input, vars = nil, parent:) ⇒ ERB - - - - - -

-
-

Returns a new instance of ERB.

- - -
-
-
- - -

See Also:

-
    - -
  • Hyde::Templates::ERB.{Hyde{Hyde::Template{Hyde::Template#new}
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-19
-
-
# File 'lib/hyde/template/erb.rb', line 11
-
-def initialize(input, vars = nil, parent:)
-  super
-  varname = "_part_#{SecureRandom.hex(10)}".to_sym
-  while @binding.local_variable_defined? varname
-    varname = "_part_#{SecureRandom.hex(10)}".to_sym
-  end
-  @template = ::ERB.new(@template, eoutvar: varname)
-  @template.filename = input.is_a?(File) ? input.path : "(Inline)"
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #runObject - - - - - -

-
-

Run the template.

- - -
-
-
- - -
- - - - -
-
-
-
-22
-23
-24
-
-
# File 'lib/hyde/template/erb.rb', line 22
-
-def run
-  @template.result @binding
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Templates/Erubi.html b/doc/Hyde/Templates/Erubi.html deleted file mode 100644 index 7abb91b..0000000 --- a/doc/Hyde/Templates/Erubi.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - - Class: Hyde::Templates::Erubi - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Templates::Erubi - - - -

-
- -
-
Inherits:
-
- Hyde::Template - - - show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/template/erubi.rb
-
- -
- -

Overview

-
-

Erubi (ERB) template language adapter

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods inherited from Hyde::Template

-

#import, #local_variable_get, #local_variable_set, #local_variables, #override_locals

-
-

Constructor Details

- -
-

- - #initialize(input, vars = nil, parent:, freeze: true, capture: false) ⇒ Erubi - - - - - -

-
-

Returns a new instance of Erubi.

- - -
-
-
- - -

See Also:

-
    - -
  • Hyde::Templates::Erubi.{Hyde{Hyde::Template{Hyde::Template#new}
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-
-
# File 'lib/hyde/template/erubi.rb', line 11
-
-def initialize(input,
-               vars = nil,
-               parent:,
-               freeze: true,
-               capture: false)
-  super(input, vars, parent: parent)
-  varname = "_part_#{SecureRandom.hex(10)}"
-  while @binding.local_variable_defined? varname.to_sym
-    varname = "_part_#{SecureRandom.hex(10)}"
-  end
-  properties = {
-    filename: input.is_a?(File) ? input.path : "(Inline)",
-    bufvar: varname,
-    freeze: freeze
-  }
-  engine = capture ? ::Erubi::CaptureEndEngine : ::Erubi::Engine
-  @template = engine.new(@template, properties)
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #runObject - - - - - -

-
-

Run the template.

- - -
-
-
- - -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'lib/hyde/template/erubi.rb', line 31
-
-def run
-  @binding.eval(@template.src)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Util.html b/doc/Hyde/Util.html deleted file mode 100644 index db4cb24..0000000 --- a/doc/Hyde/Util.html +++ /dev/null @@ -1,582 +0,0 @@ - - - - - - - Module: Hyde::Util - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Hyde::Util - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/util/lookup.rb,
- lib/hyde/util/html.rb,
lib/hyde/util/query.rb,
lib/hyde/util/multipart.rb,
lib/hyde/util/parseutils.rb,
lib/hyde/util/parsesorting.rb
-
-
- -
- -

Overview

-
-

Various things that exists for purely logical reasons

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: HeaderRegexp, ParserCommon, ParserSorting - - - - Classes: FormPart, Lookup, MultipartParser, Query - - -

- - -

- Constant Summary - collapse -

- -
- -
HTTP_STATUS = -
-
-

HTTP status codes and descriptions -Taken from WEBrick https://github.com/ruby/webrick/blob/master/lib/webrick/httpstatus.rb

- - -
-
-
- - -
-
-
{
-  100 => 'Continue',
-  101 => 'Switching Protocols',
-  200 => 'OK',
-  201 => 'Created',
-  202 => 'Accepted',
-  203 => 'Non-Authoritative Information',
-  204 => 'No Content',
-  205 => 'Reset Content',
-  206 => 'Partial Content',
-  207 => 'Multi-Status',
-  300 => 'Multiple Choices',
-  301 => 'Moved Permanently',
-  302 => 'Found',
-  303 => 'See Other',
-  304 => 'Not Modified',
-  305 => 'Use Proxy',
-  307 => 'Temporary Redirect',
-  400 => 'Bad Request',
-  401 => 'Unauthorized',
-  402 => 'Payment Required',
-  403 => 'Forbidden',
-  404 => 'Not Found',
-  405 => 'Method Not Allowed',
-  406 => 'Not Acceptable',
-  407 => 'Proxy Authentication Required',
-  408 => 'Request Timeout',
-  409 => 'Conflict',
-  410 => 'Gone',
-  411 => 'Length Required',
-  412 => 'Precondition Failed',
-  413 => 'Request Entity Too Large',
-  414 => 'Request-URI Too Large',
-  415 => 'Unsupported Media Type',
-  416 => 'Request Range Not Satisfiable',
-  417 => 'Expectation Failed',
-  418 => "I'm a teapot",
-  422 => 'Unprocessable Entity',
-  423 => 'Locked',
-  424 => 'Failed Dependency',
-  426 => 'Upgrade Required',
-  428 => 'Precondition Required',
-  429 => 'Too Many Requests',
-  431 => 'Request Header Fields Too Large',
-  451 => 'Unavailable For Legal Reasons',
-  500 => 'Internal Server Error',
-  501 => 'Not Implemented',
-  502 => 'Bad Gateway',
-  503 => 'Service Unavailable',
-  504 => 'Gateway Timeout',
-  505 => 'HTTP Version Not Supported',
-  507 => 'Insufficient Storage',
-  511 => 'Network Authentication Required'
-}.freeze
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .default_error_page(code, backtrace) ⇒ String - - - - - -

-
-

Default error page for Hyde

- - -
-
-
-

Parameters:

-
    - -
  • - - code - - - (Integer) - - - - — -

    HTTP Status code

    -
    - -
  • - -
  • - - backtrace - - - (Array(String), nil) - - - - — -

    Message to show in backtrace window

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-
-
# File 'lib/hyde/util/html.rb', line 89
-
-def self.default_error_page(code, backtrace)
-  backtrace ||= []
-  errortext = HTTP_STATUS[code]
-  <<~HTMLEOF
-    <!DOCTYPE HTML>
-    <html>
-        <head>
-            <title>#{Util.escape_html(errortext)}</title>
-            <style> .header {padding: 0.5rem; overflow: auto;} .title { font-weight: bolder; font-size: 48px; margin: 10px 10px; text-shadow: 1px 1px 1px #202222, 2px 2px 2px #404444; float: left } body { margin: 0; } .text { font-size 1rem; } .small { color: #7D7D7D; font-size: 12px;} .code { font-family: monospace; font-size: 0.7rem; } </style>
-            <meta charset="utf-8">
-        </head>
-        <body>
-            <div class="header">
-                <p class="title">HYDE</p>
-                <p style="float: right"><a href="https://adastra7.net/git/yessiest/hyde">Source code</a></p>
-            </div>
-            <div style="padding: 0.5rem">
-                <p class="text">#{Util.escape_html(errortext)}</p>
-                <pre><code class="text code">
-    #{backtrace.map(&Util.method(:escape_html)).join('<br/>')}
-                </code></pre>
-                <hr/>
-                <p class="small">#{Util.escape_html(Hyde::VLINE)}</p>
-            </div>
-        </body>
-    </html>
-  HTMLEOF
-end
-
-
- -
-

- - .escape_html(str) ⇒ String - - - - - -

-
- -
- Note: -

Do not use this to inject untrusted input into JavaScript code or CSS style of the page.

-
-
- -

Return string with escaped HTML entities. -This function is not adequate to prevent string interpolation.

- - -
-
-
-

Parameters:

-
    - -
  • - - str - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-69
-70
-71
-72
-73
-74
-
-
# File 'lib/hyde/util/html.rb', line 69
-
-def self.escape_html(str)
-  str = CGI.escapeHTML(str)
-  str.gsub(/[^\x1-\x7E]/) do |match|
-    "&##{match.ord};"
-  end
-end
-
-
- -
-

- - .unescape_html(str) ⇒ String - - - - - -

-
-

Return string with unescaped HTML entities.

- - -
-
-
-

Parameters:

-
    - -
  • - - str - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-79
-80
-81
-
-
# File 'lib/hyde/util/html.rb', line 79
-
-def self.unescape_html(str)
-  CGI.unescapeHTML(str)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Util/FormPart.html b/doc/Hyde/Util/FormPart.html deleted file mode 100644 index c533f40..0000000 --- a/doc/Hyde/Util/FormPart.html +++ /dev/null @@ -1,1022 +0,0 @@ - - - - - - - Class: Hyde::Util::FormPart - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Util::FormPart - - - -

-
- -
-
Inherits:
-
- Struct - -
    -
  • Object
  • - - - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/util/multipart.rb
-
- -
- -

Overview

-
-

Valid element of form data with headers

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #data ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Data received in the field through form data.

    -
    - -
  • - - -
  • - - - #filename ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    Original name of the sent file.

    -
    - -
  • - - -
  • - - - #filetype ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    MIME-type of the file.

    -
    - -
  • - - -
  • - - - #name ⇒ Object - - - - - - - - - readonly - - - - - - - - - -

    name of the form part.

    -
    - -
  • - - -
- - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Attribute Details

- - - -
-

- - #dataObject (readonly) - - - - - -

-
-

Data received in the field through form data

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-
-
# File 'lib/hyde/util/multipart.rb', line 19
-
-FormPart = Struct.new(:data, :name, :filename,
-                      :filetype, :tempfile, :headers) do
-  # Is this form part a file or plain data?
-  # @return [Boolean]
-  def file?
-    !tempfile.nil?
-  end
-
-  # Decode charset parameter
-  def decode(data)
-    data = Hyde::Util.unescape_html(data)
-    return data unless self.headers['charset']
-
-    data.force_encoding(self.headers['charset']).encode("UTF-8")
-  end
-
-  # If FormPart is not a file, simplify to string.
-  # @return [FormPart, String]
-  def simplify
-    file? ? self : decode(self.data)
-  end
-end
-
-
- - - -
-

- - #filenameObject (readonly) - - - - - -

-
-

Original name of the sent file

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-
-
# File 'lib/hyde/util/multipart.rb', line 19
-
-FormPart = Struct.new(:data, :name, :filename,
-                      :filetype, :tempfile, :headers) do
-  # Is this form part a file or plain data?
-  # @return [Boolean]
-  def file?
-    !tempfile.nil?
-  end
-
-  # Decode charset parameter
-  def decode(data)
-    data = Hyde::Util.unescape_html(data)
-    return data unless self.headers['charset']
-
-    data.force_encoding(self.headers['charset']).encode("UTF-8")
-  end
-
-  # If FormPart is not a file, simplify to string.
-  # @return [FormPart, String]
-  def simplify
-    file? ? self : decode(self.data)
-  end
-end
-
-
- - - -
-

- - #filetypeObject (readonly) - - - - - -

-
-

MIME-type of the file

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-
-
# File 'lib/hyde/util/multipart.rb', line 19
-
-FormPart = Struct.new(:data, :name, :filename,
-                      :filetype, :tempfile, :headers) do
-  # Is this form part a file or plain data?
-  # @return [Boolean]
-  def file?
-    !tempfile.nil?
-  end
-
-  # Decode charset parameter
-  def decode(data)
-    data = Hyde::Util.unescape_html(data)
-    return data unless self.headers['charset']
-
-    data.force_encoding(self.headers['charset']).encode("UTF-8")
-  end
-
-  # If FormPart is not a file, simplify to string.
-  # @return [FormPart, String]
-  def simplify
-    file? ? self : decode(self.data)
-  end
-end
-
-
- - - -
-

- - #nameObject (readonly) - - - - - -

-
-

name of the form part

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-
-
# File 'lib/hyde/util/multipart.rb', line 19
-
-FormPart = Struct.new(:data, :name, :filename,
-                      :filetype, :tempfile, :headers) do
-  # Is this form part a file or plain data?
-  # @return [Boolean]
-  def file?
-    !tempfile.nil?
-  end
-
-  # Decode charset parameter
-  def decode(data)
-    data = Hyde::Util.unescape_html(data)
-    return data unless self.headers['charset']
-
-    data.force_encoding(self.headers['charset']).encode("UTF-8")
-  end
-
-  # If FormPart is not a file, simplify to string.
-  # @return [FormPart, String]
-  def simplify
-    file? ? self : decode(self.data)
-  end
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #decode(data) ⇒ Object - - - - - -

-
-

Decode charset parameter

- - -
-
-
- - -
- - - - -
-
-
-
-28
-29
-30
-31
-32
-33
-
-
# File 'lib/hyde/util/multipart.rb', line 28
-
-def decode(data)
-  data = Hyde::Util.unescape_html(data)
-  return data unless self.headers['charset']
-
-  data.force_encoding(self.headers['charset']).encode("UTF-8")
-end
-
-
- -
-

- - #file?Boolean - - - - - -

-
-

Is this form part a file or plain data?

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-23
-24
-25
-
-
# File 'lib/hyde/util/multipart.rb', line 23
-
-def file?
-  !tempfile.nil?
-end
-
-
- -
-

- - #headers=(value) ⇒ Object - - - - - -

-
-

headers recevied from form data

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-
-
# File 'lib/hyde/util/multipart.rb', line 19
-
-FormPart = Struct.new(:data, :name, :filename,
-                      :filetype, :tempfile, :headers) do
-  # Is this form part a file or plain data?
-  # @return [Boolean]
-  def file?
-    !tempfile.nil?
-  end
-
-  # Decode charset parameter
-  def decode(data)
-    data = Hyde::Util.unescape_html(data)
-    return data unless self.headers['charset']
-
-    data.force_encoding(self.headers['charset']).encode("UTF-8")
-  end
-
-  # If FormPart is not a file, simplify to string.
-  # @return [FormPart, String]
-  def simplify
-    file? ? self : decode(self.data)
-  end
-end
-
-
- -
-

- - #simplifyFormPart, String - - - - - -

-
-

If FormPart is not a file, simplify to string.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (FormPart, String) - - - -
  • - -
- -
- - - - -
-
-
-
-37
-38
-39
-
-
# File 'lib/hyde/util/multipart.rb', line 37
-
-def simplify
-  file? ? self : decode(self.data)
-end
-
-
- -
-

- - #tempfile=(value) ⇒ Object - - - - - -

-
-

Temporary file for storing sent file data.

- - -
-
-
- - -
- - - - -
-
-
-
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-
-
# File 'lib/hyde/util/multipart.rb', line 19
-
-FormPart = Struct.new(:data, :name, :filename,
-                      :filetype, :tempfile, :headers) do
-  # Is this form part a file or plain data?
-  # @return [Boolean]
-  def file?
-    !tempfile.nil?
-  end
-
-  # Decode charset parameter
-  def decode(data)
-    data = Hyde::Util.unescape_html(data)
-    return data unless self.headers['charset']
-
-    data.force_encoding(self.headers['charset']).encode("UTF-8")
-  end
-
-  # If FormPart is not a file, simplify to string.
-  # @return [FormPart, String]
-  def simplify
-    file? ? self : decode(self.data)
-  end
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Util/HeaderRegexp.html b/doc/Hyde/Util/HeaderRegexp.html deleted file mode 100644 index b98f8f4..0000000 --- a/doc/Hyde/Util/HeaderRegexp.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - Module: Hyde::Util::HeaderRegexp - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Hyde::Util::HeaderRegexp - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/util/parseutils.rb
-
- -
- -

Overview

-
-

(not exactly precise) Regular expressions for some RFC definitions

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
TOKEN = -
-
-

Matches the RFC2616 definiton of token

- - -
-
-
- - -
-
-
/[!-~&&[^()<>@,;:\\"\/\[\]?={}\t]]+/.freeze
- -
QUOTED = -
-
-

Matches the RFC2616 definition of quoted-string

- - -
-
-
- - -
-
-
/"[\x0-\x7E&&[^\x1-\x8\xb-\x1f]]*(?<!\\)"/.freeze
- -
PRINTCHAR = -
-
-

Matches any CHAR except CTLs

- - -
-
-
- - -
-
-
/[\x2-\x7E]/.freeze
- -
PRINTABLE = -
-
-

Matches 1 or more CHARs excluding CTLs

- - -
-
-
- - -
-
-
/#{PRINTCHAR}+/o.freeze
- - -
/[\x21-\x7E&&[^",;\\]]*/.freeze
- - -
/(?:#{QUOTED}|#{COOKIE_OCTET})/o.freeze
- - -
TOKEN
- - -
/\A(#{COOKIE_NAME})=(#{COOKIE_VALUE})\Z/o.freeze
- -
PARAM_QUOTED = -
-
-

Matches a very abstract definition of a quoted header paramter. -Captures name (1) and value (2).

- - -
-
-
- - -
-
-
/\A(#{TOKEN})=?(#{QUOTED}|#{PRINTCHAR}*)\Z/o.freeze
- -
PARAM = -
-
-

Matches a very abstract definition of a header parameter. -Captures name (1) and value (2).

- - -
-
-
- - -
-
-
/\A(#{TOKEN})=?(#{PRINTCHAR}*)\Z/o.freeze
- - -
/\A(#{TOKEN})=?(#{QUOTED}|#{COOKIE_OCTET})\Z/o.freeze
- -
- - - - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Util/Lookup.html b/doc/Hyde/Util/Lookup.html deleted file mode 100644 index ec5a18f..0000000 --- a/doc/Hyde/Util/Lookup.html +++ /dev/null @@ -1,599 +0,0 @@ - - - - - - - Class: Hyde::Util::Lookup - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Util::Lookup - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/util/lookup.rb
-
- -
- -

Overview

-
-

Value container with recursive lookup

- - -
-
-
- - -
- - - -

Instance Attribute Summary collapse

-
    - -
  • - - - #parent ⇒ Object - - - - - - - - - - - - - - - - -

    Returns the value of attribute parent.

    -
    - -
  • - - -
- - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - -
-

Constructor Details

- -
-

- - #initialize(parent = nil, hash = {}) ⇒ Lookup - - - - - -

-
-

Returns a new instance of Lookup.

- - -
-
-
-

Parameters:

-
    - -
  • - - parent - - - (Lookup, nil) - - - (defaults to: nil) - - -
  • - -
- - -
- - - - -
-
-
-
-9
-10
-11
-12
-
-
# File 'lib/hyde/util/lookup.rb', line 9
-
-def initialize(parent = nil, hash = {})
-  @parent = (parent or Hash.new(nil))
-  @storage = hash
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #parentObject - - - - - -

-
-

Returns the value of attribute parent.

- - -
-
-
- - -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'lib/hyde/util/lookup.rb', line 34
-
-def parent
-  @parent
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .[](hash) ⇒ Object - - - - - -

-
-

Initialize a Lookup from Hash

- - -
-
-
-

Parameters:

-
    - -
  • - - hash - - - (Hash) - - - -
  • - -
- - -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'lib/hyde/util/lookup.rb', line 16
-
-def self.[](hash)
-  Lookup.new(nil, Hash[hash])
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #[](key) ⇒ Object? - - - - - -

-
-

Get a value by key

- - -
-
-
-

Parameters:

-
    - -
  • - - key - - - (#hash) - - - - — -

    key for value

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Object, nil) - - - -
  • - -
- -
- - - - -
-
-
-
-23
-24
-25
-
-
# File 'lib/hyde/util/lookup.rb', line 23
-
-def [](key)
-  @storage[key] or @parent[key]
-end
-
-
- -
-

- - #[]=(key, value) ⇒ Object - - - - - -

-
-

Set a value by key

- - -
-
-
-

Parameters:

-
    - -
  • - - key - - - (#hash) - - - - — -

    key for value

    -
    - -
  • - -
  • - - value - - - (Object) - - - - — -

    value value

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-30
-31
-32
-
-
# File 'lib/hyde/util/lookup.rb', line 30
-
-def []=(key, value)
-  @storage[key] = value
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Util/MultipartParser.html b/doc/Hyde/Util/MultipartParser.html deleted file mode 100644 index 5953275..0000000 --- a/doc/Hyde/Util/MultipartParser.html +++ /dev/null @@ -1,487 +0,0 @@ - - - - - - - Class: Hyde::Util::MultipartParser - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Util::MultipartParser - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
ParserSorting
-
- - - - - - -
-
Defined in:
-
lib/hyde/util/multipart.rb
-
- -
- -

Overview

-
-

A very naive implementation of a Multipart form parser.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(io, boundary) ⇒ MultipartParser - - - - - -

-
-

Returns a new instance of MultipartParser.

- - -
-
-
- - -
- - - - -
-
-
-
-45
-46
-47
-48
-49
-50
-
-
# File 'lib/hyde/util/multipart.rb', line 45
-
-def initialize(io, boundary)
-  @input = io.is_a?(String) ? StringIO.new(io) : io
-  @boundary = boundary
-  @state = :idle
-  @data = []
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #parseArray<FormPart, FormFile> - - - - - -

-
-

Parse multipart formdata

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array<FormPart, FormFile>) - - - -
  • - -
- -
- - - - -
-
-
-
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-
-
# File 'lib/hyde/util/multipart.rb', line 58
-
-def parse
-  return @data unless @data.empty?
-
-  while (line = @input.gets)
-    case @state
-    when :idle # waiting for valid boundary
-      if line == "--#{@boundary}\r\n"
-        # transition to :headers on valid boundary
-        @state = :headers
-        @data.append(FormPart.new(*([nil] * 5), {}))
-      end
-    when :headers # after valid boundary - checking for headers
-      if line == "\r\n"
-        # prepare form field and transition to :data or :file
-        @state = file?(@data[-1].headers) ? :file : :data
-        if @state == :data
-          setup_data_meta(@data[-1])
-        else
-          setup_file_meta(@data[-1])
-        end
-        next
-      end
-      push_header(line, @data[-1].headers)
-    when :data, :file # after headers - processing form data
-      if @data[-1].headers.empty?
-        # transition to :idle on empty headers
-        @state = :idle
-        next
-      end
-      if ["--#{@boundary}\r\n", "--#{@boundary}--\r\n"].include? line
-        # finalize and transition to either :headers or :idle
-        if @state == :file
-          @data[-1].tempfile.truncate(@data[-1].tempfile.size - 2)
-          @data[-1].tempfile.close
-        else
-          @data[-1].data.delete_suffix! "\r\n"
-        end
-        @state = line == "--#{@boundary}\r\n" ? :headers : :idle
-        @data.append(FormPart.new(*([nil] * 5), {}))
-        next
-      end
-      if @state == :data
-        @data[-1].data ||= ""
-        @data[-1].data << line
-      else
-        @data[-1].tempfile << line
-      end
-    end
-  end
-  @state = :idle
-  @data.pop
-  @data.freeze
-end
-
-
- -
-

- - #to_hHash - - - - - -

-
-

Return a hash of current form. -(equivalent to Query.parse but for multipart/form-data)

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-116
-117
-118
-
-
# File 'lib/hyde/util/multipart.rb', line 116
-
-def to_h
-  flatten(sort(gen_hash(parse)))
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Util/ParserCommon.html b/doc/Hyde/Util/ParserCommon.html deleted file mode 100644 index eef0692..0000000 --- a/doc/Hyde/Util/ParserCommon.html +++ /dev/null @@ -1,476 +0,0 @@ - - - - - - - Module: Hyde::Util::ParserCommon - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Hyde::Util::ParserCommon - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
lib/hyde/util/parseutils.rb
-
- -
- -

Overview

-
-

Module for all things related to parsing HTTP and related syntax.

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
RFC1123_DATE = -
-
-

strftime parameter to return a correct RFC 1123 date.

- - -
-
-
- - -
-
-
"%a, %d %b %Y %H:%M:%S GMT"
- -
- - - - - - - - - -

- Class Method Summary - collapse -

- - - - - - -
-

Class Method Details

- - -
-

- - .make_value(input, opts, sep = ";") ⇒ String - - - - - -

-
-

Construct a parametrized header value. -Does some input sanitization during construction

- - -
-
-
-

Parameters:

-
    - -
  • - - input - - - (String) - - - -
  • - -
  • - - opts - - - (Hash) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
-

Raises:

- - -
- - - - -
-
-
-
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-
-
# File 'lib/hyde/util/parseutils.rb', line 80
-
-def self.make_value(input, opts, sep = ";")
-  output = input
-  unless input.match? HeaderRegexp::PRINTABLE
-    raise Hyde::ParsingError, "input is not ascii printable"
-  end
-
-  opts.each do |key, value|
-    check_param(key, value)
-    newparam = if value.is_a? String
-                 "#{sep} #{key}=#{value}"
-               else
-                 "#{sep} #{key}"
-               end
-    output += newparam
-  end
-  output
-end
-
-
- -
-

- - .parse_value(input, sep: ";", unquote: false, regexp: nil) ⇒ Array(String, Hash) - - - - - -

-
-

Parse parametrized header values. -This method will try the best attempt at decoding parameters. -However, it does no decoding on the first argument.

- - -
-
-
-

Parameters:

-
    - -
  • - - input - - - (String) - - - -
  • - -
  • - - sep - - - (String, Regexp) - - - (defaults to: ";") - - -
  • - -
  • - - unquote - - - (Boolean) - - - (defaults to: false) - - - — -

    interpret params as possibly quoted

    -
    - -
  • - -
  • - - regexp - - - (Regexp, nil) - - - (defaults to: nil) - - - — -

    override param matching regexp

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Array(String, Hash)) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-
-
# File 'lib/hyde/util/parseutils.rb', line 51
-
-def self.parse_value(input, sep: ";", unquote: false, regexp: nil)
-  parts = input.split(sep).map { |x| URI.decode_uri_component(x).strip }
-  base = parts.shift
-  opts = parts.map do |raw|
-    key, value = raw.match(if regexp
-                             regexp
-                           elsif unquote
-                             HeaderRegexp::PARAM_QUOTED
-                           else
-                             HeaderRegexp::PARAM
-                           end).to_a[1..]
-    value = case value
-            when "" then true
-            when /\A".*"\z/ then value.undump
-            else value
-            end
-    [key, value]
-  end.to_h
-  [base, opts]
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Util/ParserSorting.html b/doc/Hyde/Util/ParserSorting.html deleted file mode 100644 index 60216a8..0000000 --- a/doc/Hyde/Util/ParserSorting.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - Module: Hyde::Util::ParserSorting - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Module: Hyde::Util::ParserSorting - - - -

-
- - - - - - - - - -
-
Included in:
-
MultipartParser, Query
-
- - - -
-
Defined in:
-
lib/hyde/util/parsesorting.rb
-
- -
- -

Overview

-
-

Internal library for generating form hashes

- - -
-
-
- - -
- - - - - - - - -
- - - -
- - \ No newline at end of file diff --git a/doc/Hyde/Util/Query.html b/doc/Hyde/Util/Query.html deleted file mode 100644 index c123411..0000000 --- a/doc/Hyde/Util/Query.html +++ /dev/null @@ -1,498 +0,0 @@ - - - - - - - Class: Hyde::Util::Query - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Class: Hyde::Util::Query - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
ParserSorting
-
- - - - - - -
-
Defined in:
-
lib/hyde/util/query.rb
-
- -
- -

Overview

-
-

Query string parser

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - - - - - -
-

Constructor Details

- -
-

- - #initialize(query) ⇒ Query - - - - - -

-
-

Returns a new instance of Query.

- - -
-
-
-

Parameters:

-
    - -
  • - - query - - - (String) - - - -
  • - -
- - -
- - - - -
-
-
-
-12
-13
-14
-
-
# File 'lib/hyde/util/query.rb', line 12
-
-def initialize(query)
-  @query = query
-end
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - #[](key) ⇒ String, Array - - - - - -

-
-

Get key from query.

- - -
-
-
-

Parameters:

-
    - -
  • - - key - - - (String) - - - -
  • - -
- -

Returns:

-
    - -
  • - - - (String, Array) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-40
-41
-
-
# File 'lib/hyde/util/query.rb', line 39
-
-def [](key)
-  (@cache ||= parse)[key]
-end
-
-
- -
-

- - #parseHash - - - - - -

-
-

Better(tm) query parser. -Returns a hash with arrays. -Key semantics:

- -
    -
  • key=value creates a key value pair
  • -
  • key[]=value appends value to an array named key
  • -
  • key[index]=value sets value at index of array named key
  • -
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-32
-33
-34
-
-
# File 'lib/hyde/util/query.rb', line 32
-
-def parse
-  construct_deep_hash(URI.decode_www_form(@query))
-end
-
-
- -
-

- - #parse_shallowHash - - - - - -

-
-

Shallow query parser (does not do PHP-like array keys)

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-19
-20
-21
-22
-
-
# File 'lib/hyde/util/query.rb', line 18
-
-def parse_shallow
-  URI.decode_www_form(@query)
-     .sort_by { |array| array[0] }
-     .to_h
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/_index.html b/doc/_index.html deleted file mode 100644 index 384037e..0000000 --- a/doc/_index.html +++ /dev/null @@ -1,576 +0,0 @@ - - - - - - - Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
- - -

Documentation by YARD 0.9.34

-
-

Alphabetic Index

- -

File Listing

- - -
-

Namespace Listing A-Z

- - - - - - - - -
- - - - - -
    -
  • D
  • -
      - -
    • - DELETE - - (Hyde::Handlers) - -
    • - -
    • - DSL - - (Hyde) - -
    • - -
    -
- - -
    -
  • E
  • -
      - -
    • - ERB - - (Hyde::Templates) - -
    • - -
    • - Error - - (Hyde) - -
    • - -
    • - Erubi - - (Hyde::Templates) - -
    • - -
    -
- - -
    -
  • F
  • -
      - -
    • - FormPart - - (Hyde::Util) - -
    • - -
    -
- - -
    -
  • G
  • -
      - -
    • - GET - - (Hyde::Handlers) - -
    • - -
    • - Glob - - (Hyde::PatternMatching) - -
    • - -
    -
- - - - - -
    -
  • L
  • -
      - -
    • - Lookup - - (Hyde::Util) - -
    • - -
    -
- - -
- - - - - -
    -
  • N
  • -
      - -
    • - Node - - (Hyde) - -
    • - -
    -
- - -
    -
  • O
  • -
      - -
    • - OPTIONS - - (Hyde::Handlers) - -
    • - -
    -
- - - - - -
    -
  • Q
  • -
      - -
    • - Query - - (Hyde::Util) - -
    • - -
    -
- - -
    -
  • R
  • -
      - -
    • - ReMatch - - (Hyde::PatternMatching) - -
    • - -
    • - Request - - (Hyde) - -
    • - -
    • - Response - - (Hyde) - -
    • - -
    -
- - - - - - - - -
- - -
    -
  • U
  • -
      - -
    • - Util - - (Hyde) - -
    • - -
    -
- -
- -
- -
- - - -
- - \ No newline at end of file diff --git a/doc/class_list.html b/doc/class_list.html deleted file mode 100644 index 1c1c893..0000000 --- a/doc/class_list.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - Class List - - - -
-
-

Class List

- - - -
- - -
- - diff --git a/doc/css/common.css b/doc/css/common.css deleted file mode 100644 index cf25c45..0000000 --- a/doc/css/common.css +++ /dev/null @@ -1 +0,0 @@ -/* Override this file with custom rules */ \ No newline at end of file diff --git a/doc/css/full_list.css b/doc/css/full_list.css deleted file mode 100644 index fa35982..0000000 --- a/doc/css/full_list.css +++ /dev/null @@ -1,58 +0,0 @@ -body { - margin: 0; - font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; - font-size: 13px; - height: 101%; - overflow-x: hidden; - background: #fafafa; -} - -h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; } -.clear { clear: both; } -.fixed_header { position: fixed; background: #fff; width: 100%; padding-bottom: 10px; margin-top: 0; top: 0; z-index: 9999; height: 70px; } -#search { position: absolute; right: 5px; top: 9px; padding-left: 24px; } -#content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1om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XAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; } -#full_list { padding: 0; list-style: none; margin-left: 0; margin-top: 80px; font-size: 1.1em; } -#full_list ul { padding: 0; } -#full_list li { padding: 0; margin: 0; list-style: none; } -#full_list li .item { padding: 5px 5px 5px 12px; } -#noresults { padding: 7px 12px; background: #fff; } -#content.insearch #noresults { margin-left: 7px; } -li.collapsed ul { display: none; } -li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; } -li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; } -li { color: #888; cursor: pointer; } -li.deprecated { text-decoration: line-through; font-style: italic; } -li.odd { background: #f0f0f0; } -li.even { background: #fafafa; } -.item:hover { background: #ddd; } -li small:before { content: "("; } -li small:after { content: ")"; } -li small.search_info { display: none; } -a, a:visited { text-decoration: none; color: #05a; } -li.clicked > .item { background: #05a; color: #ccc; } -li.clicked > .item a, li.clicked > .item a:visited { color: #eee; } -li.clicked > .item a.toggle { opacity: 0.5; background-position: bottom right; } -li.collapsed.clicked a.toggle { background-position: top right; } -#search input { border: 1px solid #bbb; border-radius: 3px; } -#full_list_nav { margin-left: 10px; font-size: 0.9em; display: block; color: #aaa; } -#full_list_nav a, #nav a:visited { color: #358; } -#full_list_nav a:hover { background: transparent; color: #5af; } -#full_list_nav span:after { content: ' | '; } -#full_list_nav span:last-child:after { content: ''; } - -#content h1 { margin-top: 0; } -li { white-space: nowrap; cursor: normal; } -li small { display: block; font-size: 0.8em; } -li small:before { content: ""; } -li small:after { content: ""; } -li small.search_info { display: none; } -#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; } -#content.insearch #search { background-position: center right; } -#search input { width: 110px; } - -#full_list.insearch ul { display: block; } -#full_list.insearch .item { display: none; } -#full_list.insearch .found { display: block; padding-left: 11px !important; } -#full_list.insearch li a.toggle { display: none; } -#full_list.insearch li small.search_info { display: block; } diff --git a/doc/css/style.css b/doc/css/style.css deleted file mode 100644 index eb0dbc8..0000000 --- a/doc/css/style.css +++ /dev/null @@ -1,497 +0,0 @@ -html { - width: 100%; - height: 100%; -} -body { - font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; - font-size: 13px; - width: 100%; - margin: 0; - padding: 0; - display: flex; - display: -webkit-flex; - display: -ms-flexbox; -} - -#nav { - position: relative; - width: 100%; - height: 100%; - border: 0; - border-right: 1px dotted #eee; - overflow: auto; -} -.nav_wrap { - margin: 0; - padding: 0; - width: 20%; - height: 100%; - position: relative; - display: flex; - display: -webkit-flex; - display: -ms-flexbox; - flex-shrink: 0; - -webkit-flex-shrink: 0; - -ms-flex: 1 0; -} -#resizer { - position: absolute; - right: -5px; - top: 0; - width: 10px; - height: 100%; - cursor: col-resize; - z-index: 9999; -} -#main { - flex: 5 1; - -webkit-flex: 5 1; - -ms-flex: 5 1; - outline: none; - position: relative; - background: #fff; - padding: 1.2em; - padding-top: 0.2em; - box-sizing: border-box; -} - -@media (max-width: 920px) { - .nav_wrap { width: 100%; top: 0; right: 0; overflow: visible; position: absolute; } - #resizer { display: none; } - #nav { - z-index: 9999; - background: #fff; - display: none; - position: absolute; - top: 40px; - right: 12px; - width: 500px; - max-width: 80%; - height: 80%; - overflow-y: scroll; - border: 1px solid #999; - border-collapse: collapse; - box-shadow: -7px 5px 25px #aaa; - border-radius: 2px; - } -} - -@media (min-width: 920px) { - body { height: 100%; overflow: hidden; } - #main { height: 100%; overflow: auto; } - #search { display: none; } -} - -#main img { max-width: 100%; } -h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; } -h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; } -h1.title { margin-bottom: 10px; } -h1.alphaindex { margin-top: 0; font-size: 22px; } -h2 { - padding: 0; - padding-bottom: 3px; - border-bottom: 1px #aaa solid; - font-size: 1.4em; - margin: 1.8em 0 0.5em; - position: relative; -} -h2 small { font-weight: normal; font-size: 0.7em; display: inline; position: absolute; right: 0; } -h2 small a { - display: block; - height: 20px; - border: 1px solid #aaa; - border-bottom: 0; - border-top-left-radius: 5px; - background: #f8f8f8; - position: relative; - padding: 2px 7px; -} -.clear { clear: both; } -.inline { display: inline; } -.inline p:first-child { display: inline; } -.docstring, .tags, #filecontents { font-size: 15px; line-height: 1.5145em; } -.docstring p > code, .docstring p > tt, .tags p > code, .tags p > tt { - color: #c7254e; background: #f9f2f4; padding: 2px 4px; font-size: 1em; - border-radius: 4px; -} -.docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; } -.docstring h1 { font-size: 1.2em; } -.docstring h2 { font-size: 1.1em; } -.docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; } -.summary_desc .object_link a, .docstring .object_link a { - font-family: monospace; font-size: 1.05em; - color: #05a; background: #EDF4FA; padding: 2px 4px; font-size: 1em; - border-radius: 4px; -} -.rdoc-term { padding-right: 25px; font-weight: bold; } -.rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; } -.summary_desc pre.code .object_link a, .docstring pre.code .object_link a { - padding: 0px; background: inherit; color: inherit; border-radius: inherit; -} - -/* style for */ -#filecontents table, .docstring table { border-collapse: collapse; } -#filecontents table th, #filecontents table td, -.docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; } -#filecontents table tr:nth-child(odd), -.docstring table tr:nth-child(odd) { background: #eee; } -#filecontents table tr:nth-child(even), -.docstring table tr:nth-child(even) { background: #fff; } -#filecontents table th, .docstring table th { background: #fff; } - -/* style for
    */ -#filecontents li > p, .docstring li > p { margin: 0px; } -#filecontents ul, .docstring ul { padding-left: 20px; } -/* style for
    */ -#filecontents dl, .docstring dl { border: 1px solid #ccc; } -#filecontents dt, .docstring dt { background: #ddd; font-weight: bold; padding: 3px 5px; } -#filecontents dd, .docstring dd { padding: 5px 0px; margin-left: 18px; } -#filecontents dd > p, .docstring dd > p { margin: 0px; } - -.note { - color: #222; - margin: 20px 0; - padding: 10px; - border: 1px solid #eee; - border-radius: 3px; - display: block; -} -.docstring .note { - border-left-color: #ccc; - border-left-width: 5px; -} -.note.todo { background: #ffffc5; border-color: #ececaa; } -.note.returns_void { background: #efefef; } -.note.deprecated { background: #ffe5e5; border-color: #e9dada; } -.note.title.deprecated { background: #ffe5e5; border-color: #e9dada; } -.note.private { background: #ffffc5; border-color: #ececaa; } -.note.title { padding: 3px 6px; font-size: 0.9em; font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; display: inline; } -.summary_signature + .note.title { margin-left: 7px; } -h1 .note.title { font-size: 0.5em; font-weight: normal; padding: 3px 5px; position: relative; top: -3px; text-transform: capitalize; } -.note.title { background: #efefef; } -.note.title.constructor { color: #fff; background: #6a98d6; border-color: #6689d6; } -.note.title.writeonly { color: #fff; background: #45a638; border-color: #2da31d; } -.note.title.readonly { color: #fff; background: #6a98d6; border-color: #6689d6; } -.note.title.private { background: #d5d5d5; border-color: #c5c5c5; } -.note.title.not_defined_here { background: transparent; border: none; font-style: italic; } -.discussion .note { margin-top: 6px; } -.discussion .note:first-child { margin-top: 0; } - -h3.inherited { - font-style: italic; - font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; - font-weight: normal; - padding: 0; - margin: 0; - margin-top: 12px; - margin-bottom: 3px; - font-size: 13px; -} -p.inherited { - padding: 0; - margin: 0; - margin-left: 25px; -} - -.box_info dl { - margin: 0; - border: 0; - width: 100%; - font-size: 1em; - display: flex; - display: -webkit-flex; - display: -ms-flexbox; -} -.box_info dl dt { - flex-shrink: 0; - -webkit-flex-shrink: 1; - -ms-flex-shrink: 1; - width: 100px; - text-align: right; - font-weight: bold; - border: 1px solid #aaa; - border-width: 1px 0px 0px 1px; - padding: 6px 0; - padding-right: 10px; -} -.box_info dl dd { - flex-grow: 1; - -webkit-flex-grow: 1; - -ms-flex: 1; - max-width: 420px; - padding: 6px 0; - padding-right: 20px; - border: 1px solid #aaa; - border-width: 1px 1px 0 0; - overflow: hidden; - position: relative; -} -.box_info dl:last-child > * { - border-bottom: 1px solid #aaa; -} -.box_info dl:nth-child(odd) > * { background: #eee; } -.box_info dl:nth-child(even) > * { background: #fff; } -.box_info dl > * { margin: 0; } - -ul.toplevel { list-style: none; padding-left: 0; font-size: 1.1em; } -.index_inline_list { padding-left: 0; font-size: 1.1em; } - -.index_inline_list li { - list-style: none; - display: inline-block; - padding: 0 12px; - line-height: 30px; - margin-bottom: 5px; -} - -dl.constants { margin-left: 10px; } -dl.constants dt { font-weight: bold; font-size: 1.1em; margin-bottom: 5px; } -dl.constants.compact dt { display: inline-block; font-weight: normal } -dl.constants dd { width: 75%; white-space: pre; font-family: monospace; margin-bottom: 18px; } -dl.constants .docstring .note:first-child { margin-top: 5px; } - -.summary_desc { - margin-left: 32px; - display: block; - font-family: sans-serif; - font-size: 1.1em; - margin-top: 8px; - line-height: 1.5145em; - margin-bottom: 0.8em; -} -.summary_desc tt { font-size: 0.9em; } -dl.constants .note { padding: 2px 6px; padding-right: 12px; margin-top: 6px; } -dl.constants .docstring { margin-left: 32px; font-size: 0.9em; font-weight: normal; } -dl.constants .tags { padding-left: 32px; font-size: 0.9em; line-height: 0.8em; } -dl.constants .discussion *:first-child { margin-top: 0; } -dl.constants .discussion *:last-child { margin-bottom: 0; } - -.method_details { border-top: 1px dotted #ccc; margin-top: 25px; padding-top: 0; } -.method_details.first { border: 0; margin-top: 5px; } -.method_details.first h3.signature { margin-top: 1em; } -p.signature, h3.signature { - font-size: 1.1em; font-weight: normal; font-family: Monaco, Consolas, Courier, monospace; - padding: 6px 10px; margin-top: 1em; - background: #E8F4FF; border: 1px solid #d8d8e5; border-radius: 5px; -} -p.signature tt, -h3.signature tt { font-family: Monaco, Consolas, Courier, monospace; } -p.signature .overload, -h3.signature .overload { display: block; } -p.signature .extras, -h3.signature .extras { font-weight: normal; font-family: sans-serif; color: #444; font-size: 1em; } -p.signature .not_defined_here, -h3.signature .not_defined_here, -p.signature .aliases, -h3.signature .aliases { display: block; font-weight: normal; font-size: 0.9em; font-family: sans-serif; margin-top: 0px; color: #555; } -p.signature .aliases .names, -h3.signature .aliases .names { font-family: Monaco, Consolas, Courier, monospace; font-weight: bold; color: #000; font-size: 1.2em; } - -.tags .tag_title { font-size: 1.05em; margin-bottom: 0; font-weight: bold; } -.tags .tag_title tt { color: initial; padding: initial; background: initial; } -.tags ul { margin-top: 5px; padding-left: 30px; list-style: square; } -.tags ul li { margin-bottom: 3px; } -.tags ul .name { font-family: monospace; font-weight: bold; } -.tags ul .note { padding: 3px 6px; } -.tags { margin-bottom: 12px; } - -.tags .examples .tag_title { margin-bottom: 10px; font-weight: bold; } -.tags .examples .inline p { padding: 0; margin: 0; font-weight: bold; font-size: 1em; } -.tags .examples .inline p:before { content: "â–¸"; font-size: 1em; margin-right: 5px; } - -.tags .overload .overload_item { list-style: none; margin-bottom: 25px; } -.tags .overload .overload_item .signature { - padding: 2px 8px; - background: #F1F8FF; border: 1px solid #d8d8e5; border-radius: 3px; -} -.tags .overload .signature { margin-left: -15px; font-family: monospace; display: block; font-size: 1.1em; } -.tags .overload .docstring { margin-top: 15px; } - -.defines { display: none; } - -#method_missing_details .notice.this { position: relative; top: -8px; color: #888; padding: 0; margin: 0; } - -.showSource { font-size: 0.9em; } -.showSource a, .showSource a:visited { text-decoration: none; color: #666; } - -#content a, #content a:visited { text-decoration: none; color: #05a; } -#content a:hover { background: #ffffa5; } - -ul.summary { - list-style: none; - font-family: monospace; - font-size: 1em; - line-height: 1.5em; - padding-left: 0px; -} -ul.summary a, ul.summary a:visited { - text-decoration: none; font-size: 1.1em; -} -ul.summary li { margin-bottom: 5px; } -.summary_signature { padding: 4px 8px; background: #f8f8f8; border: 1px solid #f0f0f0; border-radius: 5px; } -.summary_signature:hover { background: #CFEBFF; border-color: #A4CCDA; cursor: pointer; } -.summary_signature.deprecated { background: #ffe5e5; border-color: #e9dada; } -ul.summary.compact li { display: inline-block; margin: 0px 5px 0px 0px; line-height: 2.6em;} -ul.summary.compact .summary_signature { padding: 5px 7px; padding-right: 4px; } -#content .summary_signature:hover a, -#content .summary_signature:hover a:visited { - background: transparent; - color: #049; -} - -p.inherited a { font-family: monospace; font-size: 0.9em; } -p.inherited { word-spacing: 5px; font-size: 1.2em; } - -p.children { font-size: 1.2em; } -p.children a { font-size: 0.9em; } -p.children strong { font-size: 0.8em; } -p.children strong.modules { padding-left: 5px; } - -ul.fullTree { display: none; padding-left: 0; list-style: none; margin-left: 0; margin-bottom: 10px; } -ul.fullTree ul { margin-left: 0; padding-left: 0; list-style: none; } -ul.fullTree li { text-align: center; padding-top: 18px; padding-bottom: 12px; background: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAg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1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAHtJREFUeNqMzrEJAkEURdGzuhgZbSoYWcAWoBVsB4JgZAGmphsZCZYzTQgWNCYrDN9RvMmHx+X916SUBFbo8CzD1idXrLErw1mQttgXtyrOcQ/Ny5p4Qh+2XqLYYazsPWNTiuMkRxa4vcV+evuNAUOLIx5+c2hyzv7hNQC67Q+/HHmlEwAAAABJRU5ErkJggg==) no-repeat top center; } -ul.fullTree li:first-child { padding-top: 0; background: transparent; } -ul.fullTree li:last-child { padding-bottom: 0; } -.showAll ul.fullTree { display: block; } -.showAll .inheritName { display: none; } - -#search { position: absolute; right: 12px; top: 0px; z-index: 9000; } -#search a { - display: block; float: left; - padding: 4px 8px; text-decoration: none; color: #05a; fill: #05a; - border: 1px solid #d8d8e5; - border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; - background: #F1F8FF; - box-shadow: -1px 1px 3px #ddd; -} -#search a:hover { background: #f5faff; color: #06b; fill: #06b; } -#search a.active { - background: #568; padding-bottom: 20px; color: #fff; fill: #fff; - border: 1px solid #457; - border-top-left-radius: 5px; border-top-right-radius: 5px; -} -#search a.inactive { color: #999; fill: #999; } -.inheritanceTree, .toggleDefines { - float: right; - border-left: 1px solid #aaa; - position: absolute; top: 0; right: 0; - height: 100%; - background: #f6f6f6; - padding: 5px; - min-width: 55px; - text-align: center; -} - -#menu { font-size: 1.3em; color: #bbb; } -#menu .title, #menu a { font-size: 0.7em; } -#menu .title a { font-size: 1em; } -#menu .title { color: #555; } -#menu a, #menu a:visited { color: #333; text-decoration: none; border-bottom: 1px dotted #bbd; } -#menu a:hover { color: #05a; } - -#footer { margin-top: 15px; border-top: 1px solid #ccc; text-align: center; padding: 7px 0; color: #999; } -#footer a, #footer a:visited { color: #444; text-decoration: none; border-bottom: 1px dotted #bbd; } -#footer a:hover { color: #05a; } - -#listing ul.alpha { font-size: 1.1em; } -#listing ul.alpha { margin: 0; padding: 0; padding-bottom: 10px; list-style: none; } -#listing ul.alpha li.letter { font-size: 1.4em; padding-bottom: 10px; } -#listing ul.alpha ul { margin: 0; padding-left: 15px; } -#listing ul small { color: #666; font-size: 0.7em; } - -li.r1 { background: #f0f0f0; } -li.r2 { background: #fafafa; } - -#content ul.summary li.deprecated .summary_signature a, -#content ul.summary li.deprecated .summary_signature a:visited { text-decoration: line-through; font-style: italic; } - -#toc { - position: relative; - float: right; - overflow-x: auto; - right: -3px; - margin-left: 20px; - margin-bottom: 20px; - padding: 20px; padding-right: 30px; - max-width: 300px; - z-index: 5000; - background: #fefefe; - border: 1px solid #ddd; - box-shadow: -2px 2px 6px #bbb; -} -#toc .title { margin: 0; } -#toc ol { padding-left: 1.8em; } -#toc li { font-size: 1.1em; line-height: 1.7em; } -#toc > ol > li { font-size: 1.1em; font-weight: bold; } -#toc ol > li > ol { font-size: 0.9em; } -#toc ol ol > li > ol { padding-left: 2.3em; } -#toc ol + li { margin-top: 0.3em; } -#toc.hidden { padding: 10px; background: #fefefe; box-shadow: none; } -#toc.hidden:hover { background: #fafafa; } -#filecontents h1 + #toc.nofloat { margin-top: 0; } -@media (max-width: 560px) { - #toc { - margin-left: 0; - margin-top: 16px; - float: none; - max-width: none; - } -} - -/* syntax highlighting */ -.source_code { display: none; padding: 3px 8px; border-left: 8px solid #ddd; margin-top: 5px; } -#filecontents pre.code, .docstring pre.code, .source_code pre { font-family: monospace; } -#filecontents pre.code, .docstring pre.code { display: block; } -.source_code .lines { padding-right: 12px; color: #555; text-align: right; } -#filecontents pre.code, .docstring pre.code, -.tags pre.example { - padding: 9px 14px; - margin-top: 4px; - border: 1px solid #e1e1e8; - background: #f7f7f9; - border-radius: 4px; - font-size: 1em; - overflow-x: auto; - line-height: 1.2em; -} -pre.code { color: #000; tab-size: 2; } -pre.code .info.file { color: #555; } -pre.code .val { color: #036A07; } -pre.code .tstring_content, -pre.code .heredoc_beg, pre.code .heredoc_end, -pre.code .qwords_beg, pre.code .qwords_end, pre.code .qwords_sep, -pre.code .words_beg, pre.code .words_end, pre.code .words_sep, -pre.code .qsymbols_beg, pre.code .qsymbols_end, pre.code .qsymbols_sep, -pre.code .symbols_beg, pre.code .symbols_end, pre.code .symbols_sep, -pre.code .tstring, pre.code .dstring { color: #036A07; } -pre.code .fid, pre.code .rubyid_new, pre.code .rubyid_to_s, -pre.code .rubyid_to_sym, pre.code .rubyid_to_f, -pre.code .dot + pre.code .id, -pre.code .rubyid_to_i pre.code .rubyid_each { color: #0085FF; } -pre.code .comment { color: #0066FF; } -pre.code .const, pre.code .constant { color: #585CF6; } -pre.code .label, -pre.code .symbol { color: #C5060B; } -pre.code .kw, -pre.code .rubyid_require, -pre.code .rubyid_extend, -pre.code .rubyid_include { color: #0000FF; } -pre.code .ivar { color: #318495; } -pre.code .gvar, -pre.code .rubyid_backref, -pre.code .rubyid_nth_ref { color: #6D79DE; } -pre.code .regexp, .dregexp { color: #036A07; } -pre.code a { border-bottom: 1px dotted #bbf; } -/* inline code */ -*:not(pre) > code { - padding: 1px 3px 1px 3px; - border: 1px solid #E1E1E8; - background: #F7F7F9; - border-radius: 4px; -} - -/* Color fix for links */ -#content .summary_desc pre.code .id > .object_link a, /* identifier */ -#content .docstring pre.code .id > .object_link a { color: #0085FF; } -#content .summary_desc pre.code .const > .object_link a, /* constant */ -#content .docstring pre.code .const > .object_link a { color: #585CF6; } diff --git a/doc/file.README.html b/doc/file.README.html deleted file mode 100644 index 5c9acd8..0000000 --- a/doc/file.README.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - File: README - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
    - - -

    The strange case of Dr. Rack and Mr. Hyde

    - -

    Hyde is a library that provides a DSL for creating web applications. As of now it is using Rack as the webserver adapter, but ideally it shouldn't take much work to make it run on top of any webserver.

    - -

    Hyde was made mostly for fun. Ideally it will become something more, but as of yet it's just an experiment revolving around Ruby Metaprogramming and its DSL capabilities.

    - -

    Examples

    - -

    A simple "Hello, World!" app using Hyde

    - -
    require 'hyde'
    -
    -app = Hyde::Server.new do
    -  get "/hello" do
    -    header "content-type", "text/plain"
    -    "Hello world!"
    -  end
    -end
    -
    -run app
    -
    - -

    A push/pull stack as an app

    - -
    require 'hyde'
    -
    -stack = []
    -
    -app = Hyde::Server.new do
    -  get "/pop" do
    -    header 'content-type', 'text/plain'
    -    stack.pop.to_s
    -  end
    -  post "/push" do
    -    header 'content-type', 'text/plain'
    -    stack.push(request.body)
    -    request.body
    -  end
    -end
    -
    -run app
    -
    - -

    Several push/pull buckets

    - -
    require 'hyde'
    -
    -stack = { "1" => [], "2" => [], "3" => [] }
    -
    -app = Hyde::Server.new do
    -  path "bucket_(1|2|3)" do
    -    get "pop" do |bucket|
    -      header "content-type", "text/plain"
    -      stack[bucket].pop.to_s
    -    end
    -    post "push" do |bucket|
    -      header "content-type", "text/plain"
    -      stack[bucket].push(request.body)
    -      request.body
    -    end
    -  end
    -end
    -
    -run app
    -
    - -

    Static file serving -(Note: index applies only to /var/www (to the path its defined in))

    - -
    require 'hyde'
    -
    -app = Hyde::Server.new do
    -  root "/var/www"
    -  index ["index.html","index.htm"]
    -  serve "**/*.(html|htm)"
    -end
    -
    -run app
    -
    - -

    Logging on a particular path

    - -
    require 'hyde'
    -
    -app = Hyde::Server.new do
    -  path "unimportant" do
    -    get "version" do
    -      header "content-type", "text/plain"
    -      "1337 (the best one)"
    -    end
    -  end
    -  path "important" do
    -    preprocess do |req|
    -      # Implement logging logic here
    -      puts "Client at #{req.headers['remote-addr']} wanted to access something /important!"
    -    end
    -    get "answer" do
    -      header "content-type", "application/json"
    -      '{"answer":42, "desc":"something important!"}'
    -    end
    -  end
    -end
    -
    -run app
    -
    - -

    And a lot more to be found in /examples in this repo.

    - -

    Documentation

    - -

    Someday it's gonna be there somewhere

    - -

    License

    - -
        Hyde - an HTTP request pattern matching system 
    -    Copyright (C) 2022 yessiest (yessiest@memeware.net)
    -
    -    This program is free software: you can redistribute it and/or modify
    -    it under the terms of the GNU General Public License as published by
    -    the Free Software Foundation, either version 3 of the License, or
    -    (at your option) any later version.
    -
    -    This program is distributed in the hope that it will be useful,
    -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -    GNU General Public License for more details.
    -
    -    You should have received a copy of the GNU General Public License
    -    along with this program.  If not, see <https://www.gnu.org/licenses/>.
    -
    -
    - - - -
    - - \ No newline at end of file diff --git a/doc/file_list.html b/doc/file_list.html deleted file mode 100644 index 2b6df40..0000000 --- a/doc/file_list.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - File List - - - -
    -
    -

    File List

    - - - -
    - - -
    - - diff --git a/doc/frames.html b/doc/frames.html deleted file mode 100644 index 4f918f5..0000000 --- a/doc/frames.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Documentation by YARD 0.9.34 - - - - diff --git a/doc/index.html b/doc/index.html deleted file mode 100644 index 1a9a115..0000000 --- a/doc/index.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - File: README - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
    - - -

    The strange case of Dr. Rack and Mr. Hyde

    - -

    Hyde is a library that provides a DSL for creating web applications. As of now it is using Rack as the webserver adapter, but ideally it shouldn't take much work to make it run on top of any webserver.

    - -

    Hyde was made mostly for fun. Ideally it will become something more, but as of yet it's just an experiment revolving around Ruby Metaprogramming and its DSL capabilities.

    - -

    Examples

    - -

    A simple "Hello, World!" app using Hyde

    - -
    require 'hyde'
    -
    -app = Hyde::Server.new do
    -  get "/hello" do
    -    header "content-type", "text/plain"
    -    "Hello world!"
    -  end
    -end
    -
    -run app
    -
    - -

    A push/pull stack as an app

    - -
    require 'hyde'
    -
    -stack = []
    -
    -app = Hyde::Server.new do
    -  get "/pop" do
    -    header 'content-type', 'text/plain'
    -    stack.pop.to_s
    -  end
    -  post "/push" do
    -    header 'content-type', 'text/plain'
    -    stack.push(request.body)
    -    request.body
    -  end
    -end
    -
    -run app
    -
    - -

    Several push/pull buckets

    - -
    require 'hyde'
    -
    -stack = { "1" => [], "2" => [], "3" => [] }
    -
    -app = Hyde::Server.new do
    -  path "bucket_(1|2|3)" do
    -    get "pop" do |bucket|
    -      header "content-type", "text/plain"
    -      stack[bucket].pop.to_s
    -    end
    -    post "push" do |bucket|
    -      header "content-type", "text/plain"
    -      stack[bucket].push(request.body)
    -      request.body
    -    end
    -  end
    -end
    -
    -run app
    -
    - -

    Static file serving -(Note: index applies only to /var/www (to the path its defined in))

    - -
    require 'hyde'
    -
    -app = Hyde::Server.new do
    -  root "/var/www"
    -  index ["index.html","index.htm"]
    -  serve "**/*.(html|htm)"
    -end
    -
    -run app
    -
    - -

    Logging on a particular path

    - -
    require 'hyde'
    -
    -app = Hyde::Server.new do
    -  path "unimportant" do
    -    get "version" do
    -      header "content-type", "text/plain"
    -      "1337 (the best one)"
    -    end
    -  end
    -  path "important" do
    -    preprocess do |req|
    -      # Implement logging logic here
    -      puts "Client at #{req.headers['remote-addr']} wanted to access something /important!"
    -    end
    -    get "answer" do
    -      header "content-type", "application/json"
    -      '{"answer":42, "desc":"something important!"}'
    -    end
    -  end
    -end
    -
    -run app
    -
    - -

    And a lot more to be found in /examples in this repo.

    - -

    Documentation

    - -

    Someday it's gonna be there somewhere

    - -

    License

    - -
        Hyde - an HTTP request pattern matching system 
    -    Copyright (C) 2022 yessiest (yessiest@memeware.net)
    -
    -    This program is free software: you can redistribute it and/or modify
    -    it under the terms of the GNU General Public License as published by
    -    the Free Software Foundation, either version 3 of the License, or
    -    (at your option) any later version.
    -
    -    This program is distributed in the hope that it will be useful,
    -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -    GNU General Public License for more details.
    -
    -    You should have received a copy of the GNU General Public License
    -    along with this program.  If not, see <https://www.gnu.org/licenses/>.
    -
    -
    - - - -
    - - \ No newline at end of file diff --git a/doc/js/app.js b/doc/js/app.js deleted file mode 100644 index 8d067fe..0000000 --- a/doc/js/app.js +++ /dev/null @@ -1,314 +0,0 @@ -(function() { - -var localStorage = {}, sessionStorage = {}; -try { localStorage = window.localStorage; } catch (e) { } -try { sessionStorage = window.sessionStorage; } catch (e) { } - -function createSourceLinks() { - $('.method_details_list .source_code'). - before("[View source]"); - $('.toggleSource').toggle(function() { - $(this).parent().nextAll('.source_code').slideDown(100); - $(this).text("Hide source"); - }, - function() { - $(this).parent().nextAll('.source_code').slideUp(100); - $(this).text("View source"); - }); -} - -function createDefineLinks() { - var tHeight = 0; - $('.defines').after(" more..."); - $('.toggleDefines').toggle(function() { - tHeight = $(this).parent().prev().height(); - $(this).prev().css('display', 'inline'); - $(this).parent().prev().height($(this).parent().height()); - $(this).text("(less)"); - }, - function() { - $(this).prev().hide(); - $(this).parent().prev().height(tHeight); - $(this).text("more..."); - }); -} - -function createFullTreeLinks() { - var tHeight = 0; - $('.inheritanceTree').toggle(function() { - tHeight = $(this).parent().prev().height(); - $(this).parent().toggleClass('showAll'); - $(this).text("(hide)"); - $(this).parent().prev().height($(this).parent().height()); - }, - function() { - $(this).parent().toggleClass('showAll'); - $(this).parent().prev().height(tHeight); - $(this).text("show all"); - }); -} - -function searchFrameButtons() { - $('.full_list_link').click(function() { - toggleSearchFrame(this, $(this).attr('href')); - return false; - }); - window.addEventListener('message', function(e) { - if (e.data === 'navEscape') { - $('#nav').slideUp(100); - $('#search a').removeClass('active inactive'); - $(window).focus(); - } - }); - - $(window).resize(function() { - if ($('#search:visible').length === 0) { - $('#nav').removeAttr('style'); - $('#search a').removeClass('active inactive'); - $(window).focus(); - } - }); -} - -function toggleSearchFrame(id, link) { - var frame = $('#nav'); - $('#search a').removeClass('active').addClass('inactive'); - if (frame.attr('src') === link && frame.css('display') !== "none") { - frame.slideUp(100); - $('#search a').removeClass('active inactive'); - } - else { - $(id).addClass('active').removeClass('inactive'); - if (frame.attr('src') !== link) frame.attr('src', link); - frame.slideDown(100); - } -} - -function linkSummaries() { - $('.summary_signature').click(function() { - document.location = $(this).find('a').attr('href'); - }); -} - -function summaryToggle() { - $('.summary_toggle').click(function(e) { - e.preventDefault(); - localStorage.summaryCollapsed = $(this).text(); - $('.summary_toggle').each(function() { - $(this).text($(this).text() == "collapse" ? "expand" : "collapse"); - var next = $(this).parent().parent().nextAll('ul.summary').first(); - if (next.hasClass('compact')) { - next.toggle(); - next.nextAll('ul.summary').first().toggle(); - } - else if (next.hasClass('summary')) { - var list = $('
      '); - list.html(next.html()); - list.find('.summary_desc, .note').remove(); - list.find('a').each(function() { - $(this).html($(this).find('strong').html()); - $(this).parent().html($(this)[0].outerHTML); - }); - next.before(list); - next.toggle(); - } - }); - return false; - }); - if (localStorage.summaryCollapsed == "collapse") { - $('.summary_toggle').first().click(); - } else { localStorage.summaryCollapsed = "expand"; } -} - -function constantSummaryToggle() { - $('.constants_summary_toggle').click(function(e) { - e.preventDefault(); - localStorage.summaryCollapsed = $(this).text(); - $('.constants_summary_toggle').each(function() { - $(this).text($(this).text() == "collapse" ? "expand" : "collapse"); - var next = $(this).parent().parent().nextAll('dl.constants').first(); - if (next.hasClass('compact')) { - next.toggle(); - next.nextAll('dl.constants').first().toggle(); - } - else if (next.hasClass('constants')) { - var list = $('
      '); - list.html(next.html()); - list.find('dt').each(function() { - $(this).addClass('summary_signature'); - $(this).text( $(this).text().split('=')[0]); - if ($(this).has(".deprecated").length) { - $(this).addClass('deprecated'); - }; - }); - // Add the value of the constant as "Tooltip" to the summary object - list.find('pre.code').each(function() { - console.log($(this).parent()); - var dt_element = $(this).parent().prev(); - var tooltip = $(this).text(); - if (dt_element.hasClass("deprecated")) { - tooltip = 'Deprecated. ' + tooltip; - }; - dt_element.attr('title', tooltip); - }); - list.find('.docstring, .tags, dd').remove(); - next.before(list); - next.toggle(); - } - }); - return false; - }); - if (localStorage.summaryCollapsed == "collapse") { - $('.constants_summary_toggle').first().click(); - } else { localStorage.summaryCollapsed = "expand"; } -} - -function generateTOC() { - if ($('#filecontents').length === 0) return; - var _toc = $('
        '); - var show = false; - var toc = _toc; - var counter = 0; - var tags = ['h2', 'h3', 'h4', 'h5', 'h6']; - var i; - var curli; - if ($('#filecontents h1').length > 1) tags.unshift('h1'); - for (i = 0; i < tags.length; i++) { tags[i] = '#filecontents ' + tags[i]; } - var lastTag = parseInt(tags[0][1], 10); - $(tags.join(', ')).each(function() { - if ($(this).parents('.method_details .docstring').length != 0) return; - if (this.id == "filecontents") return; - show = true; - var thisTag = parseInt(this.tagName[1], 10); - if (this.id.length === 0) { - var proposedId = $(this).attr('toc-id'); - if (typeof(proposedId) != "undefined") this.id = proposedId; - else { - var proposedId = $(this).text().replace(/[^a-z0-9-]/ig, '_'); - if ($('#' + proposedId).length > 0) { proposedId += counter; counter++; } - this.id = proposedId; - } - } - if (thisTag > lastTag) { - for (i = 0; i < thisTag - lastTag; i++) { - if ( typeof(curli) == "undefined" ) { - curli = $('
      1. '); - toc.append(curli); - } - toc = $('
          '); - curli.append(toc); - curli = undefined; - } - } - if (thisTag < lastTag) { - for (i = 0; i < lastTag - thisTag; i++) { - toc = toc.parent(); - toc = toc.parent(); - } - } - var title = $(this).attr('toc-title'); - if (typeof(title) == "undefined") title = $(this).text(); - curli =$('
        1. ' + title + '
        2. '); - toc.append(curli); - lastTag = thisTag; - }); - if (!show) return; - html = ''; - $('#content').prepend(html); - $('#toc').append(_toc); - $('#toc .hide_toc').toggle(function() { - $('#toc .top').slideUp('fast'); - $('#toc').toggleClass('hidden'); - $('#toc .title small').toggle(); - }, function() { - $('#toc .top').slideDown('fast'); - $('#toc').toggleClass('hidden'); - $('#toc .title small').toggle(); - }); -} - -function navResizeFn(e) { - if (e.which !== 1) { - navResizeFnStop(); - return; - } - - sessionStorage.navWidth = e.pageX.toString(); - $('.nav_wrap').css('width', e.pageX); - $('.nav_wrap').css('-ms-flex', 'inherit'); -} - -function navResizeFnStop() { - $(window).unbind('mousemove', navResizeFn); - window.removeEventListener('message', navMessageFn, false); -} - -function navMessageFn(e) { - if (e.data.action === 'mousemove') navResizeFn(e.data.event); - if (e.data.action === 'mouseup') navResizeFnStop(); -} - -function navResizer() { - $('#resizer').mousedown(function(e) { - e.preventDefault(); - $(window).mousemove(navResizeFn); - window.addEventListener('message', navMessageFn, false); - }); - $(window).mouseup(navResizeFnStop); - - if (sessionStorage.navWidth) { - navResizeFn({which: 1, pageX: parseInt(sessionStorage.navWidth, 10)}); - } -} - -function navExpander() { - var done = false, timer = setTimeout(postMessage, 500); - function postMessage() { - if (done) return; - clearTimeout(timer); - var opts = { action: 'expand', path: pathId }; - document.getElementById('nav').contentWindow.postMessage(opts, '*'); - done = true; - } - - window.addEventListener('message', function(event) { - if (event.data === 'navReady') postMessage(); - return false; - }, false); -} - -function mainFocus() { - var hash = window.location.hash; - if (hash !== '' && $(hash)[0]) { - $(hash)[0].scrollIntoView(); - } - - setTimeout(function() { $('#main').focus(); }, 10); -} - -function navigationChange() { - // This works around the broken anchor navigation with the YARD template. - window.onpopstate = function() { - var hash = window.location.hash; - if (hash !== '' && $(hash)[0]) { - $(hash)[0].scrollIntoView(); - } - }; -} - -$(document).ready(function() { - navResizer(); - navExpander(); - createSourceLinks(); - createDefineLinks(); - createFullTreeLinks(); - searchFrameButtons(); - linkSummaries(); - summaryToggle(); - constantSummaryToggle(); - generateTOC(); - mainFocus(); - navigationChange(); -}); - -})(); diff --git a/doc/js/full_list.js b/doc/js/full_list.js deleted file mode 100644 index 59069c5..0000000 --- a/doc/js/full_list.js +++ /dev/null @@ -1,216 +0,0 @@ -(function() { - -var $clicked = $(null); -var searchTimeout = null; -var searchCache = []; -var caseSensitiveMatch = false; -var ignoreKeyCodeMin = 8; -var ignoreKeyCodeMax = 46; -var commandKey = 91; - -RegExp.escape = function(text) { - return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); -} - -function escapeShortcut() { - $(document).keydown(function(evt) { - if (evt.which == 27) { - window.parent.postMessage('navEscape', '*'); - } - }); -} - -function navResizer() { - $(window).mousemove(function(e) { - window.parent.postMessage({ - action: 'mousemove', event: {pageX: e.pageX, which: e.which} - }, '*'); - }).mouseup(function(e) { - window.parent.postMessage({action: 'mouseup'}, '*'); - }); - window.parent.postMessage("navReady", "*"); -} - -function clearSearchTimeout() { - clearTimeout(searchTimeout); - searchTimeout = null; -} - -function enableLinks() { - // load the target page in the parent window - $('#full_list li').on('click', function(evt) { - $('#full_list li').removeClass('clicked'); - $clicked = $(this); - $clicked.addClass('clicked'); - evt.stopPropagation(); - - if (evt.target.tagName === 'A') return true; - - var elem = $clicked.find('> .item .object_link a')[0]; - var e = evt.originalEvent; - var newEvent = new MouseEvent(evt.originalEvent.type); - newEvent.initMouseEvent(e.type, e.canBubble, e.cancelable, e.view, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget); - elem.dispatchEvent(newEvent); - evt.preventDefault(); - return false; - }); -} - -function enableToggles() { - // show/hide nested classes on toggle click - $('#full_list a.toggle').on('click', function(evt) { - evt.stopPropagation(); - evt.preventDefault(); - $(this).parent().parent().toggleClass('collapsed'); - highlight(); - }); -} - -function populateSearchCache() { - $('#full_list li .item').each(function() { - var $node = $(this); - var $link = $node.find('.object_link a'); - if ($link.length > 0) { - searchCache.push({ - node: $node, - link: $link, - name: $link.text(), - fullName: $link.attr('title').split(' ')[0] - }); - } - }); -} - -function enableSearch() { - $('#search input').keyup(function(event) { - if (ignoredKeyPress(event)) return; - if (this.value === "") { - clearSearch(); - } else { - performSearch(this.value); - } - }); - - $('#full_list').after(""); -} - -function ignoredKeyPress(event) { - if ( - (event.keyCode > ignoreKeyCodeMin && event.keyCode < ignoreKeyCodeMax) || - (event.keyCode == commandKey) - ) { - return true; - } else { - return false; - } -} - -function clearSearch() { - clearSearchTimeout(); - $('#full_list .found').removeClass('found').each(function() { - var $link = $(this).find('.object_link a'); - $link.text($link.text()); - }); - $('#full_list, #content').removeClass('insearch'); - $clicked.parents().removeClass('collapsed'); - highlight(); -} - -function performSearch(searchString) { - clearSearchTimeout(); - $('#full_list, #content').addClass('insearch'); - $('#noresults').text('').hide(); - partialSearch(searchString, 0); -} - -function partialSearch(searchString, offset) { - var lastRowClass = ''; - var i = null; - for (i = offset; i < Math.min(offset + 50, searchCache.length); i++) { - var item = searchCache[i]; - var searchName = (searchString.indexOf('::') != -1 ? item.fullName : item.name); - var matchString = buildMatchString(searchString); - var matchRegexp = new RegExp(matchString, caseSensitiveMatch ? "" : "i"); - if (searchName.match(matchRegexp) == null) { - item.node.removeClass('found'); - item.link.text(item.link.text()); - } - else { - item.node.addClass('found'); - item.node.removeClass(lastRowClass).addClass(lastRowClass == 'r1' ? 'r2' : 'r1'); - lastRowClass = item.node.hasClass('r1') ? 'r1' : 'r2'; - item.link.html(item.name.replace(matchRegexp, "$&")); - } - } - if(i == searchCache.length) { - searchDone(); - } else { - searchTimeout = setTimeout(function() { - partialSearch(searchString, i); - }, 0); - } -} - -function searchDone() { - searchTimeout = null; - highlight(); - if ($('#full_list li:visible').size() === 0) { - $('#noresults').text('No results were found.').hide().fadeIn(); - } else { - $('#noresults').text('').hide(); - } - $('#content').removeClass('insearch'); -} - -function buildMatchString(searchString, event) { - caseSensitiveMatch = searchString.match(/[A-Z]/) != null; - var regexSearchString = RegExp.escape(searchString); - if (caseSensitiveMatch) { - regexSearchString += "|" + - $.map(searchString.split(''), function(e) { return RegExp.escape(e); }). - join('.+?'); - } - return regexSearchString; -} - -function highlight() { - $('#full_list li:visible').each(function(n) { - $(this).removeClass('even odd').addClass(n % 2 == 0 ? 'odd' : 'even'); - }); -} - -/** - * Expands the tree to the target element and its immediate - * children. - */ -function expandTo(path) { - var $target = $(document.getElementById('object_' + path)); - $target.addClass('clicked'); - $target.removeClass('collapsed'); - $target.parentsUntil('#full_list', 'li').removeClass('collapsed'); - if($target[0]) { - window.scrollTo(window.scrollX, $target.offset().top - 250); - highlight(); - } -} - -function windowEvents(event) { - var msg = event.data; - if (msg.action === "expand") { - expandTo(msg.path); - } - return false; -} - -window.addEventListener("message", windowEvents, false); - -$(document).ready(function() { - escapeShortcut(); - navResizer(); - enableLinks(); - enableToggles(); - populateSearchCache(); - enableSearch(); -}); - -})(); diff --git a/doc/js/jquery.js b/doc/js/jquery.js deleted file mode 100644 index 198b3ff..0000000 --- a/doc/js/jquery.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v1.7.1 jquery.com | jquery.org/license */ -(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
    a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
    "+""+"
    ",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
    t
    ",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
    ",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; -f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

    ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
    ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
    ","
    "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() -{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
    ").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/doc/method_list.html b/doc/method_list.html deleted file mode 100644 index a95cd27..0000000 --- a/doc/method_list.html +++ /dev/null @@ -1,1275 +0,0 @@ - - - - - - - - - - - - - - - - - - Method List - - - -
    -
    -

    Method List

    - - - -
    - -
      - - -
    • -
      - #[] - Hyde::Util::Query -
      -
    • - - -
    • -
      - [] - Hyde::Util::Lookup -
      -
    • - - -
    • -
      - #[] - Hyde::Util::Lookup -
      -
    • - - -
    • -
      - #[]= - Hyde::Util::Lookup -
      -
    • - - -
    • -
      - #add_header - Hyde::Response -
      -
    • - - -
    • -
      - #binding - Hyde::TemplateContext -
      -
    • - - -
    • -
      - #body - Hyde::Request -
      -
    • - - -
    • -
      - #body - Hyde::Response -
      -
    • - - -
    • -
      - #bounce - Hyde::DSL::CommonMethods -
      -
    • - - -
    • -
      - #call - Hyde::Server -
      -
    • - - -
    • -
      - can_convert? - Hyde::PatternMatching::Glob -
      -
    • - - -
    • -
      - can_convert? - Hyde::PatternMatching::ReMatch -
      -
    • - - -
    • -
      - canonicalize - Hyde::PatternMatching -
      -
    • - - -
    • -
      - #children - Hyde::Path -
      -
    • - - -
    • -
      - chunk_body - Hyde::Response -
      -
    • - - -
    • -
      - #chunk_size - Hyde::Response -
      -
    • - - -
    • -
      - #connect - Hyde::DSL::PathConstructors -
      -
    • - - -
    • -
      - convert - Hyde::Response -
      -
    • - - -
    • -
      - #data - Hyde::Util::FormPart -
      -
    • - - -
    • -
      - #decode - Hyde::Util::FormPart -
      -
    • - - -
    • -
      - default_error_page - Hyde::Util -
      -
    • - - -
    • -
      - #delete - Hyde::DSL::PathConstructors -
      -
    • - - -
    • -
      - #delete_header - Hyde::Response -
      -
    • - - -
    • -
      - #die - Hyde::DSL::CommonMethods -
      -
    • - - -
    • -
      - #erb - Hyde::DSL::ProbeConstructors -
      -
    • - - -
    • -
      - #erubi - Hyde::DSL::ProbeConstructors -
      -
    • - - -
    • -
      - escape_html - Hyde::Util -
      -
    • - - -
    • -
      - #escape_html - Hyde::DSL::ProbeMethods -
      -
    • - - -
    • -
      - #file - Hyde::DSL::ProbeMethods -
      -
    • - - -
    • -
      - #file? - Hyde::Util::FormPart -
      -
    • - - -
    • -
      - #filename - Hyde::Util::FormPart -
      -
    • - - -
    • -
      - #filepath - Hyde::Request -
      -
    • - - -
    • -
      - #filetype - Hyde::Util::FormPart -
      -
    • - - -
    • -
      - #filter - Hyde::Path -
      -
    • - - -
    • -
      - #filter - Hyde::DSL::PathMethods -
      -
    • - - -
    • -
      - #finalize - Hyde::Response -
      -
    • - - -
    • -
      - #form - Hyde::DSL::ProbeMethods -
      -
    • - - -
    • -
      - #form? - Hyde::DSL::ProbeMethods -
      -
    • - - -
    • -
      - from_cookie_string - Hyde::Cookie -
      -
    • - - -
    • -
      - from_setcookie_string - Hyde::Cookie -
      -
    • - - -
    • -
      - #get - Hyde::DSL::PathConstructors -
      -
    • - - -
    • -
      - #go - Hyde::Node -
      -
    • - - -
    • -
      - #head - Hyde::DSL::PathConstructors -
      -
    • - - -
    • -
      - #header - Hyde::DSL::ProbeMethods -
      -
    • - - -
    • -
      - #headers - Hyde::Request -
      -
    • - - -
    • -
      - #headers - Hyde::Response -
      -
    • - - -
    • -
      - #headers= - Hyde::Util::FormPart -
      -
    • - - -
    • -
      - #import - Hyde::Template -
      -
    • - - -
    • -
      - #import - Hyde::DSL::TemplateMethods -
      -
    • - - -
    • -
      - #index - Hyde::DSL::PathMethods -
      -
    • - - -
    • -
      - #initialize - Hyde::Node -
      -
    • - - -
    • -
      - #initialize - Hyde::ProcessorContext -
      -
    • - - -
    • -
      - #initialize - Hyde::PathContext -
      -
    • - - -
    • -
      - #initialize - Hyde::Path -
      -
    • - - -
    • -
      - #initialize - Hyde::ProbeContext -
      -
    • - - -
    • -
      - #initialize - Hyde::Probe -
      -
    • - - -
    • -
      - #initialize - Hyde::Server -
      -
    • - - -
    • -
      - #initialize - Hyde::Request -
      -
    • - - -
    • -
      - #initialize - Hyde::Response -
      -
    • - - -
    • -
      - #initialize - Hyde::TemplateContext -
      -
    • - - -
    • -
      - #initialize - Hyde::Template -
      -
    • - - -
    • -
      - #initialize - Hyde::Util::Query -
      -
    • - - -
    • -
      - #initialize - Hyde::Cookie -
      -
    • - - -
    • -
      - #initialize - Hyde::Util::Lookup -
      -
    • - - -
    • -
      - #initialize - Hyde::Templates::ERB -
      -
    • - - -
    • -
      - #initialize - Hyde::Handlers::Handler -
      -
    • - - -
    • -
      - #initialize - Hyde::Templates::Erubi -
      -
    • - - -
    • -
      - #initialize - Hyde::Util::MultipartParser -
      -
    • - - -
    • -
      - #initialize - Hyde::Pattern -
      -
    • - - -
    • -
      - #initialize - Hyde::Handlers::Serve -
      -
    • - - -
    • -
      - #initialize - Hyde::PatternMatching::Glob -
      -
    • - - -
    • -
      - #initialize - Hyde::PatternMatching::ReMatch -
      -
    • - - -
    • -
      - #input - Hyde::Request -
      -
    • - - -
    • -
      - #key - Hyde::Cookie -
      -
    • - - -
    • -
      - #local_variable_get - Hyde::Template -
      -
    • - - -
    • -
      - #local_variable_set - Hyde::Template -
      -
    • - - -
    • -
      - #local_variables - Hyde::Template -
      -
    • - - -
    • -
      - make_value - Hyde::Util::ParserCommon -
      -
    • - - -
    • -
      - #match - Hyde::Pattern -
      -
    • - - -
    • -
      - #match - Hyde::PatternMatching::Glob -
      -
    • - - -
    • -
      - #match - Hyde::PatternMatching::ReMatch -
      -
    • - - -
    • -
      - #match? - Hyde::Pattern -
      -
    • - - -
    • -
      - #match? - Hyde::PatternMatching::Glob -
      -
    • - - -
    • -
      - #match? - Hyde::PatternMatching::ReMatch -
      -
    • - - -
    • -
      - #name - Hyde::Util::FormPart -
      -
    • - - -
    • -
      - #options - Hyde::DSL::PathConstructors -
      -
    • - - -
    • -
      - #override_locals - Hyde::Template -
      -
    • - - -
    • -
      - #param - Hyde::Request -
      -
    • - - -
    • -
      - #params - Hyde::Cookie -
      -
    • - - -
    • -
      - #parent - Hyde::Util::Lookup -
      -
    • - - -
    • -
      - #parse - Hyde::Util::Query -
      -
    • - - -
    • -
      - #parse - Hyde::Util::MultipartParser -
      -
    • - - -
    • -
      - #parse_shallow - Hyde::Util::Query -
      -
    • - - -
    • -
      - parse_value - Hyde::Util::ParserCommon -
      -
    • - - -
    • -
      - #patch - Hyde::DSL::PathConstructors -
      -
    • - - -
    • -
      - #path - Hyde::Request -
      -
    • - - -
    • -
      - #path - Hyde::DSL::PathConstructors -
      -
    • - - -
    • -
      - #path_info - Hyde::Request -
      -
    • - - -
    • -
      - #plugin - Hyde::DSL::PathMethods -
      -
    • - - -
    • -
      - #pop_state - Hyde::Request -
      -
    • - - -
    • -
      - #post - Hyde::DSL::PathConstructors -
      -
    • - - -
    • -
      - #postprocess - Hyde::Path -
      -
    • - - -
    • -
      - #postprocess - Hyde::DSL::PathMethods -
      -
    • - - -
    • -
      - #postprocessors - Hyde::Request -
      -
    • - - -
    • -
      - #preprocess - Hyde::Path -
      -
    • - - -
    • -
      - #preprocess - Hyde::DSL::PathMethods -
      -
    • - - -
    • -
      - #probe - Hyde::DSL::PathConstructors -
      -
    • - - -
    • -
      - #process - Hyde::Node -
      -
    • - - -
    • -
      - #process - Hyde::Path -
      -
    • - - -
    • -
      - #process - Hyde::Probe -
      -
    • - - -
    • -
      - #process - Hyde::Handlers::Handler -
      -
    • - - -
    • -
      - #process - Hyde::Handlers::GET -
      -
    • - - -
    • -
      - #process - Hyde::Handlers::Serve -
      -
    • - - -
    • -
      - #properties - Hyde::Path -
      -
    • - - -
    • -
      - #properties - Hyde::Probe -
      -
    • - - -
    • -
      - #push_state - Hyde::Request -
      -
    • - - -
    • -
      - #put - Hyde::DSL::PathConstructors -
      -
    • - - -
    • -
      - #query - Hyde::Request -
      -
    • - - -
    • -
      - #register - Hyde::DSL::PathConstructors -
      -
    • - - -
    • -
      - #reject - Hyde::Node -
      -
    • - - -
    • -
      - #remap - Hyde::Node -
      -
    • - - -
    • -
      - #remap - Hyde::DSL::PathMethods -
      -
    • - - -
    • -
      - #remove_header - Hyde::DSL::ProbeMethods -
      -
    • - - -
    • -
      - #request - Hyde::Handlers::Handler -
      -
    • - - -
    • -
      - #request - Hyde::DSL::ProbeMethods -
      -
    • - - -
    • -
      - #request_method - Hyde::Request -
      -
    • - - -
    • -
      - #response - Hyde::Handlers::Handler -
      -
    • - - -
    • -
      - #response - Hyde::Handlers::Serve -
      -
    • - - -
    • -
      - #root - Hyde::Node -
      -
    • - - -
    • -
      - #root - Hyde::DSL::PathMethods -
      -
    • - - -
    • -
      - #run - Hyde::Template -
      -
    • - - -
    • -
      - #run - Hyde::Templates::ERB -
      -
    • - - -
    • -
      - #run - Hyde::Templates::Erubi -
      -
    • - - -
    • -
      - #run_postprocessors - Hyde::Request -
      -
    • - - -
    • -
      - #script_name - Hyde::Request -
      -
    • - - -
    • -
      - #serve - Hyde::DSL::PathConstructors -
      -
    • - - -
    • -
      - #server_name - Hyde::Request -
      -
    • - - -
    • -
      - #server_port - Hyde::Request -
      -
    • - - -
    • -
      - #server_protocol - Hyde::Request -
      -
    • - - -
    • -
      - #simplify - Hyde::Util::FormPart -
      -
    • - - -
    • -
      - #splat - Hyde::Request -
      -
    • - - -
    • -
      - #static? - Hyde::Pattern -
      -
    • - - -
    • -
      - #status - Hyde::Response -
      -
    • - - -
    • -
      - #status - Hyde::DSL::ProbeMethods -
      -
    • - - -
    • -
      - #tempfile= - Hyde::Util::FormPart -
      -
    • - - -
    • -
      - #to_h - Hyde::Util::MultipartParser -
      -
    • - - -
    • -
      - #to_s - Hyde::Cookie -
      -
    • - - -
    • -
      - #to_short - Hyde::Cookie -
      -
    • - - -
    • -
      - #trace - Hyde::DSL::PathConstructors -
      -
    • - - -
    • -
      - unescape_html - Hyde::Util -
      -
    • - - -
    • -
      - #unescape_html - Hyde::DSL::ProbeMethods -
      -
    • - - -
    • -
      - #validate - Hyde::Response -
      -
    • - - -
    • -
      - #value - Hyde::Cookie -
      -
    • - - - -
    -
    - - diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html deleted file mode 100644 index 92fa839..0000000 --- a/doc/top-level-namespace.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - Top Level Namespace - - — Documentation by YARD 0.9.34 - - - - - - - - - - - - - - - - - - - -
    - - -

    Top Level Namespace - - - -

    -
    - - - - - - - - - - - -
    - -

    Defined Under Namespace

    -

    - - - Modules: Hyde - - - - -

    - - - - - - - - - -
    - - - -
    - - \ No newline at end of file diff --git a/examples/buckets.ru b/examples/buckets.ru index 39acb85..14358ab 100644 --- a/examples/buckets.ru +++ b/examples/buckets.ru @@ -1,11 +1,11 @@ # frozen_string_literal: true $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib") -require 'hyde' +require 'landline' stack = { "1" => [], "2" => [], "3" => [] } -app = Hyde::Server.new do +app = Landline::Server.new do path "bucket_(1|2|3)" do get "pop" do |bucket| header "content-type", "text/plain" diff --git a/examples/cookies/cookie.ru b/examples/cookies/cookie.ru index 228870c..26c69ef 100644 --- a/examples/cookies/cookie.ru +++ b/examples/cookies/cookie.ru @@ -1,18 +1,18 @@ # frozen_string_literal: true $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib") -require 'hyde' -require 'hyde/util/cookie' +require 'landline' +require 'landline/util/cookie' -app = Hyde::Server.new do +app = Landline::Server.new do get "/set-cookie" do - header "set-cookie", Hyde::Cookie.new("test", (rand * 500).floor.to_s).to_s + cookie "test", (rand * 500).floor.to_s header "content-type", "text/plain" "Cookie set! Visit /get-cookie to view it" end get "/get-cookie" do header "content-type", "text/plain" - request.headers["cookie"]&.pretty_inspect + request.cookies['test']&.pretty_inspect end end diff --git a/examples/extension_testing/extension.ru b/examples/extension_testing/extension.ru index d1fe5b8..88918a9 100644 --- a/examples/extension_testing/extension.ru +++ b/examples/extension_testing/extension.ru @@ -1,10 +1,10 @@ # frozen_string_literal: true $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib") -require 'hyde' +require 'landline' require_relative 'external_methods' -app = Hyde::Server.new do +app = Landline::Server.new do get "/hello" do header "content-type", "text/plain" do_hello() diff --git a/examples/extension_testing/external_methods.rb b/examples/extension_testing/external_methods.rb index 93109f7..145ca7e 100644 --- a/examples/extension_testing/external_methods.rb +++ b/examples/extension_testing/external_methods.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module Hyde +module Landline module DSL # Methods shared by probes, preprocessors and filters. module CommonMethods diff --git a/examples/extension_testing/readme.txt b/examples/extension_testing/readme.txt index ed8bfad..e1a369b 100644 --- a/examples/extension_testing/readme.txt +++ b/examples/extension_testing/readme.txt @@ -1 +1 @@ -Example of extending base Hyde functionality with additional DSL methods. +Example of extending base Landline functionality with additional DSL methods. diff --git a/examples/form/form.ru b/examples/form/form.ru index 26c57b3..6d84522 100644 --- a/examples/form/form.ru +++ b/examples/form/form.ru @@ -1,9 +1,9 @@ # frozen_string_literal: true $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib") -require 'hyde' +require 'landline' -app = Hyde::Server.new do +app = Landline::Server.new do root ENV["PWD"] index ["index.html"] post "/" do diff --git a/examples/form/readme.txt b/examples/form/readme.txt index c5e32c6..e773bf8 100644 --- a/examples/form/readme.txt +++ b/examples/form/readme.txt @@ -1 +1 @@ -Example of handling forms in Hyde +Example of handling forms in Landline diff --git a/examples/form2/form.ru b/examples/form2/form.ru index fb6f8dd..f3a9146 100644 --- a/examples/form2/form.ru +++ b/examples/form2/form.ru @@ -1,9 +1,9 @@ # frozen_string_literal: true $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib") -require 'hyde' +require 'landline' -app = Hyde::Server.new do +app = Landline::Server.new do root ENV["PWD"] index ["index.html"] post "/" do diff --git a/examples/form2/readme.txt b/examples/form2/readme.txt index c5e32c6..e773bf8 100644 --- a/examples/form2/readme.txt +++ b/examples/form2/readme.txt @@ -1 +1 @@ -Example of handling forms in Hyde +Example of handling forms in Landline diff --git a/examples/helloworld.ru b/examples/helloworld.ru index 31205e9..7b45f90 100644 --- a/examples/helloworld.ru +++ b/examples/helloworld.ru @@ -1,9 +1,9 @@ # frozen_string_literal: true $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib") -require 'hyde' +require 'landline' -app = Hyde::Server.new do +app = Landline::Server.new do get "/hello" do header "content-type", "text/plain" "Hello World!" diff --git a/examples/logging.ru b/examples/logging.ru index e853594..d00a9d3 100644 --- a/examples/logging.ru +++ b/examples/logging.ru @@ -1,9 +1,9 @@ # frozen_string_literal: true $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib") -require 'hyde' +require 'landline' -app = Hyde::Server.new do +app = Landline::Server.new do path "unimportant" do get "version" do header "content-type", "text/plain" diff --git a/examples/norxondor_gorgonax/config.ru b/examples/norxondor_gorgonax/config.ru index 67d2a3f..143eff3 100644 --- a/examples/norxondor_gorgonax/config.ru +++ b/examples/norxondor_gorgonax/config.ru @@ -1,9 +1,9 @@ # frozen_string_literal: true $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib") -require_relative 'lib/hyde' +require_relative 'lib/landline' -app = Hyde::Server.new do +app = Landline::Server.new do preprocess do |request| puts "New request: #{request}" end @@ -21,7 +21,7 @@ app = Hyde::Server.new do You tried accessing #{suffix} at named param #{test} Your request is a #{request} object - #{Hyde::VLINE} + #{Landline::VLINE} RESPONSE end get "/bounce-random" do diff --git a/examples/plugins/config.ru b/examples/plugins/config.ru index d7fa571..087d2fc 100644 --- a/examples/plugins/config.ru +++ b/examples/plugins/config.ru @@ -1,9 +1,9 @@ # frozen_string_literal: true $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib") -require 'hyde' +require 'landline' -app = Hyde::Server.new do +app = Landline::Server.new do plugin "helloworld.ru" end diff --git a/examples/plugins/helloworld.ru b/examples/plugins/helloworld.ru index 31205e9..7b45f90 100644 --- a/examples/plugins/helloworld.ru +++ b/examples/plugins/helloworld.ru @@ -1,9 +1,9 @@ # frozen_string_literal: true $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib") -require 'hyde' +require 'landline' -app = Hyde::Server.new do +app = Landline::Server.new do get "/hello" do header "content-type", "text/plain" "Hello World!" diff --git a/examples/query/config.ru b/examples/query/config.ru index 588afb6..5a40e67 100644 --- a/examples/query/config.ru +++ b/examples/query/config.ru @@ -1,9 +1,9 @@ # frozen_string_literal: true $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib") -require_relative 'lib/hyde' +require_relative 'lib/landline' -app = Hyde::Server.new do +app = Landline::Server.new do get "/hello" do name = request.query["name"] if name.is_a? String diff --git a/examples/stack.ru b/examples/stack.ru index f07af22..257f234 100644 --- a/examples/stack.ru +++ b/examples/stack.ru @@ -1,11 +1,11 @@ # frozen_string_literal: true $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib") -require 'hyde' +require 'landline' stack = [] -app = Hyde::Server.new do +app = Landline::Server.new do get "/pop" do header 'content-type', 'text/plain' stack.pop.to_s diff --git a/examples/staticfiles.ru b/examples/staticfiles.ru index 11ec180..fde2fa4 100644 --- a/examples/staticfiles.ru +++ b/examples/staticfiles.ru @@ -1,9 +1,9 @@ # frozen_string_literal: true $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib") -require 'hyde' +require 'landline' -app = Hyde::Server.new do +app = Landline::Server.new do root "/var/www" index ["index.html", "index.htm"] serve "**/*.(html|htm)" diff --git a/examples/templates/helloworld.ru b/examples/templates/helloworld.ru index ed0b6e7..f2404eb 100644 --- a/examples/templates/helloworld.ru +++ b/examples/templates/helloworld.ru @@ -1,9 +1,9 @@ # frozen_string_literal: true $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib") -require 'hyde' +require 'landline' -app = Hyde::Server.new do +app = Landline::Server.new do remap ENV["PWD"] get "/" do status 200 diff --git a/hyde.gemspec b/landline.gemspec similarity index 59% rename from hyde.gemspec rename to landline.gemspec index 8c3165b..49d686a 100644 --- a/hyde.gemspec +++ b/landline.gemspec @@ -1,17 +1,18 @@ # frozen_string_literal: true Gem::Specification.new do |spec| - spec.name = "hyde" + spec.name = "landline" spec.version = "0.9" - spec.summary = "A hideously simple web app framework" + spec.summary = "Elegant HTTP DSL" spec.description = <<~DESC - Hyde is a web framework that was made entirely for fun. + Landline is a no-hard-dependencies HTTP routing DSL that was made entirely for fun. + It runs on any HTTP server that supports the Rack 3.0 protocol. It is usable for many menial tasks, and as long as it continues to be fun, it will keep growing. DESC spec.authors = ["Yessiest"] spec.license = "AGPL-3.0" spec.email = "yessiest@text.512mb.org" - spec.homepage = "https://adastra7.net/git/Yessiest/hyde" + spec.homepage = "https://adastra7.net/git/Yessiest/landline" spec.files = Dir["lib/**/*"] spec.extra_rdoc_files = Dir["*.md"] end diff --git a/lib/hyde.rb b/lib/hyde.rb deleted file mode 100644 index 32cd9e5..0000000 --- a/lib/hyde.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -require_relative 'hyde/server' -require_relative 'hyde/path' -require_relative 'hyde/probe' -require_relative 'hyde/request' -require_relative 'hyde/response' -require_relative 'hyde/template' - -# Hyde is a hideously simple ruby web framework -module Hyde - # Hyde version - VERSION = '0.9 "Moonsong" (beta/rewrite)' - - # Hyde branding and version - VLINE = "Hyde/#{Hyde::VERSION} (Ruby/#{RUBY_VERSION}/#{RUBY_RELEASE_DATE})\n" - - # Hyde copyright - COPYRIGHT = "Copyright 2023 Yessiest" -end diff --git a/lib/hyde/dsl/constructors_path.rb b/lib/hyde/dsl/constructors_path.rb deleted file mode 100644 index 3d48418..0000000 --- a/lib/hyde/dsl/constructors_path.rb +++ /dev/null @@ -1,78 +0,0 @@ -# frozen_string_literal: true - -module Hyde - # Shared DSL methods - module DSL - # Path (and subclasses) DSL constructors - module PathConstructors - # Append a Node child object to the list of children - def register(obj) - unless obj.is_a? Hyde::Node - raise ArgumentError, "register accepts node children only" - end - - @origin.children.append(obj) - end - - # Create a new {Hyde::Path} object - def path(path, &setup) - register(Hyde::Path.new(path, parent: @origin, &setup)) - end - - # Create a new {Hyde::Handlers::Probe} object - def probe(path, &_setup) - register(Hyde::Handlers::Probe.new(path, parent: @origin)) - end - - # Create a new {Hyde::Handlers::GETHandler} object - def get(path, &setup) - register(Hyde::Handlers::GET.new(path, parent: @origin, &setup)) - end - - # create a new {Hyde::Handlers::POSTHandler} object - def post(path, &setup) - register(Hyde::Handlers::POST.new(path, parent: @origin, &setup)) - end - - # Create a new {Hyde::Handlers::PUTHandler} object - def put(path, &setup) - register(Hyde::Handlers::PUT.new(path, parent: @origin, &setup)) - end - - # Create a new {Hyde::Handlers::HEADHandler} object - def head(path, &setup) - register(Hyde::Handlers::HEAD.new(path, parent: @origin, &setup)) - end - - # Create a new {Hyde::Handlers::DELETEHandler} object - def delete(path, &setup) - register(Hyde::Handlers::DELETE.new(path, parent: @origin, &setup)) - end - - # Create a new {Hyde::Handlers::CONNECTHandler} object - def connect(path, &setup) - register(Hyde::Handlers::CONNECT.new(path, parent: @origin, &setup)) - end - - # Create a new {Hyde::Handlers::TRACEHandler} object - def trace(path, &setup) - register(Hyde::Handlers::TRACE.new(path, parent: @origin, &setup)) - end - - # Create a new {Hyde::Handlers::PATCHHandler} object - def patch(path, &setup) - register(Hyde::Handlers::PATCH.new(path, parent: @origin, &setup)) - end - - # Create a new {Hyde::Handlers::OPTIONSHandler} object - def options(path, &setup) - register(Hyde::Handlers::OPTIONS.new(path, parent: @origin, &setup)) - end - - # Create a new {Hyde::Handlers::GETHandler} that serves static files - def serve(path) - register(Hyde::Handlers::Serve.new(path, parent: @origin)) - end - end - end -end diff --git a/lib/hyde/util/cookie.rb b/lib/hyde/util/cookie.rb deleted file mode 100644 index 7f4b997..0000000 --- a/lib/hyde/util/cookie.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -require_relative 'parseutils' -require_relative 'errors' - -module Hyde - # Utility class for handling cookies - class Cookie - # @param key [String] cookie name - # @param value [String] cookie value - # @param params [Hash] cookie parameters - # @raise Hyde::ParsingError invalid cookie parameters - def initialize(key, value, params = {}) - unless key.match? Hyde::Util::HeaderRegexp::COOKIE_NAME - raise Hyde::ParsingError, "invalid cookie key: #{key}" - end - - unless value.match? Hyde::Util::HeaderRegexp::COOKIE_VALUE - raise Hyde::ParsingError, "invalid cookie value: #{value}" - end - - @key = key - @value = value - @params = params - end - - # Convert cookie to "Set-Cookie: " string representation. - # @return [String] - def to_s - Hyde::Util::ParserCommon.make_value(to_short, @params) - end - - # Convert cookie to "Cookie: " string representation (no params) - def to_short - "#{key.to_s.strip}=#{value.to_s.strip}" - end - - attr_accessor :key, :value - attr_reader :params - - # Create cookie from a "Set-Cookie: " format - # @param data [String] value part of "Set-Cookie: " header - # @return [Cookie] - def self.from_setcookie_string(data) - kvpair, params = Hyde::Util::ParserCommon.parse_value( - data, - regexp: Hyde::Util::HeaderRegexp::COOKIE_PARAM - ) - key, value = kvpair.split("=").map(&:strip) - Cookie.new(key, value, params) - end - - # Create cookie(s) from a "Cookie: " format - # @param data [String] value part of "Cookie: " header - # @return [Array(Cookie)] - def self.from_cookie_string(data) - data.split(";").map do |cookiestr| - Cookie.new(*cookiestr.split("=").map(&:strip)) - end - end - end -end diff --git a/lib/landline.rb b/lib/landline.rb new file mode 100644 index 0000000..6048e14 --- /dev/null +++ b/lib/landline.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +require_relative 'landline/server' +require_relative 'landline/path' +require_relative 'landline/probe' +require_relative 'landline/request' +require_relative 'landline/response' +require_relative 'landline/template' + +# Landline is a hideously simple ruby web framework +module Landline + # Landline version + VERSION = '0.9 "Moonsong" (beta/rewrite)' + + # Landline branding and version + VLINE = "Landline/#{Landline::VERSION} (Ruby/#{RUBY_VERSION}/#{RUBY_RELEASE_DATE})\n" + + # Landline copyright + COPYRIGHT = "Copyright 2023 Yessiest" +end diff --git a/lib/landline/dsl/constructors_path.rb b/lib/landline/dsl/constructors_path.rb new file mode 100644 index 0000000..19c9805 --- /dev/null +++ b/lib/landline/dsl/constructors_path.rb @@ -0,0 +1,78 @@ +# frozen_string_literal: true + +module Landline + # Shared DSL methods + module DSL + # Path (and subclasses) DSL constructors + module PathConstructors + # Append a Node child object to the list of children + def register(obj) + unless obj.is_a? Landline::Node + raise ArgumentError, "register accepts node children only" + end + + @origin.children.append(obj) + end + + # Create a new {Landline::Path} object + def path(path, &setup) + register(Landline::Path.new(path, parent: @origin, &setup)) + end + + # Create a new {Landline::Handlers::Probe} object + def probe(path, &_setup) + register(Landline::Handlers::Probe.new(path, parent: @origin)) + end + + # Create a new {Landline::Handlers::GETHandler} object + def get(path, &setup) + register(Landline::Handlers::GET.new(path, parent: @origin, &setup)) + end + + # create a new {Landline::Handlers::POSTHandler} object + def post(path, &setup) + register(Landline::Handlers::POST.new(path, parent: @origin, &setup)) + end + + # Create a new {Landline::Handlers::PUTHandler} object + def put(path, &setup) + register(Landline::Handlers::PUT.new(path, parent: @origin, &setup)) + end + + # Create a new {Landline::Handlers::HEADHandler} object + def head(path, &setup) + register(Landline::Handlers::HEAD.new(path, parent: @origin, &setup)) + end + + # Create a new {Landline::Handlers::DELETEHandler} object + def delete(path, &setup) + register(Landline::Handlers::DELETE.new(path, parent: @origin, &setup)) + end + + # Create a new {Landline::Handlers::CONNECTHandler} object + def connect(path, &setup) + register(Landline::Handlers::CONNECT.new(path, parent: @origin, &setup)) + end + + # Create a new {Landline::Handlers::TRACEHandler} object + def trace(path, &setup) + register(Landline::Handlers::TRACE.new(path, parent: @origin, &setup)) + end + + # Create a new {Landline::Handlers::PATCHHandler} object + def patch(path, &setup) + register(Landline::Handlers::PATCH.new(path, parent: @origin, &setup)) + end + + # Create a new {Landline::Handlers::OPTIONSHandler} object + def options(path, &setup) + register(Landline::Handlers::OPTIONS.new(path, parent: @origin, &setup)) + end + + # Create a new {Landline::Handlers::GETHandler} that serves static files + def serve(path) + register(Landline::Handlers::Serve.new(path, parent: @origin)) + end + end + end +end diff --git a/lib/hyde/dsl/constructors_probe.rb b/lib/landline/dsl/constructors_probe.rb similarity index 80% rename from lib/hyde/dsl/constructors_probe.rb rename to lib/landline/dsl/constructors_probe.rb index 7a0a669..a221aec 100644 --- a/lib/hyde/dsl/constructors_probe.rb +++ b/lib/landline/dsl/constructors_probe.rb @@ -1,23 +1,23 @@ # frozen_string_literal: true -module Hyde +module Landline module DSL # Probe (and subclasses) DSL construct module ProbeConstructors # Create a new erb template - # @see {Hyde::Template#new} + # @see {Landline::Template#new} def erb(input, vars = {}) - Hyde::Templates::ERB.new(input, + Landline::Templates::ERB.new(input, vars, parent: @origin) end # Create a new erb template using Erubi engine - # @see {Hyde::Template#new} + # @see {Landline::Template#new} # @param freeze [Boolean] whether to use frozen string literal # @param capture [Boolean] whether to enable output capturing def erubi(input, vars = {}, freeze: true, capture: false) - Hyde::Templates::Erubi.new(input, + Landline::Templates::Erubi.new(input, vars, parent: @origin, freeze: freeze, diff --git a/lib/hyde/dsl/methods_common.rb b/lib/landline/dsl/methods_common.rb similarity index 98% rename from lib/hyde/dsl/methods_common.rb rename to lib/landline/dsl/methods_common.rb index 5a45c36..63eca07 100644 --- a/lib/hyde/dsl/methods_common.rb +++ b/lib/landline/dsl/methods_common.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module Hyde +module Landline module DSL # Methods shared by probes, preprocessors and filters. module CommonMethods diff --git a/lib/hyde/dsl/methods_path.rb b/lib/landline/dsl/methods_path.rb similarity index 87% rename from lib/hyde/dsl/methods_path.rb rename to lib/landline/dsl/methods_path.rb index cd1023a..908af0e 100644 --- a/lib/hyde/dsl/methods_path.rb +++ b/lib/landline/dsl/methods_path.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module Hyde +module Landline # Shared DSL methods module DSL # Common path methods @@ -33,7 +33,7 @@ module Hyde # Add a preprocessor to the path. # Does not modify path execution. # @param block [#call] - # @yieldparam request [Hyde::Request] + # @yieldparam request [Landline::Request] def preprocess(&block) @origin.preprocess(&block) block @@ -41,8 +41,8 @@ module Hyde # Add a postprocessor to the path. # @param block [#call] - # @yieldparam request [Hyde::Request] - # @yieldparam response [Hyde::Response] + # @yieldparam request [Landline::Request] + # @yieldparam response [Landline::Response] def postprocess(&block) @origin.postprocess(&block) block @@ -51,7 +51,7 @@ module Hyde # Add a filter to the path. # Blocks path access if a filter returns false. # @param block [#call] - # @yieldparam request [Hyde::Request] + # @yieldparam request [Landline::Request] def filter(&block) @origin.filter(&block) block @@ -61,7 +61,7 @@ module Hyde # @param filename [String] def plugin(filename) self.define_singleton_method(:run) do |object| - unless object.is_a? Hyde::Node + unless object.is_a? Landline::Node raise ArgumentError, "not a node instance or subclass instance" end diff --git a/lib/hyde/dsl/methods_probe.rb b/lib/landline/dsl/methods_probe.rb similarity index 61% rename from lib/hyde/dsl/methods_probe.rb rename to lib/landline/dsl/methods_probe.rb index 965ed41..9cd4cbb 100644 --- a/lib/hyde/dsl/methods_probe.rb +++ b/lib/landline/dsl/methods_probe.rb @@ -5,12 +5,12 @@ require_relative '../util/multipart' require_relative '../util/parseutils' require_relative '../util/html' -module Hyde +module Landline module DSL # Common methods for Probe objects module ProbeMethods # Get the current request - # @return [Hyde::Request] + # @return [Landline::Request] def request @origin.request end @@ -18,7 +18,7 @@ module Hyde # Set response status (generate response if one doesn't exist yet) # @param status [Integer] http status code def status(status) - @origin.response = (@origin.response or Hyde::Response.new) + @origin.response = (@origin.response or Landline::Response.new) @origin.response.status = status end @@ -30,15 +30,15 @@ module Hyde def header(key, value) return status(value) if key.downcase == "status" - unless key.match(Hyde::Util::HeaderRegexp::TOKEN) + unless key.match(Landline::Util::HeaderRegexp::TOKEN) raise ArgumentError, "header key has invalid characters" end - unless value&.match(Hyde::Util::HeaderRegexp::PRINTABLE) + unless value&.match(Landline::Util::HeaderRegexp::PRINTABLE) raise ArgumentError, "value key has invalid characters" end - @origin.response = (@origin.response or Hyde::Response.new) + @origin.response = (@origin.response or Landline::Response.new) key = key.downcase @origin.response.add_header(key, value) end @@ -47,26 +47,45 @@ module Hyde # If no value is provided, deletes all key entries # @param key [String] header name # @param value [String, nil] header value - def remove_header(key, value = nil) + def delete_header(key, value = nil) return unless @origin.response return if key.downcase == "status" - unless key.match(Hyde::Util::HeaderRegexp::TOKEN) + unless key.match(Landline::Util::HeaderRegexp::TOKEN) raise ArgumentError, "header key has invalid characters" end - unless value&.match(Hyde::Util::HeaderRegexp::PRINTABLE) + unless value&.match(Landline::Util::HeaderRegexp::PRINTABLE) raise ArgumentError, "value key has invalid characters" end @origin.response.delete_header(key, value) end + # Set response cookie + # @see Landline::Cookie.new + def cookie(*params, **options) + @origin.response = (@origin.response or Landline::Response.new) + @origin.response.add_cookie( + Landline::Cookie.new(*params, **options) + ) + end + + # Delete a cookie + # If no value is provided, deletes all cookies with the same key + # @param key [String] cookie key + # @param value [String, nil] cookie.value + def delete_cookie(key, value = nil) + return unless @origin.response + + @origin.response.delete_cookie(key, value) + end + # Checks if current request has multipart/form-data associated with it # @return [Boolean] def form? - value, opts = Hyde::Util::ParserCommon.parse_value( + value, opts = Landline::Util::ParserCommon.parse_value( request.headers["content-type"] ) if value == "multipart/form-data" and @@ -78,12 +97,12 @@ module Hyde end # Returns formdata - # @return [Hash{String=>(String,Hyde::Util::FormPart)}] + # @return [Hash{String=>(String,Landline::Util::FormPart)}] def form - _, opts = Hyde::Util::ParserCommon.parse_value( + _, opts = Landline::Util::ParserCommon.parse_value( request.headers["content-type"] ) - Hyde::Util::MultipartParser.new( + Landline::Util::MultipartParser.new( request.input, opts["boundary"] ).to_h end @@ -95,15 +114,15 @@ module Hyde end # Escape HTML entities - # @see Hyde::Util.escape_html + # @see Landline::Util.escape_html def escape_html(text) - Hyde::Util.escape_html(text) + Landline::Util.escape_html(text) end # Unescape HTML entities - # @see Hyde::Util.escape_html + # @see Landline::Util.escape_html def unescape_html(text) - Hyde::Util.unescape_html(text) + Landline::Util.unescape_html(text) end end end diff --git a/lib/hyde/dsl/methods_template.rb b/lib/landline/dsl/methods_template.rb similarity index 94% rename from lib/hyde/dsl/methods_template.rb rename to lib/landline/dsl/methods_template.rb index 745c58b..c3b1bff 100644 --- a/lib/hyde/dsl/methods_template.rb +++ b/lib/landline/dsl/methods_template.rb @@ -3,7 +3,7 @@ require 'erb' require 'securerandom' -module Hyde +module Landline module DSL # Common methods for template contexts module TemplateMethods diff --git a/lib/hyde/node.rb b/lib/landline/node.rb similarity index 90% rename from lib/hyde/node.rb rename to lib/landline/node.rb index 1613862..12b379d 100644 --- a/lib/hyde/node.rb +++ b/lib/landline/node.rb @@ -2,7 +2,7 @@ require_relative 'pattern_matching/util' -module Hyde +module Landline # Abstract class that reacts to request navigation. # Does nothing by default, behaviour should be overriden through # #reject and #process @@ -11,7 +11,7 @@ module Hyde # @param path [Object] def initialize(path, parent:) @pattern = Pattern.new(path).freeze - @properties = Hyde::Util::Lookup.new(parent&.properties) + @properties = Landline::Util::Lookup.new(parent&.properties) @root = nil @remap = false end @@ -33,7 +33,7 @@ module Hyde end # Try to navigate the path. Run method callback in response. - # @param [Hyde::Request] + # @param [Landline::Request] # @return [Boolean] def go(request) # rejected at pattern @@ -53,14 +53,14 @@ module Hyde end # Method callback on failed request navigation - # @param _request [Hyde::Request] + # @param _request [Landline::Request] # @return false def reject(_request) false end # Method callback on successful request navigation - # @param _request [Hyde::Request] + # @param _request [Landline::Request] # @return true def process(_request) true diff --git a/lib/hyde/path.rb b/lib/landline/path.rb similarity index 83% rename from lib/hyde/path.rb rename to lib/landline/path.rb index 4557ef4..c3fd8c6 100644 --- a/lib/hyde/path.rb +++ b/lib/landline/path.rb @@ -7,10 +7,10 @@ require_relative 'dsl/methods_path' require_relative 'dsl/methods_common' require_relative 'util/lookup' -module Hyde +module Landline # Execution context for filters and preprocessors. class ProcessorContext - include Hyde::DSL::CommonMethods + include Landline::DSL::CommonMethods def initialize(path) @origin = path @@ -19,8 +19,8 @@ module Hyde # Execution context for path setup block. class PathContext - include Hyde::DSL::PathConstructors - include Hyde::DSL::PathMethods + include Landline::DSL::PathConstructors + include Landline::DSL::PathMethods def initialize(path) @origin = path @@ -28,12 +28,12 @@ module Hyde end # Primary building block of request navigation. - class Path < Hyde::Node - ProcContext = Hyde::ProcessorContext - Context = Hyde::PathContext + class Path < Landline::Node + ProcContext = Landline::ProcessorContext + Context = Landline::PathContext - # @param path [Object] Object to generate {Hyde::Pattern} from - # @param parent [Hyde::Node] Parent object to inherit properties to + # @param path [Object] Object to generate {Landline::Pattern} from + # @param parent [Landline::Node] Parent object to inherit properties to # @param setup [#call] Setup block def initialize(path, parent:, &setup) super(path, parent: parent) @@ -74,15 +74,15 @@ module Hyde # Add a preprocessor to the path. # Does not modify path execution. # @param block [#call] - # @yieldparam request [Hyde::Request] + # @yieldparam request [Landline::Request] def preprocess(&block) @preprocessors.append(block) end # Add a postprocessor to the path. # @param block [#call] - # @yieldparam request [Hyde::Request] - # @yieldparam response [Hyde::Response] + # @yieldparam request [Landline::Request] + # @yieldparam response [Landline::Response] def postprocess(&block) @postprocessors.append(block) end @@ -90,7 +90,7 @@ module Hyde # Add a filter to the path. # Blocks path access if a filter returns false. # @param block [#call] - # @yieldparam request [Hyde::Request] + # @yieldparam request [Landline::Request] def filter(&block) @filters.append(block) end @@ -100,7 +100,7 @@ module Hyde private # Sequentially run through all filters and drop request if one is false - # @param request [Hyde::Request] + # @param request [Landline::Request] # @return [Boolean] true if request passed all filters def run_filters(request) @filters.each do |filter| @@ -110,7 +110,7 @@ module Hyde end # Sequentially run all preprocessors on a request - # @param request [Hyde::Request] + # @param request [Landline::Request] def run_preprocessors(request) @preprocessors.each do |preproc| @proccontext.instance_exec(request, &preproc) @@ -118,13 +118,13 @@ module Hyde end # Append postprocessors to request - # @param request [Hyde::Request] + # @param request [Landline::Request] def enqueue_postprocessors(request) request.postprocessors.append(*@postprocessors) end # Try to perform indexing on the path if possible - # @param request [Hyde::Request] + # @param request [Landline::Request] # @return [Boolean] true if indexing succeeded def index(request) return false unless request.path.match?(/^\/?$/) diff --git a/lib/hyde/pattern_matching.rb b/lib/landline/pattern_matching.rb similarity index 88% rename from lib/hyde/pattern_matching.rb rename to lib/landline/pattern_matching.rb index 7530d29..e68f6e0 100644 --- a/lib/hyde/pattern_matching.rb +++ b/lib/landline/pattern_matching.rb @@ -4,7 +4,7 @@ require_relative 'pattern_matching/util' require_relative 'pattern_matching/glob' require_relative 'pattern_matching/rematch' -module Hyde +module Landline # Utility functions and pattern-generator classes. # Used primarily to create patterns for path definitions. module PatternMatching end @@ -34,7 +34,7 @@ module Hyde # @return [FalseClass] if input doesn't match pattern def match(input) if @pattern.is_a? String - input = Hyde::PatternMatching.canonicalize(input) + input = Landline::PatternMatching.canonicalize(input) if input.start_with?(@pattern) [input.delete_prefix(@pattern), [], {}] else @@ -51,7 +51,7 @@ module Hyde # @return [Boolean] def match?(input) if @pattern.is_a? String - Hyde::PatternMatching.canonicalize(input).start_with? @pattern + Landline::PatternMatching.canonicalize(input).start_with? @pattern else @pattern.match?(input) end @@ -60,7 +60,7 @@ module Hyde private def patternify(pattern) - classdomain = Hyde::PatternMatching + classdomain = Landline::PatternMatching classdomain.constants .filter { |x| classdomain.const_get(x).is_a? Class } .map { |x| classdomain.const_get(x) } @@ -69,7 +69,7 @@ module Hyde return pattern_generator.new(pattern) end end - Hyde::PatternMatching.canonicalize(pattern) + Landline::PatternMatching.canonicalize(pattern) end end end diff --git a/lib/hyde/pattern_matching/glob.rb b/lib/landline/pattern_matching/glob.rb similarity index 96% rename from lib/hyde/pattern_matching/glob.rb rename to lib/landline/pattern_matching/glob.rb index 2c8a0fe..b511b11 100644 --- a/lib/hyde/pattern_matching/glob.rb +++ b/lib/landline/pattern_matching/glob.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module Hyde +module Landline module PatternMatching # someday i've heard this quote: # "if you love regexp so much why don't you marry the damn thing?" @@ -54,7 +54,7 @@ module Hyde class Glob # @param input [String] Glob pattern def initialize(pattern) - pattern = Hyde::PatternMatching.canonicalize(pattern) + pattern = Landline::PatternMatching.canonicalize(pattern) pieces = pattern.split(TOKENS) # @type [Array] @index = build_index(pieces) @@ -72,7 +72,7 @@ module Hyde # @return [Array(String,Array,Hash)] # @return [FalseClass] if input doesn't match glob def match(input) - input = Hyde::PatternMatching.canonicalize(input) + input = Landline::PatternMatching.canonicalize(input) result = input.match(@glob) return false unless result @@ -86,7 +86,7 @@ module Hyde # @param input [String] String to match # @return [Boolean] def match?(input) - input = Hyde::PatternMatching.canonicalize(input) + input = Landline::PatternMatching.canonicalize(input) input.match? @glob end diff --git a/lib/hyde/pattern_matching/rematch.rb b/lib/landline/pattern_matching/rematch.rb similarity index 84% rename from lib/hyde/pattern_matching/rematch.rb rename to lib/landline/pattern_matching/rematch.rb index 0830068..b1200f7 100644 --- a/lib/hyde/pattern_matching/rematch.rb +++ b/lib/landline/pattern_matching/rematch.rb @@ -1,11 +1,11 @@ # frozen_string_literal: true -module Hyde +module Landline module PatternMatching # Regexp pattern matching wrapper. # Following principles apply to the wrapper: # - # - Regexp input is canonicalized using Hyde::PatternMatching.canonicalize + # - Regexp input is canonicalized using Landline::PatternMatching.canonicalize # - Matched content and anything before it is consumed in #match output # # @note If you are planning to write your own pattern, this is the easiest one to read. @@ -24,7 +24,7 @@ module Hyde # @return [Array(String,Array,Hash)] # @return [FalseClass] if input doesn't match regexp def match(input) - result = Hyde::PatternMatching.canonicalize(input).match(@glob) + result = Landline::PatternMatching.canonicalize(input).match(@glob) return false unless result [result.post_match, result.captures, result.named_captures] @@ -35,7 +35,7 @@ module Hyde # @param input [String] String to match # @return [Boolean] def match?(input) - Hyde::PatternMatching.canonicalize(input).match? @glob + Landline::PatternMatching.canonicalize(input).match? @glob end # Test if input is convertible and if it should be converted. diff --git a/lib/hyde/pattern_matching/util.rb b/lib/landline/pattern_matching/util.rb similarity index 95% rename from lib/hyde/pattern_matching/util.rb rename to lib/landline/pattern_matching/util.rb index 670471e..7e536cf 100644 --- a/lib/hyde/pattern_matching/util.rb +++ b/lib/landline/pattern_matching/util.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module Hyde +module Landline module PatternMatching # Strips extra slashes from a string. # (including slashes at the start and end of the string) diff --git a/lib/hyde/probe.rb b/lib/landline/probe.rb similarity index 55% rename from lib/hyde/probe.rb rename to lib/landline/probe.rb index 2a851ad..80d483e 100644 --- a/lib/hyde/probe.rb +++ b/lib/landline/probe.rb @@ -7,27 +7,27 @@ require_relative 'dsl/methods_common' require_relative 'dsl/constructors_probe' require 'pp' -module Hyde - # All subclasses of Hyde::Probe that respond to requests +module Landline + # All subclasses of Landline::Probe that respond to requests module Handlers - autoload :Handler, "hyde/probe/handler" - autoload :GET, "hyde/probe/http_method" - autoload :POST, "hyde/probe/http_method" - autoload :HEAD, "hyde/probe/http_method" - autoload :PUT, "hyde/probe/http_method" - autoload :DELETE, "hyde/probe/http_method" - autoload :CONNECT, "hyde/probe/http_method" - autoload :OPTIONS, "hyde/probe/http_method" - autoload :TRACE, "hyde/probe/http_method" - autoload :PATCH, "hyde/probe/http_method" - autoload :Serve, "hyde/probe/serve_handler" + autoload :Handler, "landline/probe/handler" + autoload :GET, "landline/probe/http_method" + autoload :POST, "landline/probe/http_method" + autoload :HEAD, "landline/probe/http_method" + autoload :PUT, "landline/probe/http_method" + autoload :DELETE, "landline/probe/http_method" + autoload :CONNECT, "landline/probe/http_method" + autoload :OPTIONS, "landline/probe/http_method" + autoload :TRACE, "landline/probe/http_method" + autoload :PATCH, "landline/probe/http_method" + autoload :Serve, "landline/probe/serve_handler" end # Context that provides execution context for Probes. class ProbeContext - include Hyde::DSL::ProbeConstructors - include Hyde::DSL::ProbeMethods - include Hyde::DSL::CommonMethods + include Landline::DSL::ProbeConstructors + include Landline::DSL::ProbeMethods + include Landline::DSL::CommonMethods def initialize(origin) @origin = origin @@ -35,9 +35,9 @@ module Hyde end # Test probe. Also base for all "reactive" nodes. - class Probe < Hyde::Node + class Probe < Landline::Node # @param path [Object] - # @param parent [Hyde::Node] + # @param parent [Landline::Node] def initialize(path, parent:) super(path, parent: parent) end @@ -47,7 +47,7 @@ module Hyde # Method callback on successful request navigation. # Throws an error upon reaching the path. # This behaviour should only be used internally. - # @param request [Hyde::Request] + # @param request [Landline::Request] # @return [Boolean] true if further navigation is possible # @raise [StandardError] def process(request) diff --git a/lib/hyde/probe/handler.rb b/lib/landline/probe/handler.rb similarity index 87% rename from lib/hyde/probe/handler.rb rename to lib/landline/probe/handler.rb index 8a8e19f..139e9b9 100644 --- a/lib/hyde/probe/handler.rb +++ b/lib/landline/probe/handler.rb @@ -2,17 +2,17 @@ require_relative "../probe" -module Hyde +module Landline module Handlers # Probe that executes a callback on request - class Handler < Hyde::Probe + class Handler < Landline::Probe # @param path [Object] - # @param parent [Hyde::Node] + # @param parent [Landline::Node] # @param exec [#call] def initialize(path, parent:, &exec) super(path, parent: parent) @callback = exec - @context = Hyde::ProbeContext.new(self) + @context = Landline::ProbeContext.new(self) @response = nil end @@ -25,12 +25,12 @@ module Hyde # # Callback's returned should be one of viable responses: # - # - {Hyde::Response} object + # - {Landline::Response} object # - An array that matches Rack return form # - An array that matches old (Rack 2.x) return form # - A string (returned as HTML with code 200) # - false (bounces the request to next handler) - # @param request [Hyde::Request] + # @param request [Landline::Request] # @return [Boolean] true if further navigation is possible # @raise [UncaughtThrowError] may raise if die() is called. def process(request) diff --git a/lib/hyde/probe/http_method.rb b/lib/landline/probe/http_method.rb similarity index 92% rename from lib/hyde/probe/http_method.rb rename to lib/landline/probe/http_method.rb index f8bc439..797d965 100644 --- a/lib/hyde/probe/http_method.rb +++ b/lib/landline/probe/http_method.rb @@ -2,10 +2,10 @@ require_relative "../probe" -module Hyde +module Landline module Handlers # Probe that executes callback on a GET - class GET < Hyde::Handlers::Handler + class GET < Landline::Handlers::Handler METHOD = "GET" # Method callback on successful request navigation. @@ -14,12 +14,12 @@ module Hyde # # Callback's returned should be one of viable responses: # - # - {Hyde::Response} object + # - {Landline::Response} object # - An array that matches Rack return form # - An array that matches old (Rack 2.x) return form # - A string (returned as HTML with code 200) # - false (bounces the request to next handler) - # @param request [Hyde::Request] + # @param request [Landline::Request] # @return [Boolean] true if further navigation is possible # @raise [UncaughtThrowError] may raise if die() is called. def process(request) diff --git a/lib/hyde/probe/serve_handler.rb b/lib/landline/probe/serve_handler.rb similarity index 84% rename from lib/hyde/probe/serve_handler.rb rename to lib/landline/probe/serve_handler.rb index 69911fd..f17a3aa 100644 --- a/lib/hyde/probe/serve_handler.rb +++ b/lib/landline/probe/serve_handler.rb @@ -2,12 +2,12 @@ require_relative "../probe" -module Hyde +module Landline module Handlers # Probe that sends files from a location - class Serve < Hyde::Probe + class Serve < Landline::Probe # @param path [Object] - # @param parent [Hyde::Node] + # @param parent [Landline::Node] # @param exec [#call] def initialize(path, parent:) super(path, parent: parent) @@ -17,7 +17,7 @@ module Hyde # Method callback on successful request navigation. # Tries to serve files matched by handler - # @param request [Hyde::Request] + # @param request [Landline::Request] # @return [Boolean] true if file was found def process(request) path = File.expand_path(request.filepath) diff --git a/lib/hyde/request.rb b/lib/landline/request.rb similarity index 93% rename from lib/hyde/request.rb rename to lib/landline/request.rb index 27e0b85..54274cf 100644 --- a/lib/hyde/request.rb +++ b/lib/landline/request.rb @@ -2,8 +2,9 @@ require 'uri' require_relative 'util/query' +require_relative 'util/cookie' -module Hyde +module Landline # Request wrapper for Rack protocol class Request # @param env [Array] @@ -12,8 +13,10 @@ module Hyde @_original_env = env # Rack environment variable bindings. Should be public and frozen. init_request_params(env) + # Cookie hash + @cookies = Landline::Cookie.from_cookie_string(@headers['cookie']) # Query parsing - @query = Hyde::Util::Query.new(@query_string) + @query = Landline::Util::Query.new(@query_string) # Pattern matching parameters. Public, readable, unfrozen. @param = {} @splat = [] @@ -30,7 +33,7 @@ module Hyde end # Run postprocessors - # @param response [Hyde::Response] + # @param response [Landline::Response] def run_postprocessors(response) @postprocessors.each do |postproc| postproc.call(self, response) @@ -61,7 +64,7 @@ module Hyde attr_reader :request_method, :script_name, :path_info, :server_name, :server_port, :server_protocol, :headers, :param, :splat, - :postprocessors, :query + :postprocessors, :query, :cookies attr_accessor :path, :filepath private diff --git a/lib/hyde/response.rb b/lib/landline/response.rb similarity index 72% rename from lib/hyde/response.rb rename to lib/landline/response.rb index eca6860..f1718b4 100644 --- a/lib/hyde/response.rb +++ b/lib/landline/response.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module Hyde +module Landline # Rack protocol response wrapper. class Response @chunk_size = 1024 @@ -9,12 +9,13 @@ module Hyde # @param response [Array(Integer, Hash, Array), nil] def initialize(response = nil) + @cookies = {} if response @status = response[0] @headers = response[1] @body = response[2] else - @status = 404 + @status = 200 @headers = {} @body = [] end @@ -23,11 +24,16 @@ module Hyde # Return internal representation of Rack response # @return [Array(Integer,Hash,Array)] def finalize + @cookies.each do |_, cookie_array| + cookie_array.each do |cookie| + add_header("set-cookie", cookie.to_s) + end + end [@status, @headers, @body] end # Make internal representation conformant - # @return [Hyde::Response] + # @return [Landline::Response] def validate if [204, 304].include?(@status) or (100..199).include?(@status) @headers.delete "content-length" @@ -43,6 +49,28 @@ module Hyde self end + # Add a cookie to the response + # @param cookie [Landline::Cookie] + def add_cookie(cookie) + if @cookies[cookie.key] + @cookies[cookie.key].append(cookie) + else + @cookies[cookie.key] = [cookie] + end + end + + # Delete a cookie + # If no value is provided, deletes all cookies with the same key + # @param key [String] cookie key + # @param value [String, nil] cookie value + def delete_cookie(key, value) + if value + @cookies[key].delete(value) + else + @cookies.delete(key) + end + end + # Add a header to the headers hash # @param key [String] header name # @param value [String] header value @@ -61,17 +89,17 @@ module Hyde # @param key [String] header name # @param value [String, nil] header value def delete_header(key, value = nil) - if value and @response[key] - @response[key].delete(value) + if value and @headers[key].is_a? Array + @headers[key].delete(value) else - @response.delete(key) + @headers.delete(key) end end attr_accessor :status, :headers, :body # Ensure response correctness - # @param obj [String, Array, Hyde::Response] + # @param obj [String, Array, Landline::Response] # @return Response def self.convert(obj) case obj diff --git a/lib/hyde/server.rb b/lib/landline/server.rb similarity index 80% rename from lib/hyde/server.rb rename to lib/landline/server.rb index 84d005a..483645a 100644 --- a/lib/hyde/server.rb +++ b/lib/landline/server.rb @@ -4,15 +4,15 @@ require_relative 'path' require_relative 'request' require_relative 'util/html' -module Hyde - class ServerContext < Hyde::PathContext +module Landline + class ServerContext < Landline::PathContext end # A specialized path that can be used directly as a Rack application. - class Server < Hyde::Path + class Server < Landline::Path Context = ServerContext - # @param parent [Hyde::Node, nil] Parent object to inherit properties to + # @param parent [Landline::Node, nil] Parent object to inherit properties to # @param setup [#call] Setup block def initialize(parent: nil, &setup) super("", parent: parent, &setup) @@ -21,7 +21,7 @@ module Hyde { "index" => [], "handle.default" => proc do |code, backtrace: nil| - page = Hyde::Util.default_error_page(code, backtrace) + page = Landline::Util.default_error_page(code, backtrace) headers = { "content-length": page.bytesize, "content-type": "text/html" @@ -38,7 +38,7 @@ module Hyde # @param env [Hash] # @return [Array(Integer,Hash,Array)] def call(env) - request = Hyde::Request.new(env) + request = Landline::Request.new(env) response = catch(:finish) do go(request) end diff --git a/lib/hyde/template.rb b/lib/landline/template.rb similarity index 86% rename from lib/hyde/template.rb rename to lib/landline/template.rb index 67ecb27..9cfb5ee 100644 --- a/lib/hyde/template.rb +++ b/lib/landline/template.rb @@ -5,19 +5,19 @@ require_relative 'dsl/methods_common' require_relative 'dsl/methods_probe' require_relative 'dsl/methods_template' -module Hyde +module Landline # All template engine adapters subclassed from Template module Templates - autoload :ERB, "hyde/template/erb" - autoload :Erubi, "hyde/template/erubi" + autoload :ERB, "landline/template/erb" + autoload :Erubi, "landline/template/erubi" end # Context for template engines class TemplateContext - include Hyde::DSL::ProbeConstructors - include Hyde::DSL::ProbeMethods - include Hyde::DSL::CommonMethods - include Hyde::DSL::TemplateMethods + include Landline::DSL::ProbeConstructors + include Landline::DSL::ProbeMethods + include Landline::DSL::CommonMethods + include Landline::DSL::TemplateMethods # @return [Binding] def binding @@ -35,7 +35,7 @@ module Hyde class Template # @param input [String, File] template text # @param vars [Hash] local variables for tempalte - # @param parent [Hyde::Node] parent node + # @param parent [Landline::Node] parent node def initialize(input, vars = {}, parent:) @template = input.is_a?(File) ? input.read : input @context = TemplateContext.new(parent, self) diff --git a/lib/hyde/template/erb.rb b/lib/landline/template/erb.rb similarity index 87% rename from lib/hyde/template/erb.rb rename to lib/landline/template/erb.rb index eceeadd..1756f77 100644 --- a/lib/hyde/template/erb.rb +++ b/lib/landline/template/erb.rb @@ -3,11 +3,11 @@ require 'erb' require_relative '../template' -module Hyde +module Landline module Templates # ERB Template language adapter - class ERB < Hyde::Template - # @see {Hyde::Template#new} + class ERB < Landline::Template + # @see {Landline::Template#new} def initialize(input, vars = nil, parent:) super varname = "_part_#{SecureRandom.hex(10)}".to_sym diff --git a/lib/hyde/template/erubi.rb b/lib/landline/template/erubi.rb similarity index 90% rename from lib/hyde/template/erubi.rb rename to lib/landline/template/erubi.rb index b4e5459..00e5bc0 100644 --- a/lib/hyde/template/erubi.rb +++ b/lib/landline/template/erubi.rb @@ -3,11 +3,11 @@ require 'erubi' require_relative '../template' -module Hyde +module Landline module Templates # Erubi (ERB) template language adapter - class Erubi < Hyde::Template - # @see {Hyde::Template#new} + class Erubi < Landline::Template + # @see {Landline::Template#new} def initialize(input, vars = nil, parent:, diff --git a/lib/landline/util/cookie.rb b/lib/landline/util/cookie.rb new file mode 100644 index 0000000..7d9a3d5 --- /dev/null +++ b/lib/landline/util/cookie.rb @@ -0,0 +1,112 @@ +# frozen_string_literal: true + +require_relative 'parseutils' +require_relative 'errors' +require 'date' +HeaderRegexp = Landline::Util::HeaderRegexp +ParserCommon = Landline::Util::ParserCommon + +module Landline + # Utility class for handling cookies + class Cookie + # @param key [String] cookie name + # @param value [String] cookie value + # @param params [Hash] cookie parameters + # @option params [String] "domain" + # @option params [String] "path" + # @option params [boolean, nil] "secure" (false) + # @option params [boolean, nil] "httponly" (false) + # @option params [String] "samesite" + # @option params [String, Integer] "max-age" + # @option params [String, Date] "expires" + # @raise Landline::ParsingError invalid cookie parameters + def initialize(key, value, params = {}) + unless key.match? HeaderRegexp::COOKIE_NAME + raise Landline::ParsingError, "invalid cookie key: #{key}" + end + + unless value.match? HeaderRegexp::COOKIE_VALUE + raise Landline::ParsingError, "invalid cookie value: #{value}" + end + + # Primary cookie parameters + @key = key + @value = value + setup_params(params) + end + + # Convert cookie to "Set-Cookie: " string representation. + # @return [String] + def to_s + ParserCommon.make_value( + "#{key.to_s.strip}=#{value.to_s.strip}", + { + "Domain" => @domain, + "Path" => @path, + "Expires" => @expires, + "Max-Age" => @maxage, + "SameSite" => @samesite, + "Secure" => @secure, + "HttpOnly" => @httponly + } + ) + end + + # Convert cookie to "Cookie: " string representation (no params) + # @return [String] + def to_short + "#{key.to_s.strip}=#{value.to_s.strip}" + end + + attr_accessor :key, :value + attr_reader :domain, :path, :expires, :maxage, :samesite, :secure, :httponly + + # Create cookie from a "Set-Cookie: " format + # @param data [String] value part of "Set-Cookie: " header + # @return [Cookie] + def self.from_setcookie_string(data) + kvpair, params = parse_value(data, regexp: HeaderRegexp::COOKIE_PARAM) + key, value = kvpair.split("=").map(&:strip) + Cookie.new(key, value, params) + end + + # Create cookie(s) from a "Cookie: " format + # @param data [String] value part of "Cookie: " header + # @return [Hash{String => Cookie}] + def self.from_cookie_string(data) + hash = {} + data.split(";").map do |cookiestr| + cookie = Cookie.new(*cookiestr.split("=").map(&:strip)) + if hash[cookie.key] + hash[cookie.key].append(cookie) + else + hash[cookie.key] = [cookie] + end + end + hash + end + + private + + def setup_params(params) + # Extended cookie params + params.transform_keys!(&:downcase) + convert_date(params) + @domain = params['domain']&.remove_prefix(".") + @path = params['path'] + @secure = !params['secure'].nil? + @httponly = !params['httponly'].nil? + @samesite = params['samesite'] or "None" + end + + def convert_date(params) + maxage = params['max-age'] + expires = params['expires'] + @maxage = maxage.to_i if maxage&.match?(/\A\d+\z/) + @expires = case expires + when Date then date.ctime(HeaderRegexp::RFC1123_DATE) + when String then expires if Date.httpdate(expires) + end + end + end +end diff --git a/lib/hyde/util/errors.rb b/lib/landline/util/errors.rb similarity index 69% rename from lib/hyde/util/errors.rb rename to lib/landline/util/errors.rb index fa6dc97..2c9f3af 100644 --- a/lib/hyde/util/errors.rb +++ b/lib/landline/util/errors.rb @@ -1,11 +1,11 @@ # frozen_string_literal: true -module Hyde +module Landline # Generic error class, as recommended by Ruby documentation. class Error < ::StandardError end - # Error class raised by hyde/util/parseutils module. + # Error class raised by landline/util/parseutils module. class ParsingError < Error end end diff --git a/lib/hyde/util/html.rb b/lib/landline/util/html.rb similarity index 94% rename from lib/hyde/util/html.rb rename to lib/landline/util/html.rb index 6a4d7d3..f822173 100644 --- a/lib/hyde/util/html.rb +++ b/lib/landline/util/html.rb @@ -2,7 +2,7 @@ require 'cgi/escape' -module Hyde +module Landline module Util # HTTP status codes and descriptions # Taken from WEBrick {https://github.com/ruby/webrick/blob/master/lib/webrick/httpstatus.rb} @@ -82,7 +82,7 @@ module Hyde # rubocop:disable Metrics/MethodLength - # Default error page for Hyde + # Default error page for Landline # @param code [Integer] HTTP Status code # @param backtrace [Array(String), nil] Message to show in backtrace window # @return [String] @@ -99,8 +99,8 @@ module Hyde
    -

    HYDE

    -

    Source code

    +

    Landline

    +

    Source code

    #{Util.escape_html(errortext)}

    @@ -108,7 +108,7 @@ module Hyde #{backtrace.map(&Util.method(:escape_html)).join('
    ')}
    -

    #{Util.escape_html(Hyde::VLINE)}

    +

    #{Util.escape_html(Landline::VLINE)}

    diff --git a/lib/hyde/util/lookup.rb b/lib/landline/util/lookup.rb similarity index 98% rename from lib/hyde/util/lookup.rb rename to lib/landline/util/lookup.rb index 431ad76..fb462a2 100644 --- a/lib/hyde/util/lookup.rb +++ b/lib/landline/util/lookup.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module Hyde +module Landline # Various things that exists for purely logical reasons module Util # Value container with recursive lookup diff --git a/lib/hyde/util/multipart.rb b/lib/landline/util/multipart.rb similarity index 96% rename from lib/hyde/util/multipart.rb rename to lib/landline/util/multipart.rb index 9dab275..8c173a2 100644 --- a/lib/hyde/util/multipart.rb +++ b/lib/landline/util/multipart.rb @@ -7,7 +7,7 @@ require_relative 'parseutils' require_relative 'parsesorting' require_relative 'html' -module Hyde +module Landline module Util # Valid element of form data with headers # @!attribute headers [Hash] headers recevied from form data @@ -26,7 +26,7 @@ module Hyde # Decode charset parameter def decode(data) - data = Hyde::Util.unescape_html(data) + data = Landline::Util.unescape_html(data) return data unless self.headers['charset'] data.force_encoding(self.headers['charset']).encode("UTF-8") @@ -41,7 +41,7 @@ module Hyde # A very naive implementation of a Multipart form parser. class MultipartParser - include Hyde::Util::ParserSorting + include Landline::Util::ParserSorting def initialize(io, boundary) @input = io.is_a?(String) ? StringIO.new(io) : io @boundary = boundary @@ -168,7 +168,7 @@ module Hyde return unless line.match(/^[\w!#$%&'*+-.^_`|~]+:.*\r\n$/) k, v = line.match(/^([\w!#$%&'*+-.^_`|~]+):(.*)\r\n$/).to_a[1..] - headers_hash[k.downcase] = Hyde::Util::ParserCommon.parse_value(v) + headers_hash[k.downcase] = Landline::Util::ParserCommon.parse_value(v) end end end diff --git a/lib/hyde/util/parsesorting.rb b/lib/landline/util/parsesorting.rb similarity index 98% rename from lib/hyde/util/parsesorting.rb rename to lib/landline/util/parsesorting.rb index 4746639..c9fc721 100644 --- a/lib/hyde/util/parsesorting.rb +++ b/lib/landline/util/parsesorting.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module Hyde +module Landline module Util # Internal library for generating form hashes module ParserSorting diff --git a/lib/hyde/util/parseutils.rb b/lib/landline/util/parseutils.rb similarity index 86% rename from lib/hyde/util/parseutils.rb rename to lib/landline/util/parseutils.rb index 6f56b94..86eebe8 100644 --- a/lib/hyde/util/parseutils.rb +++ b/lib/landline/util/parseutils.rb @@ -1,10 +1,9 @@ # frozen_string_literal: true require 'uri' -require 'date' require_relative 'errors' -module Hyde +module Landline module Util # (not exactly precise) Regular expressions for some RFC definitions module HeaderRegexp @@ -76,38 +75,37 @@ module Hyde # @param input [String] # @param opts [Hash] # @return [String] - # @raise [Hyde::ParsingError] + # @raise [Landline::ParsingError] def self.make_value(input, opts, sep = ";") output = input unless input.match? HeaderRegexp::PRINTABLE - raise Hyde::ParsingError, "input is not ascii printable" + raise Landline::ParsingError, "input is not ascii printable" end - + opts.each do |key, value| check_param(key, value) - newparam = if value.is_a? String + newparam = if [String, Integer].include? value.class "#{sep} #{key}=#{value}" - else + elsif value "#{sep} #{key}" end - output += newparam + output += newparam if newparam end output end - private - # Checks if key and value are valid for constructing a parameter. # Raises an error if that is not possible. - def check_param(key, value) + def self.check_param(key, value) unless key.match? HeaderRegexp::TOKEN - raise Hyde::ParsingError, "param key #{key} is not an RFC2616 token" + raise Landline::ParsingError, "key #{key} is not an RFC2616 token" end - unless value.nil? or value.match? HeaderRegexp::PARAM_QUOTED - raise Hyde::ParsingError, "quoted param value #{value} is invalid" + if value.is_a?(String) and value.match? HeaderRegexp::PARAM_QUOTED + raise Landline::ParsingError, "quoted param value #{value} is invalid" end end + private_class_method :check_param end end end diff --git a/lib/hyde/util/query.rb b/lib/landline/util/query.rb similarity index 96% rename from lib/hyde/util/query.rb rename to lib/landline/util/query.rb index 85340b0..190be05 100644 --- a/lib/hyde/util/query.rb +++ b/lib/landline/util/query.rb @@ -3,11 +3,11 @@ require 'uri' require_relative 'parsesorting' -module Hyde +module Landline module Util # Query string parser class Query - include Hyde::Util::ParserSorting + include Landline::Util::ParserSorting # @param query [String] def initialize(query) @query = query diff --git a/test/Hyde_Pattern.rb b/test/Landline_Pattern.rb similarity index 87% rename from test/Hyde_Pattern.rb rename to test/Landline_Pattern.rb index 298eb5e..65784d5 100644 --- a/test/Hyde_Pattern.rb +++ b/test/Landline_Pattern.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true -require_relative "../lib/hyde/pattern_matching" +require_relative "../lib/landline/pattern_matching" require "test/unit" class TestPattern < Test::Unit::TestCase - include Hyde + include Landline # match? test def test_matchq assert_equal(true, Pattern.new("/static/path").freeze.static?) diff --git a/test/Hyde_PatternMatching_Glob.rb b/test/Landline_PatternMatching_Glob.rb similarity index 98% rename from test/Hyde_PatternMatching_Glob.rb rename to test/Landline_PatternMatching_Glob.rb index 49f105c..ab06646 100644 --- a/test/Hyde_PatternMatching_Glob.rb +++ b/test/Landline_PatternMatching_Glob.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true -require_relative "../lib/hyde/pattern_matching" +require_relative "../lib/landline/pattern_matching" require "test/unit" class TestGlob < Test::Unit::TestCase - include Hyde::PatternMatching + include Landline::PatternMatching # match? test def test_matchq puts "Test group: *" diff --git a/test/Hyde_PatternMatching_ReMatch.rb b/test/Landline_PatternMatching_ReMatch.rb similarity index 88% rename from test/Hyde_PatternMatching_ReMatch.rb rename to test/Landline_PatternMatching_ReMatch.rb index 61c125a..54ef3a3 100644 --- a/test/Hyde_PatternMatching_ReMatch.rb +++ b/test/Landline_PatternMatching_ReMatch.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true -require_relative "../lib/hyde/pattern_matching" +require_relative "../lib/landline/pattern_matching" require "test/unit" class TestReMatch < Test::Unit::TestCase - include Hyde::PatternMatching + include Landline::PatternMatching # match? test def test_matchq a = ReMatch.new(/^test\/path_[^\/]+/) diff --git a/test/Hyde_Util_Lookup.rb b/test/Landline_Util_Lookup.rb similarity index 89% rename from test/Hyde_Util_Lookup.rb rename to test/Landline_Util_Lookup.rb index d85ca01..38aebe9 100644 --- a/test/Hyde_Util_Lookup.rb +++ b/test/Landline_Util_Lookup.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true -require_relative "../lib/hyde/util/lookup" +require_relative "../lib/landline/util/lookup" require "test/unit" class TestLookup < Test::Unit::TestCase - include Hyde::Util + include Landline::Util def test_lookup assert_equal(true, Lookup.new().is_a?(Lookup)) assert_equal(true, Lookup.new(Lookup.new()).is_a?(Lookup)) diff --git a/test/Hyde_Util_Query.rb b/test/Landline_Util_Query.rb similarity index 87% rename from test/Hyde_Util_Query.rb rename to test/Landline_Util_Query.rb index eb9472c..f8f24a0 100644 --- a/test/Hyde_Util_Query.rb +++ b/test/Landline_Util_Query.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true -require_relative "../lib/hyde/util/query" +require_relative "../lib/landline/util/query" require "test/unit" class TestQuery < Test::Unit::TestCase - include Hyde::Util + include Landline::Util def test_query test1 = Query.new("key1=1&key2=2&key3[]=1&key3[]=2&key3[]=3") assert_equal({"key1"=>"1","key2"=>"2","key3"=>["1","2","3"]},test1.parse)