Skip to content

Commit

Permalink
Revert "Merge branch 'master' into fix-version-numbers"
Browse files Browse the repository at this point in the history
This reverts commit 943e0d1 [formerly 9b27a5e], reversing
changes made to 1572211 [formerly b8a34f1].


Former-commit-id: 2bef546
  • Loading branch information
faustinoaq committed Oct 26, 2017
1 parent 9a04875 commit 5ce6ebc
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 193 deletions.
36 changes: 0 additions & 36 deletions spec/amber/cli/commands/perform_spec.cr

This file was deleted.

61 changes: 0 additions & 61 deletions spec/amber/tasks/runner_spec.cr

This file was deleted.

29 changes: 0 additions & 29 deletions src/amber/cli/commands/perform.cr

This file was deleted.

15 changes: 6 additions & 9 deletions src/amber/controller/render.cr
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,21 @@ module Amber::Controller
raise "Template or partial required!"
{% end %}

{{ filename = template || partial }}

# Render Template and return content
{{filename = template || partial}}

{% if filename.id.split("/").size > 1 %}
%content = render_template("#{{{filename}}}", {{path}})
{% else %}
{{ short_path = folder.gsub(/^.+?(?:controllers|views)\//, "") }}
{% if folder.id.ends_with?(".ecr") %}
%content = render_template("#{{{path}}}/#{{{short_path.gsub(/\/[^\.\/]+\.ecr/, "")}}}/#{{{filename}}}")
%content = render_template("#{{{folder.split("/")[-2]}}}/#{{{filename}}}", {{path}})
{% else %}
%content = render_template("#{{{path}}}/#{{{short_path.gsub(/\_controller\.cr|\.cr/, "")}}}/#{{{filename}}}")
%content = render_template("#{{{folder.split("/").last.gsub(/\_controller\.cr|\.cr/, "")}}}/#{{{filename}}}", {{path}})
{% end %}
{% end %}

# Render Layout

{% if layout && !partial %}
content = %content
render_template("#{{{path}}}/layouts/#{{{layout.class_name == "StringLiteral" ? layout : LAYOUT}}}")
render_template("layouts/#{{{layout.class_name == "StringLiteral" ? layout : LAYOUT}}}", {{path}})
{% else %}
%content
{% end %}
Expand Down
38 changes: 0 additions & 38 deletions src/amber/tasks/runner.cr

This file was deleted.

20 changes: 0 additions & 20 deletions src/amber/tasks/task.cr

This file was deleted.

0 comments on commit 5ce6ebc

Please sign in to comment.