Skip to content

Commit b47db7b

Browse files
committed
Add Rails 5 support
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. 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
1 parent 6eceea8 commit b47db7b

File tree

9 files changed

+67
-9
lines changed

9 files changed

+67
-9
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ notifications:
55
email: false
66
rvm:
77
- 2.3.0
8-
- 2.2
9-
- 2.1
8+
- 2.2.2
109
- jruby-9.0.3.0
1110
before_install:
1211
- echo '--colour' > ~/.rspec
@@ -20,3 +19,5 @@ gemfile:
2019
- gemfiles/3.2.gemfile
2120
- gemfiles/4.1.gemfile
2221
- gemfiles/4.2.gemfile
22+
- gemfiles/5.0.0.beta2.gemfile
23+
- gemfiles/master.gemfile

Appraisals

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,11 @@ end
99
appraise "4.2" do
1010
gem "rails", "~> 4.2.1"
1111
end
12+
13+
appraise "5.0.0.beta2" do
14+
gem "rails", "5.0.0.beta2"
15+
end
16+
17+
appraise "master" do
18+
gem "rails", git: "https://github.com/rails/rails.git", branch: "master"
19+
end

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
master
22
------
33

4+
* Remove support for Ruby 2.1.x. [#400]
45
* Enhance `rake ember:install` to fully reinstall if necessary. [#396]
56
* `EmberCli::Deploy::File` serves assets with Rails' `static_cache_control`
67
value. [#403]
78

9+
[#400]: https://github.com/thoughtbot/ember-cli-rails/pull/400
810
[#396]: https://github.com/thoughtbot/ember-cli-rails/pull/396
911
[#403]: https://github.com/thoughtbot/ember-cli-rails/pull/403
1012

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ This project supports:
591591

592592
This project supports:
593593

594-
* Ruby versions `>= 2.1.0`
594+
* Ruby versions `>= 2.2.0`
595595
* Rails versions `>=4.1.x`.
596596

597597
To learn more about supported versions and upgrades, read the [upgrading guide].

UPGRADING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ Additionally, this codebase makes use of [(required) keyword arguments][kwargs].
88
From `[email protected]` and on, we will no longer support versions of Ruby
99
prior to `2.1.0`.
1010

11+
`[email protected]` adds support for Rails 5, which depends on `[email protected]`,
12+
which **requires** Ruby `2.2.2` or greater.
13+
14+
From `[email protected]` and on, we will no longer support versions of Ruby
15+
prior to `2.2.2`.
16+
1117
To use `ember-cli-rails` with older versions of Ruby, try the `0.3.x` series.
1218

1319
[kwargs]: https://robots.thoughtbot.com/ruby-2-keyword-arguments

app/controller/ember_cli/ember_controller.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,5 @@ class EmberController < ::ApplicationController
33
def index
44
render layout: false
55
end
6-
7-
def ember_app
8-
params[:ember_app]
9-
end
10-
helper_method :ember_app
116
end
127
end

app/views/ember_cli/ember/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<%= render_ember_app ember_app do |head| %>
1+
<%= render_ember_app params[:ember_app] do |head| %>
22
<% head.append do %>
33
<%= csrf_meta_tags %>
44
<% end %>

gemfiles/5.0.0.beta2.gemfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "appraisal"
6+
gem "rails", "5.0.0.beta2"
7+
gem "pry"
8+
9+
group :development, :test do
10+
gem "high_voltage", github: "thoughtbot/high_voltage"
11+
gem "rspec-core", github: "rspec/rspec-core"
12+
gem "rspec-support", github: "rspec/rspec-support"
13+
gem "rspec-expectations", github: "rspec/rspec-expectations"
14+
gem "rspec-mocks", github: "rspec/rspec-mocks"
15+
gem "rspec-rails", github: "rspec/rspec-rails"
16+
end
17+
18+
group :test do
19+
gem "poltergeist", "~> 1.8.0"
20+
gem "codeclimate-test-reporter", :require => nil
21+
end
22+
23+
gemspec :path => "../"

gemfiles/master.gemfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "appraisal"
6+
gem "rails", :git => "https://github.com/rails/rails.git", :branch => "master"
7+
gem "pry"
8+
9+
group :development, :test do
10+
gem "high_voltage", github: "thoughtbot/high_voltage"
11+
gem "rspec-core", github: "rspec/rspec-core"
12+
gem "rspec-support", github: "rspec/rspec-support"
13+
gem "rspec-expectations", github: "rspec/rspec-expectations"
14+
gem "rspec-mocks", github: "rspec/rspec-mocks"
15+
gem "rspec-rails", github: "rspec/rspec-rails"
16+
end
17+
18+
group :test do
19+
gem "poltergeist", "~> 1.8.0"
20+
gem "codeclimate-test-reporter", :require => nil
21+
end
22+
23+
gemspec :path => "../"

0 commit comments

Comments
 (0)