Provides [d3.js|http://d3js.org] and its minimized version as a [Rack Middleware|https://github.com/rack/rack]. The version of this gem is intended to be the same as the version of d3 that is provided. == Usage === Installation + (sudo) gem install rack-d3js === Rack + require 'rack/d3js' + use Rack::D3js + + # run MyApp If you prefer it in a particular path, that works as per Rack: + require 'rack/d3js' + map "/js" do + run Rack::D3js + end === Sinatra If you want to serve d3 directly from a sinatra application, that is also possible: + require 'sinatra' + require 'rack/d3js' + + use Rack::D3js + get '/' do + # ... + end Or with modular sinatra + require 'sinatra/base' + require 'rack/d3js' + + class MyApp < Sinatra::Base + use Rack::D3js + # ... + end