Skip to content

Commit

Permalink
Add Rails 5 support
Browse files Browse the repository at this point in the history
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.

Closes [#376].

[#376]: #376
[rails]: https://github.com/rails/rails
  • Loading branch information
seanpdoyle committed Feb 2, 2016
1 parent ce5db79 commit fcc295a
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ gemfile:
- gemfiles/3.2.gemfile
- gemfiles/4.1.gemfile
- gemfiles/4.2.gemfile
- gemfiles/5.0.0.beta2.gemfile
- gemfiles/master.gemfile
8 changes: 8 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ end
appraise "4.2" do
gem "rails", "~> 4.2.1"
end

appraise "5.0.0.beta2" do
gem "rails", "5.0.0.beta2"
end

appraise "master" do
gem "rails", git: "https://github.com/rails/rails.git", branch: "master"
end
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gem "pry"

group :development, :test do
gem "high_voltage", "~> 2.4.0"
gem "rspec-rails", "~> 3.3.0"
gem "rspec-rails", "~> 3.4.0"
end

group :test do
Expand Down
5 changes: 0 additions & 5 deletions app/controller/ember_cli/ember_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,5 @@ class EmberController < ::ApplicationController
def index
render layout: false
end

def ember_app
params[:ember_app]
end
helper_method :ember_app
end
end
2 changes: 1 addition & 1 deletion app/views/ember_cli/ember/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= render_ember_app ember_app do |head| %>
<%= render_ember_app params[:ember_app] do |head| %>
<% head.append do %>
<%= csrf_meta_tags %>
<% end %>
Expand Down
3 changes: 1 addition & 2 deletions gemfiles/3.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
source "https://rubygems.org"

gem "appraisal"
gem "test-unit", "~> 3.0"
gem "rails", :git => "https://github.com/rails/rails.git", :branch => "3-2-stable"
gem "pry"

group :development, :test do
gem "high_voltage", "~> 2.4.0"
gem "rspec-rails", "~> 3.3.0"
gem "rspec-rails", "~> 3.4.0"
end

group :test do
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/4.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gem "pry"

group :development, :test do
gem "high_voltage", "~> 2.4.0"
gem "rspec-rails", "~> 3.3.0"
gem "rspec-rails", "~> 3.4.0"
end

group :test do
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/4.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gem "pry"

group :development, :test do
gem "high_voltage", "~> 2.4.0"
gem "rspec-rails", "~> 3.3.0"
gem "rspec-rails", "~> 3.4.0"
end

group :test do
Expand Down
23 changes: 23 additions & 0 deletions gemfiles/5.0.0.beta2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"
gem "rails", "5.0.0.beta2"
gem "pry"

group :development, :test do
gem "high_voltage", github: "thoughtbot/high_voltage"
gem "rspec-core", github: "rspec/rspec-core"
gem "rspec-support", github: "rspec/rspec-support"
gem "rspec-expectations", github: "rspec/rspec-expectations"
gem "rspec-mocks", github: "rspec/rspec-mocks"
gem "rspec-rails", github: "rspec/rspec-rails"
end

group :test do
gem "poltergeist", "~> 1.8.0"
gem "codeclimate-test-reporter", :require => nil
end

gemspec :path => "../"
23 changes: 23 additions & 0 deletions gemfiles/master.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"
gem "rails", :git => "https://github.com/rails/rails.git", :branch => "master"
gem "pry"

group :development, :test do
gem "high_voltage", github: "thoughtbot/high_voltage"
gem "rspec-core", github: "rspec/rspec-core"
gem "rspec-support", github: "rspec/rspec-support"
gem "rspec-expectations", github: "rspec/rspec-expectations"
gem "rspec-mocks", github: "rspec/rspec-mocks"
gem "rspec-rails", github: "rspec/rspec-rails"
end

group :test do
gem "poltergeist", "~> 1.8.0"
gem "codeclimate-test-reporter", :require => nil
end

gemspec :path => "../"

0 comments on commit fcc295a

Please sign in to comment.