Make it easy to search for and include vendor gem paths in Sprockets
Go to file
Tim Linquist 8bb51f0227 Use backwards compatible rubygems api
Following Bundler's lead, use loaded_specs api to look for possible
javascript / stylesheets to inform Sprockets of in
jasmine-headless-webkit.
2012-07-31 10:00:42 -07:00
lib Use backwards compatible rubygems api 2012-07-31 10:00:42 -07:00
spec Use backwards compatible rubygems api 2012-07-31 10:00:42 -07:00
.gitignore initial commit 2012-02-06 13:51:21 -05:00
Gemfile initial commit 2012-02-06 13:51:21 -05:00
LICENSE initial commit 2012-02-06 13:51:21 -05:00
README.md readme 2012-02-08 08:49:29 -05:00
Rakefile initial commit 2012-02-06 13:51:21 -05:00
sprockets-vendor_gems.gemspec Include rake in gemspec (available to bundle exec) 2012-07-31 09:46:38 -07:00

README.md

Get at available assets in loaded gems in Sprockets

Either get the list of asset paths:

require 'sprockets-vendor_gems'

env = Sprockets::Environment.new('.')
Sprockets.find_gem_vendor_paths(:for => :javascript).each do |path|
  env.append_path path
end

or get an Environment with those paths in there already:

require 'sprockets-vendor_gems'

env = Sprockets::EnvironmentWithVendoredGems.new

Yeah!

Installation

Add this line to your application's Gemfile:

gem 'sprockets-vendor_gems'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sprockets-vendor_gems