Rakefile in loggability-0.11.0 vs Rakefile in loggability-0.12.0.pre20161212115530

- old
+ new

@@ -11,11 +11,10 @@ GEMSPEC = 'loggability.gemspec' Hoe.plugin :mercurial Hoe.plugin :signing Hoe.plugin :deveiate -Hoe.plugin :bundler Hoe.plugins.delete :rubyforge hoespec = Hoe.spec 'loggability' do self.readme_file = 'README.rdoc' @@ -38,39 +37,45 @@ end ENV['VERSION'] ||= hoespec.spec.version.to_s # Ensure the specs pass before checking in -task 'hg:precheckin' => [ :check_history, 'bundler:gemfile', :check_manifest, :spec ] +task 'hg:precheckin' => [ :check_history, :check_manifest, :gemspec, :spec ] desc "Build a coverage report" task :coverage do ENV["COVERAGE"] = 'yes' Rake::Task[:spec].invoke end +CLOBBER.include( 'coverage' ) + # Use the fivefish formatter for docs generated from development checkout if File.directory?( '.hg' ) require 'rdoc/task' Rake::Task[ 'docs' ].clear RDoc::Task.new( 'docs' ) do |rdoc| rdoc.main = "README.rdoc" rdoc.rdoc_files.include( "*.rdoc", "ChangeLog", "lib/**/*.rb" ) rdoc.generator = :fivefish + rdoc.title = 'Loggability' rdoc.rdoc_dir = 'doc' end end task :gemspec => GEMSPEC -file GEMSPEC => __FILE__ do |task| - spec = $hoespec.spec - spec.files.delete( '.gemtest' ) - spec.version = "#{spec.version}.pre#{Time.now.strftime("%Y%m%d%H%M%S")}" +file GEMSPEC => [ __FILE__, 'lib/loggability.rb' ] +task GEMSPEC do |task| + hoespec = $hoespec.spec + hoespec.files.delete( '.gemtest' ) + hoespec.signing_key = nil + hoespec.version = "#{hoespec.version.bump}.0.pre#{Time.now.strftime("%Y%m%d%H%M%S")}" + hoespec.cert_chain = [ 'certs/ged.pem' ] File.open( task.name, 'w' ) do |fh| - fh.write( spec.to_ruby ) + fh.write( hoespec.to_ruby ) end end -task :default => :gemspec +CLOBBER.include( GEMSPEC.to_s )