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

Remove `--builder` option from `rails` command #9401

Merged
merged 1 commit into from Feb 24, 2013

Conversation

@sikachu
Copy link
Member

@sikachu sikachu commented Feb 24, 2013

Ability to use a custom builder by passing --builder (or -b) has been removed. Consider using application template instead. See this guide for more detail: http://guides.rubyonrails.org/rails_application_templates.html

@sikachu
Copy link
Member Author

@sikachu sikachu commented Feb 24, 2013

sure!

@sikachu
Copy link
Member Author

@sikachu sikachu commented Feb 24, 2013

PR updated.

@sikachu
Copy link
Member Author

@sikachu sikachu commented Feb 24, 2013

whoops, hold on

@rafaelfranca
Copy link
Member

@rafaelfranca rafaelfranca commented Feb 24, 2013

Missing to remove the methods in my last comment

Ability to use a custom builder by passing `--builder` (or `-b`) has
been removed. Consider using application template instead. See this
guide for more detail:
http://guides.rubyonrails.org/rails_application_templates.html
@sikachu
Copy link
Member Author

@sikachu sikachu commented Feb 24, 2013

I ended up removed the whole class, since it's now a no-op.

rafaelfranca added a commit that referenced this pull request Feb 24, 2013
Remove `--builder` option from `rails` command
@rafaelfranca rafaelfranca merged commit bce6cbd into rails:master Feb 24, 2013
@rafaelfranca
Copy link
Member

@rafaelfranca rafaelfranca commented Feb 24, 2013

❤️ 💚 💙 💛 💜

@sikachu sikachu deleted the sikachu:master-remove-builder-option branch Feb 24, 2013
@jokklan

This comment has been minimized.

Copy link

@jokklan jokklan commented on 2da5ea1 Nov 1, 2013

Why has this been removed?, i really liked this way to create custom templates. And is there anyway to get some of the same options, like overriding template files or specific builder methods? Fx:

def readme
  template "README.md"
end

instead of

remove_file "README.rdoc"
create_file "README.md", "TODO"

This comment has been minimized.

Copy link

@jokklan jokklan replied Nov 1, 2013

Like it says in the documentation plugin_new_generator.rb line 6-12

# The plugin builder allows you to override elements of the plugin
# generator without being forced to reverse the operations of the default
# generator.
#
# This allows you to override entire operations, like the creation of the
# Gemfile, README, or JavaScript files, without needing to know exactly
# what those operations do so you can create another template action.

The template option doesn't have this feature, as it are applied last, so you have to specifically reverse the operations.

@DamirSvrtan
Copy link

@DamirSvrtan DamirSvrtan commented Aug 11, 2014

what @jokklan said +1. @sikachu why is this feature removed? Thnx!

@sikachu
Copy link
Member Author

@sikachu sikachu commented Aug 11, 2014

I'll let core team speak on this one (/cc @dhh). I think we didn't see enough usage on this in the real world, so it got removed during the cleanup.

@dhh
Copy link
Member

@dhh dhh commented Aug 12, 2014

I've never used this, so I'd need some context as to what this is used for to chime in. Can anyone give some real-world examples of how and for what they're using this?

@jokklan
Copy link

@jokklan jokklan commented Aug 18, 2014

I have two cases where i used it myself: Dummy app for testing (which is generated when generating a new engine, but their does not exists any rake method to create it manually), and custom engines.

RefineryCMS is another good example where they have created a whole new custom generator for engines, instead of using all the methods already available in the internal Rails engine builder (see: engine_generator.rb and extension_generator.rb).

@jokklan
Copy link

@jokklan jokklan commented Aug 18, 2014

Another solution would be to make it simpler to make a generator with a custom builder that inherits from the existing builders, and add documentation about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.