mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Refactor global namespace DSL into OOP Kemal::Base
This commit is contained in:
parent
a5d8df7382
commit
aaa2109837
25 changed files with 420 additions and 387 deletions
|
@ -22,7 +22,7 @@ describe "ParamParser" do
|
|||
end
|
||||
|
||||
it "parses url params" do
|
||||
kemal = Kemal::RouteHandler::INSTANCE
|
||||
kemal = Kemal.application.route_handler
|
||||
kemal.add_route "POST", "/hello/:hasan" do |env|
|
||||
"hello #{env.params.url["hasan"]}"
|
||||
end
|
||||
|
@ -34,7 +34,7 @@ describe "ParamParser" do
|
|||
end
|
||||
|
||||
it "decodes url params" do
|
||||
kemal = Kemal::RouteHandler::INSTANCE
|
||||
kemal = Kemal.application.route_handler
|
||||
kemal.add_route "POST", "/hello/:email/:money/:spanish" do |env|
|
||||
email = env.params.url["email"]
|
||||
money = env.params.url["money"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue