Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Boomerang is a JavaScript widget that gives users a way back to Heroku from Addon provider sites.
CSS CoffeeScript HTML
Branch: master

README.md

Boomerang

TL;DR

Boomerang is a Javascript widget that Heroku Add-on Providers embed on their single-sign-on pages, giving customers a way back to the Heroku website. It has no dependencies, a small footprint, and it works over SSL.

Old Header

http://cl.ly/image/3C0w2c1x0I3F

New Header

http://cl.ly/image/3P3f012h3w1Y

Manifesto

The ideal Heroku nav should be consistent in appearance and behavior across Heroku sites while adapting to the given context. As contextual information like user, app, addon, and org are made available to this nav, it should respond intelligently.

Many previous solutions have appeared and are in use today, but the complexity, ruby-language specificity, and general inflexibility of these tools has hindered their adoption and maintenance.

Boomerang is the latest incarnation of the Heroku add-on SSO navigation. It stands apart from its predecessors in that it's rendered client-side by a Javascript widget. The most obvious benefits to this approach are ease of integration and portability across sites regardless of their server-side lanuage.

Basic Usage

Drop this snippet on your page and you're good to go.

<script src="https://s3.amazonaws.com/assets.heroku.com/boomerang/boomerang.js"></script>
<script>
  document.addEventListener("DOMContentLoaded", function() {
    Boomerang.init({app: 'foo', addon: 'bar'});
  });
</script>

Test Drive

If you're an existing addon provider using the old Heroku SSO header, you can try out Boomerang in your browser's JavaScript console:

document.querySelector('#heroku-header').style.display = 'none';
document.querySelector('#heroku-subheader').style.display = 'none';
var s = document.createElement('script');
s.src = 'https://s3.amazonaws.com/assets.heroku.com/boomerang/boomerang.js';
document.querySelector('body').appendChild(s);
Boomerang.init({app: 'foo', addon: 'bar'});

Development

You'll need node to hack on this.

npm install

Be sure that ./node_modules/.bin is in your path

brew install casperjs
cp .env{.sample,}

Edit .env and put in your S3_KEY, S3_SECRET and the S3_BUCKET from which you will serve your custom build

foreman run cake cut    # Build and sync static files with S3
cake dev                # runs an http server and auto-compiles code changes
cake test               # runs casperjs test suite
Something went wrong with that request. Please try again.