Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removing rspec rake requirement

  • Loading branch information...
commit db40128f874acd247d276e32968743eeba2835c1 1 parent 7d56265
@winton authored
Showing with 12 additions and 3 deletions.
  1. +5 −1 Rakefile
  2. +7 −2 lib/gem_template/gems.rb
View
6 Rakefile
@@ -3,7 +3,11 @@ require File.dirname(__FILE__) + '/lib/gem_template/gems'
GemTemplate::Gems.activate %w(rake rspec)
require 'rake'
-require 'spec/rake/spectask'
+
+begin
+ require 'spec/rake/spectask'
+rescue Exception => e
+end
def gemspec
@gemspec ||= begin
View
9 lib/gem_template/gems.rb
@@ -39,12 +39,17 @@ def activate(*gems)
gems.flatten.collect { |g| g.to_sym }.each do |name|
version = @versions[name]
vendor = File.expand_path("../../../vendor/#{name}/lib", __FILE__)
+ warning = "#{name} #{"(#{version})" if version} failed to activate"
if File.exists?(vendor)
$:.unshift vendor
elsif defined?(gem)
- gem name.to_s, version
+ begin
+ gem name.to_s, version
+ rescue Exception => e
+ puts warning if @config.warn
+ end
else
- puts "#{name} #{"(#{version})" if version} failed to activate" if @config.warn
+ puts warning if @config.warn
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.