Permalink
Browse files

If gem vendored, add it to load paths instead of activating

  • Loading branch information...
1 parent 80e3df1 commit 74e369cb0d9a00ce1b827988ba30127063d3be14 @winton committed Jan 3, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/gem_template/gems.rb
View
5 lib/gem_template/gems.rb
@@ -38,7 +38,10 @@ def activate(*gems)
gems.flatten.collect(&:to_sym).each do |name|
version = @versions[name]
- if defined?(gem)
+ vendor = File.expand_path("../../../vendor/#{name}/lib", __FILE__)
+ if File.exists?(vendor)
+ $:.unshift vendor
+ elsif defined?(gem)
gem name.to_s, version
else
puts "#{name} #{"(#{version})" if version} failed to activate" if @config.warn

0 comments on commit 74e369c

Please sign in to comment.