-
Notifications
You must be signed in to change notification settings - Fork 204
Add Rails 5 support #400
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
Merged
Merged
Add Rails 5 support #400
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
db040f1 to
b47db7b
Compare
6ee1254 to
a9c799c
Compare
| class EmberController < ::ApplicationController | ||
| def index | ||
| render layout: false | ||
| (::ActionController::Base::MODULES - ::ActionController::API::MODULES).each do |mod| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [88/80]
Contributor
|
Where are we at with this? Any additional blockers? |
1f37ed9 to
a8a94e4
Compare
Contributor
Author
|
@rwjblue I've gotten all versions of Ruby / Rails passing except for JRuby / rails {5,master}. I would love some help addressing these failures |
b110d57 to
ceed542
Compare
Closes [#376]. Required changes ---------------- Run test suite against the latest `5.0.0.betaX` and `master` branches of [`rails/rails`][rails]. Since `EmberController` extends `ApplicationController`, which can now extend from either `ActionController::Base` (which implements `helper_method`) and `ActionController::API` (which doesn't implement `helper_method`), we can't depend on that API existing. Remove call to `helper_method` from `EmberController`, as it is no longer supported. **Allow JRuby failures in CI** **Improve `setup_ember` script** * Don't overwrite `gemfiles/` changes with `appraisal install` * Localize Ember setup to `bin/setup_ember` * Always invoke, let `bin/setup_ember` decide whether or not to no-op **Fix `EmberCli::EmberController` inheritance** The `EmberCli::EmberController` used to inherit from `ApplicationController` in order to reap the benefits of application-wide configurations and behavior (such as authentication-based `before_action` calls and other macros). Unfortunately, with the introduction of Rails 5's `rails new --api`, applications' `ApplicationController` can now inherit from [`ActionController::API`][api], which doesn't serve HTML by default. To support Rails 5's default `--api` behavior, `EmberCli::EmberController` must inherit from `ActionController::Base`, forcing the controller to forfeit all the benefits of sharing behavior with `ApplicationController`. [api]: http://edgeapi.rubyonrails.org/classes/ActionController/API.html **Depend on `test-unit`** ``` Ruby 2.2+ has removed test/unit from the core library. Rails requires this as a dependency. Please add test-unit gem to your Gemfile: `gem 'test-unit', '~> 3.0'` (cannot load such file -- test/unit)" ``` Support changes --------------- Rails 5 depends on `[email protected]`, which **requires** Ruby `2.2.2` or greater. In order to support Rails 5, we will no longer support versions of Ruby prior to `2.2.2`. [#376]: #376 [rails]: https://github.com/rails/rails
This was referenced Aug 10, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #376.
Improve
setup_emberscriptgemfiles/changes withappraisal installbin/setup_emberbin/setup_emberdecide whether or not to no-opRequired changes
Run test suite against the latest
5.0.0.betaXandmasterbranches ofrails/rails.Since
EmberControllerextendsApplicationController, which can nowextend from either
ActionController::Base(which implementshelper_method) andActionController::API(which doesn't implementhelper_method), we can't depend on that API existing.Remove call to
helper_methodfromEmberController, as it is nolonger supported.
Fix
EmberCli::EmberControllerinheritanceThe
EmberCli::EmberControllerused to inherit fromApplicationControllerin order to reap the benefits ofapplication-wide configurations and behavior (such as
authentication-based
before_actioncalls and other macros).Unfortunately, with the introduction of Rails 5's
rails new --api,applications'
ApplicationControllercan now inherit fromActionController::API, which doesn't serve HTML by default.To support Rails 5's default
--apibehavior,EmberCli::EmberControllermust inherit fromActionController::Base,forcing the controller to forfeit all the benefits of sharing behavior
with
ApplicationController.Support changes
Rails 5 depends on
[email protected], which requires Ruby2.2.2orgreater.
In order to support Rails 5, we will no longer support versions of Ruby
prior to
2.2.2.