Skip to content

Commit

Permalink
deps: crystal 0.28.0 → 0.29.0
Browse files Browse the repository at this point in the history
It still works with Crystal 0.28, though.

Require bug is related to crystal-lang/crystal#7408
  • Loading branch information
David Keller authored and vladfaust committed Jun 8, 2019
1 parent 7e355aa commit 289ae6c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 0.8.1
authors:
- Vlad Faust <mail@vladfaust.com>

crystal: 0.28.0
crystal: 0.29.0

license: MIT

Expand Down
2 changes: 1 addition & 1 deletion src/onyx-http/ext/http/server/response/view.cr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require "http/server/response"
require "../../../view"
require "../../../../view"

class HTTP::Server::Response
# A view to render.
Expand Down
4 changes: 2 additions & 2 deletions src/onyx-http/middleware/router.cr
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ module Onyx::HTTP::Middleware
def on(path, methods : Array(String), &proc : ::HTTP::Server::Context -> View | _)
methods.map(&.downcase).each do |method|
add('/' + method, path, ContextProc.new do |context|
view? = proc.call(context)
view = proc.call(context)

if view = view?.as?(HTTP::View)
if view = view.as?(HTTP::View)
context.response.view ||= view
end
end)
Expand Down

0 comments on commit 289ae6c

Please sign in to comment.