Bowndler
Integrate bower and bundler, by making bower aware of gem bundles.
NOTE:
- this is experimental, your results may vary
- this readme needs to be updated, we know its light on detail. It is highly recommended that you read the source before using bowndler.
Installation
Add this line to your application's Gemfile:
gem 'bowndler'
And then execute:
$ bundle
Or install it yourself as:
$ gem install bowndler
Setup
- rename bower.json to bower.json.erb
- add
"my_gem": "<%= gem_path('my_gem') %>"to "paths" in the bower.json.erb, for any gem that has its own bower.json - instead of running
bower <command>, runbowndler <command>and bowndler will make sure the bower.json is up to date. e.g.bowndler install
Usage
- In the root of your project run
bowndler update - If your packages are not being updated as expected run
bower cache cleanfirst - If your packages are still not being updated. Delete the
bower_componentsdirectory and try again
Autohook
Bowndler has a somewhat magical "autohook" feature - where bowndler update will run automatically whenever you run a bundle command that could potentially change your Gemfile.lock. This is VERY experimental, and should be used with caution.
To enable it:
- Run
bowndler autohookin the root of your repo. This will modiy your Gemfile, those changes should be committed to source control. - Set
ENABLE_BOWNDLER_HOOK=1in your environment (by addingexport ENABLE_BOWNDLER_HOOK=1to your .bashrc or .bash_profile)
NOTE: Autohook only works reliably on Mac OS X. It currently causes a segfault on both Ruby 1.9.* and 2.* on CentOS (and potentially other Linux distributions as well)
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request