Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applies crystal tool format to master branch #42

Merged
merged 1 commit into from
May 9, 2017

Conversation

eliasjpr
Copy link
Contributor

@eliasjpr eliasjpr commented May 7, 2017

Applies crystal tool format to master branch

Issue: https://app.clubhouse.io/amber/story/45/apply-tool-format-to-master

Some files needed to be formatted by the crystal tool format

  • Applied crystal tool formats and formatted a couple of files.

  • Cleans up the formatting in static_controller, render, router dsl, and
    route class.

fridgerator
fridgerator previously approved these changes May 7, 2017
bew
bew previously requested changes May 7, 2017
Copy link
Contributor

@bew bew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've marked some places where macros needs manual indentations (crystal tool format doesn't know how to indent macros...)

I think there are other places where macro are incorrectly indented..

@@ -1,21 +1,21 @@
module Amber::Controller
module Render
macro render_both(filename, layout)
macro render_both(filename, layout)
content = render_template("{{filename.id}}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Macros needs manual indentation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

# helper to render a template. The view name is relative to `src/views` directory.
macro render_template(filename, *args)
# helper to render a template. The view name is relative to `src/views` directory.
macro render_template(filename, *args)
{% if filename.id.split("/").size > 2 %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Macros needs manual indentation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

{% if filename.id.split("/").size > 2 %}
Kilt.render("{{filename.id}}", {{*args}})
{% else %}
Kilt.render("src/views/{{filename.id}}", {{*args}})
{% end %}
end

macro render(filename, layout = "layouts/application.slang", path = "src/views", folder = __FILE__)
macro render(filename, layout = "layouts/application.slang", path = "src/views", folder = __FILE__)
render_both "#{{{path}}}/#{{{folder.split("/").last.gsub(/\_controller\.cr|\.cr/, "")}}}/#{{{filename}}}", "#{{{path}}}/#{{{layout}}}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Macros needs manual indentation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@eliasjpr
Copy link
Contributor Author

eliasjpr commented May 9, 2017

Please review

fridgerator
fridgerator previously approved these changes May 9, 2017
@eliasjpr eliasjpr dismissed bew’s stale review May 9, 2017 22:49

I have already indent the macro methods

Issue: https://app.clubhouse.io/amber/story/45/apply-tool-format-to-master

Some files needed to be formatted by the crystal tool format

* Applied crystal tool formats and formatted a couple of files.

* Cleans up the formatting in static_controller, render, router dsl, and
route class.
@eliasjpr eliasjpr force-pushed the elias/ch45/apply-tool-format-to-master branch from 22b5866 to c2091ed Compare May 9, 2017 22:50
@eliasjpr eliasjpr merged commit 109ff76 into master May 9, 2017
@eliasjpr eliasjpr deleted the elias/ch45/apply-tool-format-to-master branch May 9, 2017 22:55
@eliasjpr eliasjpr added this to Completed in Framework 2018 Jun 7, 2017
elorest added a commit that referenced this pull request Aug 26, 2017
* fixed DockerFile and cleaned up flash in controller template

* fixed ecr rendering and bumped

* removed sidekiq from shard template and index action from appliction controller

* fixed specs
@faustargz faustargz added this to Done in Framework 2018 May 5, 2018
@faustargz faustargz removed this from Done in Framework 2018 Jun 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants