Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

require bundler groups to include rake-tasks in engines #8262

Merged
merged 2 commits into from

3 participants

@senny
Owner

If you generate a full engine, this will include rake tasks from
your gem under the app namespace. For example if you have a dependency
on rspec-rails in your engine's gemspec. You will get the task app:spec

This is a fix for #8229

Trailing whitespace snuck into the CHANGELOG. I removed it in a separate commit to make backporting easier.

senny added some commits
@senny senny require bundler groups to include rake-tasks in engines
If you generate a full engine, this will include rake tasks from
your gem under the `app` namespace. For example if you have a dependency
on `rspec-rails` in your engine's `gemspec`. You will get the task `app:spec`

Closes #8229
a1fd9cd
@senny senny cleanup, remove whitspace from railties CHANGELOG 7cb0c88
@senny
Owner

@drogus @rafaelfranca can you take a look?

@rafaelfranca

Don't we have a way to test this?

@carlosantoniodasilva

I think I've had a similar issue these days but I couldn't look for the root cause, might be this, I'll take a look and report back, thanks!

@senny
Owner

I'm happy to add a test case but at the moment I have no sane Idea to verify the behavior.

@rafaelfranca rafaelfranca merged commit 133cdf0 into rails:master
@senny senny referenced this pull request from a commit in senny/rails
@senny senny backport #8262, require bundler groups to include rake-tasks in engines
If you generate a full engine, this will include rake tasks from
your gem under the `app` namespace. For example if you have a dependency
on `rspec-rails` in your engine's `gemspec`. You will get the task `app:spec`

Closes #8229

Conflicts:

	railties/CHANGELOG.md
da6951a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 18, 2012
  1. @senny

    require bundler groups to include rake-tasks in engines

    senny authored
    If you generate a full engine, this will include rake tasks from
    your gem under the `app` namespace. For example if you have a dependency
    on `rspec-rails` in your engine's `gemspec`. You will get the task `app:spec`
    
    Closes #8229
  2. @senny
This page is out of date. Refresh to see the latest.
View
9 railties/CHANGELOG.md
@@ -1,8 +1,13 @@
## Rails 4.0.0 (unreleased) ##
+* Engines with a dummy app include the rake tasks of dependencies in the app namespace.
+ Fix #8229
+
+ *Yves Senn*
+
* Add sqlserver.yml template file to satisfy '-d sqlserver' being passed to 'rails new'.
- Fix #6882
-
+ Fix #6882
+
*Robert Nesius*
* Rake test:uncommitted finds git directory in ancestors *Nicolas Despres*
View
2  railties/lib/rails/generators/rails/plugin_new/templates/rails/application.rb
@@ -11,7 +11,7 @@
<%= comment_if :skip_test_unit %>require "rails/test_unit/railtie"
<% end -%>
-Bundler.require
+Bundler.require(*Rails.groups)
require "<%= name %>"
<%= application_definition %>
Something went wrong with that request. Please try again.