2 # Simple module to manage vendored code.
4 # To vendor a library simply download its whole git repo or untar
5 # into vendor/libraryname and create a load_libraryname.rb file
6 # to add its libdir into the $:.
8 # Once you have that file, add a require line in vendor/require_vendored.rb
9 # which will run after all the load_* files.
11 # The intention is to not change vendored libraries and to eventually
12 # make adding them in optional so that distros can simply adjust their
13 # packaging to exclude this directory and the various load_xxx.rb scripts
14 # if they wish to install these gems as native packages.
18 File.join([File.dirname(File.expand_path(__FILE__)), "vendor"])
22 Log.debug("Loading vendored #{$1}")
23 load "#{vendor_dir}/#{entry}"
27 require 'mcollective/vendor/require_vendored'
31 Dir.entries(vendor_dir).each do |entry|
32 if entry.match(/load_(\w+?)\.rb$/)