Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 74e369cb0d9a00ce1b827988ba30127063d3be14 1 parent 80e3df1
@winton authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.