Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Vendorer keeps your dependencies documented, cached and up to date

branch: master

v0.1.15

latest commit 4892cee087
Michael Grosser authored April 01, 2014
Octocat-spinner-32 bin refactor + tests April 01, 2014
Octocat-spinner-32 lib v0.1.15 April 01, 2014
Octocat-spinner-32 spec refactor + tests April 01, 2014
Octocat-spinner-32 .travis.yml fix travis April 01, 2014
Octocat-spinner-32 Gemfile https April 01, 2014
Octocat-spinner-32 Gemfile.lock v0.1.15 April 01, 2014
Octocat-spinner-32 Rakefile bump-tasks December 02, 2012
Octocat-spinner-32 Readme.md allow Vendorfile.rb as optional config-file name (so we could have sy… April 01, 2014
Octocat-spinner-32 vendorer.gemspec update April 01, 2014
Readme.md

Vendorer

  • documented & cached dependencies
  • automatic updates
  • no unwanted/accidental updates

Install

Ensure you have:

  • Curl
  • Git v1.7+
  • Ruby v1.8.7 or v1.9.2+

then:

$ gem install vendorer

Or add vendorer to your Gemfile:

gem 'vendorer', :group => :development

Usage

Add a Vendorfile (or Vendorfile.rb) to your project root:

file 'vendor/assets/javascripts/jquery.min.js', 'http://code.jquery.com/jquery-latest.min.js'
folder 'vendor/plugins/parallel_tests', 'https://github.com/grosser/parallel_tests.git'

# Execute a block after updates
file 'vendor/assets/javascripts/jquery.js', 'http://code.jquery.com/jquery.js' do |path|
  puts "Do something useful with #{path}"
  rewrite(path) { |content| content.gsub(/\r\n/, \n).gsub /\t/, ' ' }
end

# Checkout a specific :ref/:tag/:branch
folder 'vendor/plugins/parallel_tests', 'https://github.com/grosser/parallel_tests.git', :tag => 'v0.6.10'

# DRY folders
folder 'vendor/assets/javascripts' do
  file 'jquery.js', 'http://code.jquery.com/jquery-latest.js'
end

# Copy files & folders from repos (also works with private repos)
from 'https://github.com/grosser/parallel_tests.git' do |checkout_location|
  file 'Readme.md'
  file 'target-folder/file.rb', 'lib/parallel_tests.rb'
  folder 'spec'
  folder 'renamed-folder', 'spec'
end
  • Create a new Vendorfile: vendorer init
  • excute all installations: vendorer
  • Update all dependencies: vendorer update
  • update a single dependency: vendorer update vendor/assets/javascripts/jquery.min.js
  • update everything in a specific folder: vendorer update vendor/assets/javascripts

Alternatives

  • Vendorificator more features/complexity, but similar interface/concept

TODO

  • nice error message when no Vendorfile was found

Author

Contributors

Michael Grosser
michael@grosser.it
License: MIT
Build Status

Something went wrong with that request. Please try again.