dev_tasks/spec.rake in sunspot_rails-1.3.0.rc6 vs dev_tasks/spec.rake in sunspot_rails-1.3.0
- old
+ new
@@ -25,11 +25,11 @@
ENV['BUNDLE_PATH'] = vendor_path(version)
ENV['BUNDLE_GEMFILE'] = gemfile_path(version)
unless File.exist?(ENV['BUNDLE_PATH'])
puts "Installing gems for Rails #{version} (this will only be done once)..."
- `bundle install #{ENV['BUNDLE_ARGS']}`
+ system("bundle install #{ENV['BUNDLE_ARGS']}") || exit(1)
end
end
task :generate_rails_app do
version = ENV['VERSION']
@@ -38,12 +38,12 @@
unless File.exist?(File.expand_path("config/environment.rb", app_path))
rails_cmd = "bundle exec rails _#{version}_"
puts "Generating Rails #{version} application..."
if version.start_with?("2")
- `#{rails_cmd} \"#{app_path}\" --force`
+ system("#{rails_cmd} \"#{app_path}\" --force") || exit(1)
elsif version.start_with?("3")
- `#{rails_cmd} new \"#{app_path}\" --force --skip-git --skip-javascript --skip-gemfile --skip-sprockets`
+ system("#{rails_cmd} new \"#{app_path}\" --force --skip-git --skip-javascript --skip-gemfile --skip-sprockets") || exit(1)
end
end
end
task :setup_rails_app do