Commit 218f2896 authored by Fabio Pelosin's avatar Fabio Pelosin

[Rakefile] Use a bundle dir on Travis

parent d6f8e491
...@@ -4,7 +4,7 @@ env: ...@@ -4,7 +4,7 @@ env:
- RVM_RUBY_VERSION=system NOEXEC_DISABLE=1 RUBY_VERSION_SPECIFIC='sudo gem update --system && sudo gem install bundler --no-ri --no-rdoc' - RVM_RUBY_VERSION=system NOEXEC_DISABLE=1 RUBY_VERSION_SPECIFIC='sudo gem update --system && sudo gem install bundler --no-ri --no-rdoc'
- RVM_RUBY_VERSION=1.9.3 NOEXEC_DISABLE=1 RUBY_VERSION_SPECIFIC='sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2 && curl http://curl.haxx.se/ca/cacert.pem -o /usr/local/share/cacert.pem' SSL_CERT_FILE=/usr/local/share/cacert.pem - RVM_RUBY_VERSION=1.9.3 NOEXEC_DISABLE=1 RUBY_VERSION_SPECIFIC='sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2 && curl http://curl.haxx.se/ca/cacert.pem -o /usr/local/share/cacert.pem' SSL_CERT_FILE=/usr/local/share/cacert.pem
before_install: source ~/.rvm/scripts/rvm && rvm use $RVM_RUBY_VERSION before_install: source ~/.rvm/scripts/rvm && rvm use $RVM_RUBY_VERSION
install: eval $RUBY_VERSION_SPECIFIC && rake bootstrap install: eval $RUBY_VERSION_SPECIFIC && rake bootstrap[use_bundle_dir]
script: bundle exec rake spec:ci script: bundle exec rake spec:ci
notifications: notifications:
campfire: campfire:
......
...@@ -153,15 +153,6 @@ namespace :spec do ...@@ -153,15 +153,6 @@ namespace :spec do
FileList["spec/#{dir}/*_spec.rb"].shuffle.join(' ') FileList["spec/#{dir}/*_spec.rb"].shuffle.join(' ')
end end
def title(title)
cyan_title = "\033[0;36m#{title}\033[0m"
puts
puts "-" * 80
puts "| #{cyan_title.ljust(87)} |"
puts "-" * 80
puts
end
#--------------------------------------# #--------------------------------------#
desc "Automatically run specs for updated files" desc "Automatically run specs for updated files"
...@@ -347,12 +338,18 @@ end ...@@ -347,12 +338,18 @@ end
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
desc "Initializes your working copy to run the specs" desc "Initializes your working copy to run the specs"
task :bootstrap do task :bootstrap, :use_bundle_dir? do |t, args|
title "Environment bootstrap"
puts "Updating submodules" puts "Updating submodules"
execute_command "git submodule update --init --recursive" execute_command "git submodule update --init --recursive"
puts "Installing gems" puts "Installing gems"
execute_command "bundle install" if args[:use_bundle_dir?]
execute_command "bundle install --path ./travis_bundle_dir"
else
execute_command "bundle install"
end
puts "Installing tools (Homebrew)" puts "Installing tools (Homebrew)"
execute_command "brew install appledoc" if `which appledoc`.strip.empty? execute_command "brew install appledoc" if `which appledoc`.strip.empty?
...@@ -365,3 +362,16 @@ desc "Run all specs" ...@@ -365,3 +362,16 @@ desc "Run all specs"
task :spec => 'spec:all' task :spec => 'spec:all'
task :default => :spec task :default => :spec
#-----------------------------------------------------------------------------#
# group helpers
def title(title)
cyan_title = "\033[0;36m#{title}\033[0m"
puts
puts "-" * 80
puts cyan_title
puts "-" * 80
puts
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment