Announcing the Release of Our Papers Gem

As developers building contemporary software, we at New Relic end up relying on handfuls of libraries and piles of components. Consequently, it’s become vastly important for developers to clarify both their responsibility and liability in using these libraries. But keeping your code organized is tough, and keeping it documented is even harder. Licensing in particular is one of those critical and oft-overlooked steps in the development process, while making sure that your stack conforms is a problem that grows and grows over the product’s lifetime.

That’s why we’re proud to release the Papers Gem today! This gem has become a key part of our workflow here at New Relic, and we hope it can become a vital tool for our customers as well. Our gem integrates into your Ruby app’s test suite to validate your dependencies against a license whitelist. Any gems and JavaScript dependencies found will be flagged if in the app but not in the manifest (and vice-versa).

How It Works

With the Papers gem bundled into your app’s Gemfile, use the included binary to scan all your dependencies and generate a papers_manifest.yml:

[code]
$ papers –generate
Created config/papers_manifest.yml!
[/code]

The papers_manifest file will list every gem included through bundler, as well as any JavaScript files found within the app. Here’s a sample manifest:

[code]
# => config/papers_manifest.yml

gems:
sqlite3-1.3.7:
license: MIT
license_url: https://github.com/luislavena/sqlite3-ruby/blob/master/LICENSE
project_url: https://github.com/luislavena/sqlite3-ruby
rails-3.2.13:
license: MIT
project_url: http://www.rubyonrails.org
license_url: http://www.rubyonrails.org
newrelic_rpm-3.5.7.59:
license: MIT
license_url: http://www.github.com/newrelic/rpm/blob/master/LICENSE
project_url: http://www.github.com/newrelic/rpm
javascripts:
app/assets/javascripts/application.js:
license: New Relic
license_url: http://newrelic.com
project_url: http://newrelic.com
public/javascripts/d3-min.js:
license: BSD
license_url: http://d3js.org/
project_url: http://d3js.org/
[/code]

Make sure to keep this manifest up-to-date with any changes to your dependencies, and then simply wire up some tests (or just use some of ours) and enjoy the ride to save deployment!

For more details, head on over to the gem’s page on Github. The papers gem provides a convenient implementation and fulfills a critical step in building collaborative software. We’re thrilled to finally make it available!

lucas@newrelic.com'

On the Internal Tools team, Lucas likes building tools to build more tools.

When not coding he is probably practicing memory exercises, learning about learning, and reading cheap sci-fi.

View posts by .

Interested in writing for New Relic Blog? Send us a pitch!