forked from tricknotes/ember-cli-rails
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test Multiple Rails versions with Appraisal
Closes [tricknotes#302]. Configures project according to [Appraisal installation instructions][appraisal]. [tricknotes#302]: tricknotes#302 [appraisal]: https://github.com/thoughtbot/appraisal
- Loading branch information
1 parent
8eec101
commit 753c4a6
Showing
12 changed files
with
137 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
*.so | ||
*.o | ||
*.a | ||
*.gemfile.lock | ||
mkmf.log | ||
/log/ | ||
spec/dummy/my-app/ |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
appraise "3.2" do | ||
gem "rails", git: "https://github.com/rails/rails.git", branch: "3-2-stable" | ||
end | ||
|
||
appraise "4.1" do | ||
gem "rails", "~> 4.1.1" | ||
end | ||
|
||
appraise "4.2" do | ||
gem "rails", "~> 4.2.1" | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ source "https://rubygems.org" | |
|
||
gemspec | ||
|
||
gem "appraisal" | ||
gem "rails", "4.2.4" | ||
gem "pry" | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,19 @@ | ||
require "rubygems" | ||
require "bundler/setup" | ||
require "bundler/gem_tasks" | ||
require "appraisal" | ||
require "rspec/core/rake_task" | ||
|
||
task(:default).clear | ||
task default: :spec | ||
|
||
if defined? RSpec | ||
task(:spec).clear | ||
RSpec::Core::RakeTask.new(:spec) do |t| | ||
t.verbose = false | ||
end | ||
end | ||
|
||
if !ENV["APPRAISAL_INITIALIZED"] && !ENV["TRAVIS"] | ||
task default: :appraisal | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env ruby | ||
# | ||
# This file was generated by Bundler. | ||
# | ||
# The application 'appraisal' is installed as part of a gem, and | ||
# this file is here to facilitate running it. | ||
# | ||
|
||
require 'pathname' | ||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", | ||
Pathname.new(__FILE__).realpath) | ||
|
||
require 'rubygems' | ||
require 'bundler/setup' | ||
|
||
load Gem.bin_path('appraisal', 'appraisal') |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env ruby | ||
# | ||
# This file was generated by Bundler. | ||
# | ||
# The application 'rake' is installed as part of a gem, and | ||
# this file is here to facilitate running it. | ||
# | ||
|
||
require 'pathname' | ||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", | ||
Pathname.new(__FILE__).realpath) | ||
|
||
require 'rubygems' | ||
require 'bundler/setup' | ||
|
||
load Gem.bin_path('rake', 'rake') |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# This file was generated by Appraisal | ||
|
||
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" | ||
end | ||
|
||
group :test do | ||
gem "poltergeist", "~> 1.8.0" | ||
gem "codeclimate-test-reporter", :require => nil | ||
end | ||
|
||
gemspec :path => "../" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "appraisal" | ||
gem "rails", "~> 4.1.1" | ||
gem "pry" | ||
|
||
group :development, :test do | ||
gem "high_voltage", "~> 2.4.0" | ||
gem "rspec-rails", "~> 3.3.0" | ||
end | ||
|
||
group :test do | ||
gem "poltergeist", "~> 1.8.0" | ||
gem "codeclimate-test-reporter", :require => nil | ||
end | ||
|
||
gemspec :path => "../" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "appraisal" | ||
gem "rails", "~> 4.2.1" | ||
gem "pry" | ||
|
||
group :development, :test do | ||
gem "high_voltage", "~> 2.4.0" | ||
gem "rspec-rails", "~> 3.3.0" | ||
end | ||
|
||
group :test do | ||
gem "poltergeist", "~> 1.8.0" | ||
gem "codeclimate-test-reporter", :require => nil | ||
end | ||
|
||
gemspec :path => "../" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
module EmberCli | ||
module ControllerExtension | ||
def self.included(base) | ||
base.before_action do | ||
build_ember_app = lambda do | ||
app = params[:ember_app] | ||
|
||
if app.present? | ||
EmberCli[app].build | ||
end | ||
end | ||
|
||
if base.respond_to?(:before_action) | ||
base.before_action(&build_ember_app) | ||
else | ||
base.before_filter(&build_ember_app) | ||
end | ||
end | ||
end | ||
end |