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

Projects
None yet
5 participants
@sikachu
Member

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

This comment has been minimized.

Show comment
Hide comment
@sikachu

sikachu Feb 24, 2013

Member

sure!

Member

sikachu commented Feb 24, 2013

sure!

@sikachu

This comment has been minimized.

Show comment
Hide comment
@sikachu

sikachu Feb 24, 2013

Member

PR updated.

Member

sikachu commented Feb 24, 2013

PR updated.

@sikachu

This comment has been minimized.

Show comment
Hide comment
@sikachu

sikachu Feb 24, 2013

Member

whoops, hold on

Member

sikachu commented Feb 24, 2013

whoops, hold on

@rafaelfranca

This comment has been minimized.

Show comment
Hide comment
@rafaelfranca

rafaelfranca Feb 24, 2013

Member

Missing to remove the methods in my last comment

Member

rafaelfranca commented Feb 24, 2013

Missing to remove the methods in my last comment

Remove `--builder` option from `rails` command
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

This comment has been minimized.

Show comment
Hide comment
@sikachu

sikachu Feb 24, 2013

Member

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

Member

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

Merge pull request #9401 from sikachu/master-remove-builder-option
Remove `--builder` option from `rails` command

@rafaelfranca rafaelfranca merged commit bce6cbd into rails:master Feb 24, 2013

@rafaelfranca

This comment has been minimized.

Show comment
Hide comment
@rafaelfranca

rafaelfranca Feb 24, 2013

Member

❤️ 💚 💙 💛 💜

Member

rafaelfranca commented Feb 24, 2013

❤️ 💚 💙 💛 💜

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

@jokklan

This comment has been minimized.

Show comment
Hide comment
@jokklan

jokklan 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"

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.

Show comment
Hide comment
@jokklan

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

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

This comment has been minimized.

Show comment
Hide comment
@DamirSvrtan

DamirSvrtan Aug 11, 2014

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

DamirSvrtan commented Aug 11, 2014

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

@sikachu

This comment has been minimized.

Show comment
Hide comment
@sikachu

sikachu Aug 11, 2014

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@dhh

dhh Aug 12, 2014

Member

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?

Member

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

This comment has been minimized.

Show comment
Hide comment
@jokklan

jokklan 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 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

This comment has been minimized.

Show comment
Hide comment
@jokklan

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

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