Rakefile in sysexits-1.0.0 vs Rakefile in sysexits-1.0.1

- old
+ new

@@ -16,10 +16,11 @@ basedir = Pathname.new( __FILE__ ).dirname libdir = basedir + "lib" extdir = libdir + Config::CONFIG['sitearch'] + $LOAD_PATH.unshift( basedir.to_s ) unless $LOAD_PATH.include?( basedir.to_s ) $LOAD_PATH.unshift( libdir.to_s ) unless $LOAD_PATH.include?( libdir.to_s ) $LOAD_PATH.unshift( extdir.to_s ) unless $LOAD_PATH.include?( extdir.to_s ) } begin @@ -61,11 +62,11 @@ MANUALDIR = DOCSDIR + 'manual' PROJECT_NAME = 'sysexits' PKG_NAME = PROJECT_NAME.downcase -PKG_SUMMARY = 'A Ruby front end to sysexits.h' +PKG_SUMMARY = 'Exit status codes for system programs.' # Cruisecontrol stuff CC_BUILD_LABEL = ENV['CC_BUILD_LABEL'] CC_BUILD_ARTIFACTS = ENV['CC_BUILD_ARTIFACTS'] || 'artifacts' @@ -74,11 +75,11 @@ PKG_VERSION = VERSION_FILE.read[ /VERSION\s*=\s*['"](\d+\.\d+\.\d+)['"]/, 1 ] + '.' + buildrev elsif VERSION_FILE.exist? PKG_VERSION = VERSION_FILE.read[ /VERSION\s*=\s*['"](\d+\.\d+\.\d+)['"]/, 1 ] end -PKG_VERSION = '0.0.0' unless defined?( PKG_VERSION ) +PKG_VERSION = '0.0.0' unless defined?( PKG_VERSION ) && !PKG_VERSION.nil? PKG_FILE_NAME = "#{PKG_NAME.downcase}-#{PKG_VERSION}" GEM_FILE_NAME = "#{PKG_FILE_NAME}.gem" # Universal VCS constants @@ -166,11 +167,11 @@ require RAKE_TASKDIR + 'helpers.rb' include RakefileHelpers # Set the build ID if the mercurial executable is available if hg = which( 'hg' ) - id = IO.read('|-') or exec hg.to_s, 'id', '-n' + id = `#{hg} id -n`.chomp PKG_BUILD = "pre%03d" % [(id.chomp[ /^[[:xdigit:]]+/ ] || '1')] else PKG_BUILD = 'pre000' end SNAPSHOT_PKG_NAME = "#{PKG_FILE_NAME}.#{PKG_BUILD}" @@ -206,10 +207,12 @@ PROJECT_PUBDIR = '/usr/local/www/public/code/' PROJECT_DOCDIR = "#{PROJECT_PUBDIR}/#{PKG_NAME}" PROJECT_SCPPUBURL = "#{PROJECT_HOST}:#{PROJECT_PUBDIR}" PROJECT_SCPDOCURL = "#{PROJECT_HOST}:#{PROJECT_DOCDIR}" +GEM_PUBHOST = 'rubygems.org' + # Gem dependencies: gemname => version DEPENDENCIES = { } # Developer Gem dependencies: gemname => version @@ -222,11 +225,10 @@ 'rspec' => '>= 1.2.6', 'ruby-termios' => '>= 0.9.6', 'text-format' => '>= 1.0.0', 'tmail' => '>= 1.2.3.1', 'diff-lcs' => '>= 1.1.2', - 'rake-compiler' => '>=0', } # Non-gem requirements: packagename => version REQUIREMENTS = { } @@ -236,17 +238,18 @@ gem.name = PKG_NAME.downcase gem.version = PKG_VERSION gem.summary = PKG_SUMMARY gem.description = [ - "Have you ever wanted to call exit() with an error condition, but weren't sure what", - "number to use? No? Maybe it's just me, then.", + "Have you ever wanted to call exit() with an error condition, but", + "weren't sure what exit status to use? No? Maybe it's just me, then.", "", - "Anyway, I was reading W. Richard Stephens's book _Advanced Programming in the UNIX Environment_, and", - "I wanted to make my program exit with a reasonable exit code just like his C examples, but much", - "to my chagrin, I couldn't find a 'sysexits' for Ruby! Well, for the other 2 people that actually", - "care about this kind of thing, now there is!", + "Anyway, I was reading manpages late one evening before retiring to ", + "bed in my palatial estate in rural Oregon, and I stumbled across ", + "sysexits(3). Much to my chagrin, I couldn't find a 'sysexits' for", + "Ruby! Well, for the other 2 people that actually care about style(9) ", + "as it applies to Ruby code, now there is one!", ].join( "\n" ) gem.post_install_message = [ "Happy exiting!", ].join( "\n" ) @@ -267,9 +270,13 @@ gem.extensions << EXTCONF.relative_path_from( BASEDIR ).to_s end gem.files = RELEASE_FILES gem.test_files = SPEC_FILES + + # signing key and certificate chain + gem.signing_key = '/Volumes/Keys/ged-private_gem_key.pem' + gem.cert_chain = [File.expand_path('~/.gem/ged-public_gem_cert.pem')] DEPENDENCIES.each do |name, version| version = '>= 0' if version.length.zero? gem.add_runtime_dependency( name, version ) end