Utility for caching bundled gems on your Dropbox. Useful for speeding up Travis builds -
it doesn't need to wait for bundle install to download/install all gems.
Adding this to your Gemfile defeats the purpose. Instead, run
$ gem install bundle_cache
You'll need to set some environment variables to make this work.
DROPBOX_ACCESSTOKEN_=<your access token here>
BUNDLE_ARCHIVE=<the filename to use for your cache>
Easy:
- Login to your Dropbox Account
- Go to https://www.dropbox.com/developers/apps
- Create new App
- Generate ACCESS_TOKEN
- Notice for upcoming tasks.
Add these to your Travis configuration:
bundler_args: --without development --path=~/.bundle
before_install:
- "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
- git clone https://github.com/sprestel/bundle_cache.git
- cd bundle_cache && git checkout dropbox_sdk && gem build bundle_cache.gemspec
- gem install bundler bundle_cache*.gem
- bundle_cache_install
- cd ..
after_script:
- bundle_cache
env:
global:
- BUNDLE_ARCHIVE="your_project_bundle"
- RAILS_ENV=test
You'll also want to add your Dropbox accesstoken to a secure section in there:
- Install the travis gem with gem install travis
- Log into Travis with travis login --auto (from inside your project respository directory)
- Encrypt your dropbox accesstoken with: travis encrypt DROPBOX_ACCESSTOKEN="" --add (be sure to add your actual credentials inside the double quotes)
Original code based on the bundle_cache gem, originally by DATA AXLE
Thank you to Data Axel and all of bundle_cache contributors!
It is MIT licensed.
