Skip to content

Commit

Permalink
Added rails 4.2 and sass-rails 5.0 to test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
rmm5t committed Dec 30, 2014
1 parent 1873fcb commit c989428
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 11 deletions.
5 changes: 5 additions & 0 deletions Appraisals
Expand Up @@ -12,3 +12,8 @@ appraise "rails40" do
gem "rails", "~> 4.0.0"
gem "sass-rails"
end

appraise "rails42" do
gem "rails", "~> 4.2.0"
gem "sass-rails", "~> 5.0"
end
23 changes: 23 additions & 0 deletions gemfiles/rails42.gemfile
@@ -0,0 +1,23 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "rb-fsevent", :require => false
gem "ruby_gntp", :require => false
gem "guard"
gem "guard-test"
gem "rails", "~> 4.2.0"
gem "railties", "~> 4.2.0"
gem "sass-rails", "~> 5.0"

group :assets do
gem "compass-blueprint"
end

group :test do
gem "mocha"
gem "appraisal"
gem "rainbow"
end

gemspec :path => "../"
16 changes: 5 additions & 11 deletions test/helpers/rails_helper.rb
Expand Up @@ -4,36 +4,30 @@ module RailsHelpers
include FileHelper
include DebugHelper
include CommandHelper
RAILS_4_2 = "4.2"
RAILS_4_0 = "4.0"
RAILS_3_2 = "3.2"
RAILS_3_1 = "3.1"

WORKING_DIR = File.join(ROOT_PATH, 'rails-temp')

VERSION_LOOKUP = {
RAILS_4_2 => %r{^4\.2\.},
RAILS_4_0 => %r{^4\.0\.},
RAILS_3_2 => %r{^3\.2\.},
RAILS_3_1 => %r{^3\.1\.},
}

GEMFILES = {
RAILS_4_2 => GEMFILES_DIR.join("rails42.gemfile").to_s,
RAILS_4_0 => GEMFILES_DIR.join("rails40.gemfile").to_s,
RAILS_3_2 => GEMFILES_DIR.join("rails32.gemfile").to_s,
RAILS_3_1 => GEMFILES_DIR.join("rails31.gemfile").to_s
}

GENERATOR_OPTIONS = {
RAILS_4_0 => ['-q', '-G', '-O', '--skip-bundle'],
RAILS_3_2 => ['-q', '-G', '-O', '--skip-bundle'],
RAILS_3_1 => ['-q', '-G', '-O', '--skip-bundle']
}

GENERATOR_COMMAND = {
RAILS_4_0 => 'new',
RAILS_3_2 => 'new',
RAILS_3_1 => 'new'
}
GENERATOR_OPTIONS = Hash.new(['-q', '-G', '-O', '--skip-bundle'])

GENERATOR_COMMAND = Hash.new("new")

def rails_command(options)
debug(Rainbow("Running Rails command with: rails #{options.join(' ')}").foreground(:cyan))
Expand Down

0 comments on commit c989428

Please sign in to comment.