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
Adds Amber Task Runner #318
Conversation
ffa42f8
to
264da56
Compare
I've just took a quick look some missed a lot of things but what about sam? |
b6e9493
to
0e84106
Compare
Hey @imdrasil While I personally like We are more than happy to feature SAM in Amber. What do you think of creating a Recipe using Amber with SAM? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great! missing generator though.
amber g task FakeTask
@eliasjpr nice idea, will take a look |
@drujensen Will add the missing generator. @imdrasil Open a PR here https://github.com/amberframework/online-docs and I will merge. Thank you this will be great! |
0e84106
to
a9bcd33
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this load the amber environment? I'm not seeing any requires for models or libraries loaded by the amber project. Am I missing something?
@elorest good catch! I'm not a big fan of how rails does this with the |
@elorest I forgot to mention about this in the PR description. This was by design. It does not load the amber environment. This is to make it flexible to the user, I personally don't think we should be loading the amber environment for every task the user should determine when he needs the amber environment. The user just needs to require amber on the task to have it load. This is pretty much how Rails does it for Rails runner |
Tasks generators will come in a separate PR |
- Adds Perform command to execute tasks - Tasks should be inherited from **Amber::Tasks::Task** - The task should declare a `perform` method. This is the method that gets called.
e55af69
to
d41c93b
Compare
"As a developer, I want to be able to perform tasks using the framework." Seems to imply that it uses the framework. If we're not loading the amber environment how is this an advantage over just creating a crystal script that can be run with Also is it a concern that if we |
…k. (amberframework#318) - Adds Perform command to execute tasks - Tasks should be inherited from **Amber::Tasks::Task** - The task should declare a `perform` method. This is the method that gets called.
@elorest I agree. I rarely create a rake task that doesn't load the environment. Rails provides both options. Either we document how to do this or we provide a way to do it. It's pretty simple:
at the top of your rake task in order to include the environment, but I don't think its intuitive enough. Maybe we allow the generator to add it and then the user can simply remove it if they don't want the environment added. We can comment in the code saying WDYT? |
or we can default to not including the environment and say |
…k. (#318) - Adds Perform command to execute tasks - Tasks should be inherited from **Amber::Tasks::Task** - The task should declare a `perform` method. This is the method that gets called.
As a developer, I want to be able to perform tasks using the framework.
perform
method. This is the method that getscalled.
✋ @aarongodin