Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


[!] NOTE: Travis-CI has launched Bundler caching:

WAD is a little script that replaces the usual bundle install on Travis-CI. It installs the bundle and uploads it to Amazon S3 to speed up consecutive runs.

Using WAD

Get the WAD script

Download the script and put it in your project. It doesn't really matter where you store it. We assume you're using bin/ in the following examples.

$ curl -o bin/wad

Now make the script executable.

$ chmod +x bin/wad

Add and commit it to your source repository.

Build configuration

Travis-CI offers a number of configuration options for stuff that can ran around the build. The actual building should happen with the script key.

script: bundle exec rake test:all

Before this happens we need to keep Travis-CI from installing the bundle and do it ourselves.

install: "bin/wad"
script: "bundle exec rake test:all"

Please refer to the Travis documentation if you need to do something more elaborate.

Alternative build configuration

If you always want to run the latest version of WAD, you can set it up like this:

install: "curl | ruby"
script: "bundle exec rake test:all"

Note that this opens up an attack vector! For example, if someone manages to poision the DNS server used by Travis they can run arbitrary code.


The WAD script needs to know where and how to access S3. You can do this with three environment variables. The S3 region, the bucket name and the S3 credentials.

The region and bucket name are relatively easy:

    - S3_REGION=eu-west-1
    - S3_BUCKET_NAME=unique-wad-bucket-name

You don't have to configure the region if you're using eu-west-1, the default.

The hard part is configuring the credentials, because they need to be signed. First concatenate your key and secret separated by a semicolon, like so:


Then you use the Travis-CI command line utility to sign it. Replace account/reponame with the same GitHub account and repository name you've configured on Travis-CI.


When all of that is done, you should end up with something like this:

install: "bin/wad"
script: "bundle exec rake test:all"
    - S3_BUCKET_NAME=unique-wad-bucket-name
    - S3_REGION=eu-west-1
    - secure: "OTpNPEmXlMm70P4y6sE419Rr…"

If you're already using other encrypted variables you can add another secure key to the configuration or re-encrypt all of the settings. Please read Travis-CI documentation to figure out how that works. Good luck!

Setting up S3

WAD doesn't automatically create a bucket for you. Please create one with the AWS console or the S3 tool of your choice.


In some cases you can get network errors on Travis. Currently WAD does not retry bundle uploads or downloads. You can use the travis_retry tool if you run into this often:

install: travis_retry bin/wad

Cleaning up

Note that WAD doesn't clean up old bundles for you. If you change Gemfile.lock a lot and the bucket becomes very large, you probably want to clean out old bundles once in a while.


WAD uses itself to run itself on Travis, you can check out our Travis configuration and the CI output.

Q & A

Why isn't this a gem?

There are two reasons:

  1. Installing gems is relatively slow and would unnecessarily slow down the build.
  2. We wanted WAD to be completely standalone and only require the Ruby stdlib.

Why is the sky blue?

Because shorter wavelengths of the visible light spectrum get scattered more in our atmosphere.

Why is water wet?

It just happens to be the sensory perception you get when touching liquids.


We were inspired to write this little script through posts by Matias Korhonen and Michał Czyż.


WAD is freely distributable under the terms of an MIT-style license. See COPYING or


WAD is a little script that speeds up test runs on Travis-CI by caching the installed bundle on S3.







No packages published