It's a "rails plugin new" not "rails engine new". It doesn't create a default Engine because not all plugins are engines. If it's an engine and not just a plugin/railtie you would normally want the "--full" option.
If not, just create it. It's only 4 lines of code. On Tue, Jun 5, 2012 at 1:25 PM, Rodrigo Rosenfeld Rosas <[email protected]>wrote: > But my engines usually don't have any routes and even those who have are > not mountable ones. > > I'm just asking for an engine to be created even for non-mountable > engines. I mean, as the default behavior of "rails plugin new plugin-name". > > The "--full" will add integration tests which I also don't usually include > in my gems. > > Usually I want to bundle some JS libraries as Rails gems for easier reuse > among my projects. > > Basically, I'd like "rails plugin new plugin-name" to be equivalent of > "rails plugin new plugin-name --full -T". > > Does it make sense? > > Cheers, > Rodrigo. > > Em 05-06-2012 13:17, Luís Ferreira escreveu: > >> Yes. Just do "rails new plugin some_example --mountable". >> >> You should also take a look at --full. ;) >> On Jun 5, 2012, at 2:55 PM, Rodrigo Rosenfeld Rosas wrote: >> >> What version are you talking about? That doesn't happen on latest stable >>> 3.2.5 here. >>> >>> If that is already implemented in master, then great, I hope it to be >>> backported to 3.2.6 when it gets released... >>> >>> Thanks, >>> Rodrigo. >>> >>> Em 05-06-2012 10:22, Luís Ferreira escreveu: >>> >>>> It creates the lib/some-example/engine.rb file which is just as you >>>> described and then requires it in lib/some-example.rb. Shouldn't that be >>>> enough? >>>> On Jun 5, 2012, at 2:10 PM, Rodrigo Rosenfeld Rosas wrote: >>>> >>>> I've been creating several engines for Rails lately and I found that >>>>> having an engine class inherited from Rails::Engine is required if you >>>>> intend to bundle some Sprockets assets. >>>>> >>>>> So, shouldn't the template for "rails plugin new" change so that >>>>> "rails plugin new some-example" would create something like: >>>>> >>>>> lib/some-example.rb: >>>>> >>>>> module SomeExample >>>>> class Engine< Rails::Engine >>>>> end >>>>> end >>>>> >>>>> instead of an empty SomeExample module? >>>>> >>>>> Maybe the "plugin new" could add some option like '--skip-engine' or >>>>> disable it automatically if "--skip-sprockets" is used. >>>>> >>>>> Make sense? >>>>> >>>>> Kind regards, >>>>> Rodrigo. >>>>> >>>>> Cumprimentos, Luís Ferreira >>> >> > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to > rubyonrails-core@googlegroups.**com<[email protected]> > . > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@**googlegroups.com<rubyonrails-core%[email protected]> > . > For more options, visit this group at http://groups.google.com/** > group/rubyonrails-core?hl=en<http://groups.google.com/group/rubyonrails-core?hl=en> > . > > -- Luiz Felipe G. Pereira -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
