Commits

Michael Granger committed 9fc5ac3

Updated for recent versions of RSpec.

  • Participants
  • Parent commits 967cb7c

Comments (0)

Files changed (2)

 
 	self.developer 'Michael Granger', 'ged@FaerieMUD.org'
 
-	self.extra_dev_deps.push *{
-		'rspec'      => '~> 2.4.0',
-		'linkparser' => '~> 1.1.0',
-		'wordnet'    => '~> 0.99.0',
-	}
+	self.dependency 'rspec', '~> 2.6.0', :development
+	self.dependency 'linkparser', '~> 1.1.0', :development
+	self.dependency 'wordnet', '~> 0.99.0', :development
 
 	self.spec_extras[:licenses] = ["BSD"]
-    self.spec_extras[:signing_key] = '/Volumes/Keys/ged-private_gem_key.pem'
 	self.spec_extras[:post_install_message] = [
 			"This library also presents tie-ins for the 'linkparser' and",
 			"'wordnet' libraries, which you can enable by installing the",
 		  ].join( "\n" )
 
 	self.require_ruby_version( '>=1.9.2' )
-	self.hg_sign_tags = true if self.respond_to?( :hg_sign_tags= )
-	self.yard_opts = [ '--use-cache', '--protected', '--verbose' ] if
-		self.respond_to?( :yard_opts= )
 end
 
 ENV['VERSION'] ||= hoespec.spec.version.to_s
 
-begin
-	include Hoe::MercurialHelpers
+task 'hg:precheckin' => :spec
 
-	task 'hg:precheckin' => :spec
-
-	### Task: prerelease
-	desc "Append the package build number to package versions"
-	task :pre do
-		rev = get_numeric_rev()
-		trace "Current rev is: %p" % [ rev ]
-		hoespec.spec.version.version << "pre#{rev}"
-		Rake::Task[:gem].clear
-
-		Gem::PackageTask.new( hoespec.spec ) do |pkg|
-			pkg.need_zip = true
-			pkg.need_tar = true
-		end
+### Make the ChangeLog update if the repo has changed since it was last built
+file '.hg/branch'
+file 'ChangeLog' => '.hg/branch' do |task|
+	content = begin
+		$stderr.puts "Updating the changelog..."
+		make_changelog()
+	rescue NoMethodError
+		abort "This task requires the hoe-mercurial plugin (gem install hoe-mercurial)."
 	end
 
-	### Make the ChangeLog update if the repo has changed since it was last built
-	file '.hg/branch'
-	file 'ChangeLog' => '.hg/branch' do |task|
-		$stderr.puts "Updating the changelog..."
-		content = make_changelog()
-		File.open( task.name, 'w', 0644 ) do |fh|
-			fh.print( content )
-		end
+	File.open( task.name, 'w', 0644 ) do |fh|
+		fh.print( content )
 	end
-
-	# Rebuild the ChangeLog immediately before release
-	task :prerelease => 'ChangeLog'
-
-rescue NameError => err
-	task :no_hg_helpers do
-		fail "Couldn't define the :pre task: %s: %s" % [ err.class.name, err.message ]
-	end
-
-	task :pre => :no_hg_helpers
-	task 'ChangeLog' => :no_hg_helpers
-
 end
 
+# Rebuild the ChangeLog immediately before release
+task :prerelease => 'ChangeLog'
+

File spec/lib/helpers.rb

 
 end
 
-### Mock with Rspec
-Rspec.configure do |c|
+### Mock with RSpec
+RSpec.configure do |c|
 	c.mock_with( :rspec )
 	c.include( Linguistics::SpecHelpers )
 end