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
[Guides] refactor rakefile to have a :guides namespace and a task that shows help #6502
Conversation
👍 |
@rafmagana This doesn't give any benefits over the current version imho. But I've nothing against this change either. And for this to be treated complete, you would need to update this guide and the comments in guides/rails_guides/generator.rb. @fxn Thoughts? If we pull this in, we will have to update the scripts on the docs server too. |
@vijaydev yes, it doesn't improve anything on terms of functionality, that's why I used the word "refactor", because it improves the code (by using namespaces, better than using taskname_namespace, imo, and adds a task per format) but it doesn't change any functionality. The only thing I think it's better is that if you need to add a new format, you'd add a task with the name of the format (guides:generate:[format]), set the ENV['format'] in the task and that'd be it, I think it's better to wrap it than setting the environment variable. Actually I was about the add a "guides:generate:all" task to generate all the guides (ALL=1) but I thought it'd confusing because people might think it'd be to generate html and kindle. @fxn If changing the scripts in the docs server is a major concern, I can add the old tasks "generate_guides" and "validate_guides" (which would call the ones I'm proposing), and we could get rid of them later, doesn't make much sense, but I can do it. What do you guys think? I will change the guide later in the day. Thanks a lot. |
@rafmagana the doc server changes aren't a concern. |
Good. I think we no longer need to document you can generate the guides invoking a Ruby script. That's how it all started but the interface should be just rake tasks nowadays. Could you please remove that? Also, albeit internally the script understand a KINDLE environment variable, I think we can remove that one from the help, because the new interface is the rake task. When we merge this I'll update the docs server cron jobs. |
…tasks are now the new interface
…i file instead of using KINDLE=1
@fxn there you have it, what do you think? |
Great thanks, I'll apply tomorrow in sync with the cron jobs. |
Gracias a ti! |
[Guides] refactor rakefile to have a :guides namespace and a task that shows help
Rake tasks: