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

Adding force delete to erb2haml #136

Merged
merged 3 commits into from
Nov 1, 2017

Conversation

stewartmckee
Copy link
Contributor

Fixes issue #132

Copy link
Member

@syguer syguer left a comment

Choose a reason for hiding this comment

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

Thank you!
I'm a little worry about variable name, but looks good.
Could you add document on README.md ?

@@ -59,7 +59,7 @@ namespace :haml do
puts '-'*80
begin
puts 'Would you like to delete the original .erb files? (This is not recommended unless you are under version control.) (y/n)'
should_delete = STDIN.gets.chomp.downcase[0]
should_delete = ENV["FORCE_ORIGINAL_ERB_DELETE"] ? "y" : STDIN.gets.chomp.downcase[0]
Copy link
Member

Choose a reason for hiding this comment

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

This name (FORCE_ORIGINAL_ERB_DELETE ) looks easy to conflict for me.
But adding prefix ( such as HAML_RAILS_) is too long...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool, at work just now, i'll think about the variable name and add to the readme shortly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually, just thinking about it, there is a use case to do the opposite too, to force to NOT delete the erb also, but still not ask the question. I'll refactor for this too.

@syguer
Copy link
Member

syguer commented Nov 1, 2017

Thanks 😄
LGTM

@syguer syguer merged commit 556eb31 into haml:master Nov 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants