Browse files

Merge branch 'master' into rails

  • Loading branch information...
winton committed Mar 20, 2011
2 parents e1b839b + db40128 commit 2629d1616a46ab827f4d13c6c90c3ad5f6b0dad9
Showing with 12 additions and 3 deletions.
  1. +5 −1 Rakefile
  2. +7 −2 lib/gem_template/gems.rb
@@ -3,7 +3,11 @@ require File.dirname(__FILE__) + '/lib/gem_template/gems'
GemTemplate::Gems.activate %w(rake rspec) GemTemplate::Gems.activate %w(rake rspec)
require 'rake' require 'rake'
require 'spec/rake/spectask'
require 'spec/rake/spectask'
rescue Exception => e
def gemspec def gemspec
@gemspec ||= begin @gemspec ||= begin
@@ -39,12 +39,17 @@ def activate(*gems)
gems.flatten.collect { |g| g.to_sym }.each do |name| gems.flatten.collect { |g| g.to_sym }.each do |name|
version = @versions[name] version = @versions[name]
vendor = File.expand_path("../../../vendor/#{name}/lib", __FILE__) vendor = File.expand_path("../../../vendor/#{name}/lib", __FILE__)
warning = "#{name} #{"(#{version})" if version} failed to activate"
if File.exists?(vendor) if File.exists?(vendor)
$:.unshift vendor $:.unshift vendor
elsif defined?(gem) elsif defined?(gem)
gem name.to_s, version begin
gem name.to_s, version
rescue Exception => e
puts warning if @config.warn
else else
puts "#{name} #{"(#{version})" if version} failed to activate" if @config.warn puts warning if @config.warn
end end
end end
end end

0 comments on commit 2629d16

Please sign in to comment.