Skip to content
Browse files

[Rakefile] Use a bundle dir on Travis

  • Loading branch information...
1 parent d6f8e49 commit 218f28963989868722f2e15bd022599fa705873f @fabiopelosin fabiopelosin committed
Showing with 22 additions and 12 deletions.
  1. +1 −1 .travis.yml
  2. +21 −11 Rakefile
View
2 .travis.yml
@@ -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=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
-install: eval $RUBY_VERSION_SPECIFIC && rake bootstrap
+install: eval $RUBY_VERSION_SPECIFIC && rake bootstrap[use_bundle_dir]
script: bundle exec rake spec:ci
notifications:
campfire:
View
32 Rakefile
@@ -153,15 +153,6 @@ namespace :spec do
FileList["spec/#{dir}/*_spec.rb"].shuffle.join(' ')
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"
@@ -347,12 +338,18 @@ end
#-----------------------------------------------------------------------------#
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"
execute_command "git submodule update --init --recursive"
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)"
execute_command "brew install appledoc" if `which appledoc`.strip.empty?
@@ -365,3 +362,16 @@ desc "Run all specs"
task :spec => 'spec:all'
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

0 comments on commit 218f289

Please sign in to comment.
Something went wrong with that request. Please try again.