Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

try using Bundler.with_clean_env for starting up webservers

  • Loading branch information...
commit d727ee5ac2c7eaa59e3aafebf572a505d423be5a 1 parent 48daff3
@ronalchn authored
Showing with 7 additions and 8 deletions.
  1. +0 −2  .travis.yml
  2. +6 −5 Rakefile
  3. +1 −1  spec/rails30_app/Gemfile.lock
View
2  .travis.yml
@@ -12,6 +12,4 @@ rvm:
before_script: # for Selenium RSpec tests
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- - 'gem install rails -v `grep -e "^\ *rails\ *([0-9.]\+)\ *$" spec/rails_app/Gemfile.lock | grep -e "[0-9.]\+" -o`'
- - 'gem install rails -v `grep -e "^\ *rails\ *([0-9.]\+)\ *$" spec/rails30_app/Gemfile.lock | grep -e "[0-9.]\+" -o`'
script: rake travis
View
11 Rakefile
@@ -20,11 +20,12 @@ task :travis do
system("cp `bundle show jquery-rails`/vendor/assets/javascripts/* spec/rails30_app/public/javascripts/")
system("cp `bundle show jquery-historyjs`/vendor/assets/javascripts/* spec/rails30_app/public/javascripts/")
system("(cd spec/rails30_app/ && bundle exec rails generate ajax_pagination:assets --force)")
-
- # startup test servers
- system("(cd spec/rails_app/ && RAILS_ENV=test bundle exec rails server -d --port=#{serverport})") # daemonized rails server
- system("(cd spec/rails_app/ && RAILS_ENV=test AJAX_DELAY=1.5 bundle exec rails server -d --port=#{serverslowport})") # daemonized rails server
- system("(cd spec/rails30_app/ && RAILS_ENV=test AJAX_DELAY=1.5 bundle exec rails server -d --port=#{r30serverport})") # daemonized rails server
+ Bundler.with_clean_env do
+ # startup test servers
+ system("(cd spec/rails_app/ && (bundle | grep -e 'Your bundle .*$') && RAILS_ENV=test bundle exec rails server -d --port=#{serverport})") # daemonized rails server
+ system("(cd spec/rails_app/ && (bundle | grep -e 'Your bundle .*$') && RAILS_ENV=test AJAX_DELAY=1.5 bundle exec rails server -d --port=#{serverslowport})") # daemonized rails server
+ system("(cd spec/rails30_app/ && (bundle | grep -e 'Your bundle .*$') && RAILS_ENV=test AJAX_DELAY=1.5 bundle exec rails server -d --port=#{r30serverport})") # daemonized rails server
+ end
system("bundle exec rake spec")
unless $?.exitstatus == 0
system("kill -9 `lsof -i :#{serverport} -t`") # kills rails server
View
2  spec/rails30_app/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
- ajax_pagination (0.6.0)
+ ajax_pagination (0.6.1.alpha)
jquery-historyjs
jquery-rails (>= 1.0.17)
rails (>= 3.0)
Please sign in to comment.
Something went wrong with that request. Please try again.