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

[Guides] refactor rakefile to have a :guides namespace and a task that shows help #6502

Merged
merged 7 commits into from May 29, 2012

Conversation

rafmagana
Copy link
Contributor

Rake tasks:

  • guides:generate (executes generate:html)
  • guides:validate
  • guides:generate:html
  • guides:generate:kindle
  • help (default) - the text is almost the same than in rails_guides/generator.rb

@goshacmd
Copy link
Contributor

👍

@vijaydev
Copy link
Member

@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.

@rafmagana
Copy link
Contributor Author

@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.

@vijaydev
Copy link
Member

@rafmagana the doc server changes aren't a concern.

@fxn
Copy link
Member

fxn commented May 28, 2012

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.

@rafmagana
Copy link
Contributor Author

@fxn there you have it, what do you think?

@fxn
Copy link
Member

fxn commented May 28, 2012

Great thanks, I'll apply tomorrow in sync with the cron jobs.

@rafmagana
Copy link
Contributor Author

Gracias a ti!

fxn added a commit that referenced this pull request May 29, 2012
[Guides] refactor rakefile to have a :guides namespace and a task that shows help
@fxn fxn merged commit 669694f into rails:master May 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants