Commits

Michael Granger  committed 003b25c

Update docs, add exit!.

  • Participants
  • Parent commits f4502cd

Comments (0)

Files changed (11)

 ^\.yardoc/
 docs/.*\.dump$
 ^release\.notes$
+doc/
+# .rvm.gems generated gem export file. Note that any env variable settings will be missing. Append these after using a ';' field separator
+
+hoe-deveiate -v0.1.1
+simplecov -v0.6.4
+rspec -v2.11.0
+
+#!/usr/bin/env bash
+
+# This is an RVM Project .rvmrc file, used to automatically load the ruby
+# development environment upon cd'ing into the directory
+
+environment_id="ruby-1.9.3@sysexits"
+
+if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
+	&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]; then
+	echo "Using ${environment_id}"
+	. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
+
+	if [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]]; then
+		. "${rvm_path:-$HOME/.rvm}/hooks/after_use"
+	fi
+else
+	# If the environment file has not yet been created, use the RVM CLI to select.
+	if ! rvm --create use  "$environment_id"
+		then
+		echo "Failed to create RVM environment '${environment_id}'."
+		exit 1
+	fi
+fi
+
+filename=".rvm.gems"
+if [[ -s "$filename" ]]; then
+	rvm gemset import "$filename"
+fi

File History.md

-## 1.0.2 [2010-12-22] Michael Granger <ged@FaerieMUD.org>
-
-Converted to RSpec 2, Hoe.
-
-
-## 1.0.1 [2010-10-14] Michael Granger <ged@FaerieMUD.org>
-
-Fixes for Ruby 1.9.2.
-
-
-## 1.0.0 [2010-06-19] Michael Granger <ged@FaerieMUD.org>
-
-Initial release.
-
-

File History.rdoc

+== v1.1.0 [2012-09-18] Michael Granger <ged@FaerieMUD.org>
+
+Updated docs, added Sysexits::exit!, removed YARD cruft (ick!).
+
+
+== v1.0.2 [2010-12-22] Michael Granger <ged@FaerieMUD.org>
+
+Converted to RSpec 2, Hoe.
+
+
+== v1.0.1 [2010-10-14] Michael Granger <ged@FaerieMUD.org>
+
+Fixes for Ruby 1.9.2.
+
+
+== v1.0.0 [2010-06-19] Michael Granger <ged@FaerieMUD.org>
+
+Initial release.
+
+

File Manifest.txt

+ChangeLog
+History.rdoc
 LICENSE
-README.md
+Manifest.txt
+README.rdoc
 Rakefile
 lib/sysexits.rb
 spec/sysexits_spec.rb

File README.md

-# sysexits
-
-* http://deveiate.org/sysexits.html
-
-## Description
-
-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 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!
-
-Sysexits is a _completely awesome_ collection of human-readable constants for
-the standard (BSDish) exit codes, used as arguments to `Kernel.exit` to
-indicate a specific error condition to the parent process.
-
-It's so fantastically fabulous that you'll want to fork it right away to avoid
-being thought of as that guy that's still using Webrick for his blog. I mean,
-`exit(1)` is so passé! This is like the 14-point font of Systems Programming.
-
-Like the C header file from which this was derived (I mean forked, naturally),
-error numbers begin at `Sysexits::EX__BASE` (which is way more cool than plain
-old '64') to reduce the possibility of clashing with other exit statuses that
-other programs may already return.
-
-The codes are available in two forms: as constants which can be imported into
-your own namespace via `include Sysexits`, or as `Sysexits::STATUS_CODES`, a
-Hash keyed by Symbols derived from the constant names.
-
-Allow me to demonstrate. First, the old way:
-
-    exit( 69 ) 
-
-Whaaa...? Is that a euphemism? What's going on? See how unattractive and...
-well, 1970 that is? We're not changing vaccuum tubes here, people, we're
-_building a totally-awesome future in the Cloud™!_
-
-    include Sysexits
-    exit EX_UNAVAILABLE
-
-Okay, at least this is readable to people who have used fork() more than
-twice, but you could do so much better!
-
-    include Sysexits
-    exit :unavailable
-
-Holy Toledo! It's like we're writing Ruby, but our own made-up dialect in
-which variable++ is possible! Well, okay, it's not quite that cool. But it
-does look more Rubyish. And no monkeys were patched in the filming of this
-episode! All the simpletons still exiting with icky *numbers* can still
-continue blithely along, none the wiser.
-
-## Contributing
-
-You can clone the source with Mercurial, submit bug reports, suggestions, 
-etc., via the project page:
-
-    https://bitbucket.org/ged/sysexits
-
-Or if you prefer Git, you can clone the source via its Github mirror:
-
-    https://github.com/ged/sysexits
-
-After checking out the source, run:
-
-    $ rake newb
-
-This task will install any missing dependencies, run the tests/specs,
-and generate the RDoc.
-
-You can read more super-exited pointless marketing at:
-
-    http://deveiate.org/sysexits.html
-
-Or maybe not.
-
-
-## License
-
-Copyright (c) 2010, Michael Granger
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice,
-  this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-
-* Neither the name of the author/s, nor the names of the project's
-  contributors may be used to endorse or promote products derived from this
-  software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+= sysexits
+
+project:: https://bitbucket.org/ged/sysexits
+github:: https://github.com/ged/sysexits
+docs:: http://deveiate.org/code/sysexits
+
+
+== Description
+
+Have you ever wanted to call <code>exit()</code> with an error condition, but
+weren't sure what exit status to use? No? Maybe it's just me, then.
+
+Anyway, I was reading manpages late one evening before retiring to bed in my
+palatial estate in rural Oregon, and I stumbled across
+<code>sysexits(3)</code>. Much to my chagrin, I couldn't find a +sysexits+ for
+Ruby! Well, for the other 2 people that actually care about
+<code>style(9)</code> as it applies to Ruby code, now there is one!
+
+Sysexits is a *completely* *awesome* collection of human-readable constants for
+the standard (BSDish) exit codes, used as arguments to +exit+ to
+indicate a specific error condition to the parent process.
+
+It's so fantastically fabulous that you'll want to fork it right away to avoid
+being thought of as that guy that's still using Webrick for his blog. I mean,
+<code>exit(1)</code> is so passé! This is like the 14-point font of Systems
+Programming.
+
+Like the C header file from which this was derived (I mean forked, naturally),
+error numbers begin at <code>Sysexits::EX__BASE</code> (which is way more cool
+than plain old +64+) to reduce the possibility of clashing with other exit
+statuses that other programs may already return.
+
+The codes are available in two forms: as constants which can be imported into
+your own namespace via <code>include Sysexits</code>, or as
+<code>Sysexits::STATUS_CODES</code>, a Hash keyed by Symbols derived from the
+constant names.
+
+Allow me to demonstrate. First, the old way:
+
+    exit( 69 )
+
+Whaaa...? Is that a euphemism? What's going on? See how unattractive and...
+well, 1970 that is? We're not changing vaccuum tubes here, people, we're
+<em>building a totally-awesome future in the Cloud™!</em>
+
+    include Sysexits
+    exit EX_UNAVAILABLE
+
+Okay, at least this is readable to people who have used <code>fork()</code>
+more than twice, but you could do so much better!
+
+    include Sysexits
+    exit :unavailable
+
+Holy Toledo! It's like we're writing Ruby, but our own made-up dialect in
+which variable++ is possible! Well, okay, it's not quite that cool. But it
+does look more Rubyish. And no monkeys were patched in the filming of this
+episode! All the simpletons still exiting with icky _numbers_ can still
+continue blithely along, none the wiser.
+
+== Caveats
+
+At some point, Apple started including their own +sysexits+ library in
++vendor_ruby+, so to load the gem version on a MacOS X 10.7+ box, you need to
+do:
+
+    gem 'sysexits'
+	require 'sysexits'
+
+It's a bit ugly, but there isn't a whole lot I can do about it. Sorry.
+
+
+== Contributing
+
+You can clone the source with Mercurial, submit bug reports, suggestions,
+etc., via the project page:
+
+    https://bitbucket.org/ged/sysexits
+
+Or if you prefer Git, you can clone the source via its Github mirror:
+
+    https://github.com/ged/sysexits
+
+After checking out the source, run:
+
+    $ rake newb
+
+This task will install any missing dependencies, run the tests/specs,
+and generate the RDoc.
+
+You can read more super-exited pointless marketing at:
+
+    http://deveiate.org/sysexits.html
+
+Or maybe not.
+
+
+== License
+
+Copyright (c) 2010-2012, Michael Granger
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice,
+  this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* Neither the name of the author/s, nor the names of the project's
+  contributors may be used to endorse or promote products derived from this
+  software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 require 'hoe'
 
+Hoe.plugin :deveiate
 Hoe.plugin :mercurial
-Hoe.plugin :yard
 Hoe.plugin :signing
 
 Hoe.plugins.delete :rubyforge
 
 hoespec = Hoe.spec 'sysexits' do
-	self.readme_file = 'README.md'
+	self.readme_file = 'README.rdoc'
+	self.history_file = 'History.rdoc'
+	self.extra_rdoc_files = FileList[ '*.rdoc' ]
+	self.spec_extras[:rdoc_options] = ['-f', 'fivefish', '-t', 'Sysexits']
 
 	self.developer 'Michael Granger', 'ged@FaerieMUD.org'
 
-	self.extra_dev_deps <<
-		['rspec', '~> 2.1.0']
+	self.dependency 'rspec', '~> 2.11', :developer
+	self.dependency 'simplecov', '~> 0.6', :developer
 
 	self.spec_extras[:licenses] = ["BSD"]
 	self.spec_extras[:post_install_message] = %{
 		Get ready to be amazed. I'll bet you can't wait to Exit Like 
 		a Pro®!
-		
+
 		Well, if you want, you can do it right from the command-line! Check 
 		this out:
-			
+
 		  ruby -rubygems -e \\
 		    'require "sysexits"; include Sysexits; exit :software_error' \\
 		    || echo $?
 
 	}.gsub( /^\t+/m, '' )
 
-	self.spec_extras[:signing_key] = '/Volumes/Keys/ged-private_gem_key.pem'
-
 	self.require_ruby_version( '>=1.8.7' )
 	self.hg_sign_tags = true if self.respond_to?( :hg_sign_tags )
-
-	self.yard_opts = [ '--use-cache', '--protected', '--verbose' ]
 	self.rdoc_locations << "deveiate:/usr/local/www/public/code/#{remote_rdoc_dir}"
 end
 
 ENV['VERSION'] ||= hoespec.spec.version.to_s
 
-begin
-	include Hoe::MercurialHelpers
+# Run the tests before checking in
+task 'hg:precheckin' => [ :check_history, :check_manifest, :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
+# Rebuild the ChangeLog immediately before release
+task :prerelease => 'ChangeLog'
+CLOBBER.include( 'ChangeLog' )
 
-		Gem::PackageTask.new( hoespec.spec ) do |pkg|
-			pkg.need_zip = true
-			pkg.need_tar = true
-		end
-	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
-	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
-
+desc "Build a coverage report"
+task :coverage do
+	ENV["COVERAGE"] = 'yes'
+	Rake::Task[:spec].invoke
 end
 

File lib/sysexits.rb

 #!/usr/bin/env ruby
 
 # = sysexits
-# 
+#
 # Exit status codes for system programs.
-# 
-# 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 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!
-# 
+#
+# == Usage
+#
+# To support running on a Mac running OS X 10.7 or later, you'll
+# need to force the gem first in the load path to avoid Apple's
+# own helpfully vendored 'sysexits' library:
+#
+#    gem 'sysexits'
+#    require 'sysexits'
+#
+# You can look up the appropriate code yourself, and exit using
+# the regular exit method, of course:
+#
+#    status_code = Sysexits.exit_status( :success )
+#    exit( status_code )
+#
+# Or, just use Sysexits::exit with the code name:
+#
+#    Sysexits.exit( :usage )
+#
+# Or, mix the enhanced ::exit into your namespace:
+#
+#    include Sysexits
+#    exit( :unavailable )
+#
+# It also supports #exit! in all the same ways as above.
+#
+#
 # == License
-# 
+#
 # This file was derived almost entirely from the BSD sysexits.h, which
 # is distributed under the following license:
 #
 # Copyright (c) 1987, 1993
 # The Regents of the University of California.  All rights reserved.
-# 
+#
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
 # are met:
-# 
+#
 # 1. Redistributions of source code must retain the above copyright
 #    notice, this list of conditions and the following disclaimer.
 # 2. Redistributions in binary form must reproduce the above copyright
 # 4. Neither the name of the University nor the names of its contributors
 #    may be used to endorse or promote products derived from this software
 #    without specific prior written permission.
-# 
+#
 # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 module Sysexits
 
 	# The library version
-	VERSION = '1.0.2'
+	VERSION = '1.1.0'
 
 	# The library's revision id
 	REVISION = %q$Revision$
 
 
-	# 
+	#
 	# The constants
-	# 
+	#
 
-	# Successful termination
+	# <b>:ok,</b> <b>:success</b> - Successful termination
 	EX_OK          = 0
 
-
-	# The base value for sysexit codes
+	# <b>:_base</b> - The base value for sysexit codes
 	EX__BASE       = 64
 
-	# The command was used incorrectly, e.g., with the wrong number of
-	# arguments, a bad flag, a bad syntax in a parameter, or whatever.
+	# <b>:usage</b> - The command was used incorrectly, e.g., with the wrong
+	# number of arguments, a bad flag, a bad syntax in a parameter, or whatever.
 	EX_USAGE       = 64
 
-	# The input data was incorrect in some way. This should only be used 
-	# for user data, not system files.
+	# <b>:dataerr,</b> <b>:data_error</b> - The input data was incorrect in
+	# some way. This should only be used for user data, not system files.
 	EX_DATAERR     = 65
 
-	# An input file (not a system file) did not exist or was not readable.
-	# This could also include errors like "No message" to a mailer (if
-	# it cared to catch it).
+	# <b>:noinput,</b> <b>:input_missing</b> - An input file (not a system
+	# file) did not exist or was not readable. This could also include errors
+	# like "No message" to a mailer (if it cared to catch it).
 	EX_NOINPUT     = 66
 
-	# The user specified did not exist.  This might be used for mail
-	# addresses or remote logins.
+	# <b>:nouser,</b> <b>:no_such_user</b> - The user specified did not exist. 
+	# This might be used for mail addresses or remote logins.
 	EX_NOUSER      = 67
 
-	# The host specified did not exist.  This is used in mail addresses
-	# or network requests.
+	# <b>:nohost,</b> <b>:no_such_host</b> - The host specified did not exist. 
+	# This is used in mail addresses or network requests.
 	EX_NOHOST      = 68
 
-	# A service is unavailable.  This can occur if a support program or
-	# file does not exist.  This can also be used as a catchall message
-	# when something you wanted to do doesn't work, but you don't know
-	# why.
+	# <b>:unavailable,</b> <b>:service_unavailable</b> - A service is
+	# unavailable.  This can occur if a support program or file does not exist.
+	# This can also be used as a catchall message when something you wanted to
+	# do doesn't work, but you don't know why.
 	EX_UNAVAILABLE = 69
 
-	# An internal software error has been detected. This should be limited
-	# to non-operating system related errors.
+	# <b>:software,</b> <b>:software_error</b> - An internal software error has
+	# been detected. This should be limited to non-operating system related
+	# errors.
 	EX_SOFTWARE    = 70
 
-	# An operating system error has been detected.  This is intended to
-	# be used for such things as "cannot fork", "cannot create pipe", or
-	# the like.  It includes things like getuid returning a user that
-	# does not exist in the passwd file.
+	# <b>:oserr,</b> <b>:operating_system_error</b> - An operating system error
+	# has been detected.  This is intended to be used for such things as
+	# "cannot fork", "cannot create pipe", or the like.  It includes things
+	# like getuid returning a user that does not exist in the passwd file.
 	EX_OSERR       = 71
 
-	# Some system file (e.g., /etc/passwd, /etc/utmp, etc.) does not
-	# exist, cannot be opened, or has some sort of error (e.g., syntax
-	# error).
+	# <b>:osfile,</b> <b>:operating_system_file_error</b> - Some system file
+	# (e.g., /etc/passwd, /etc/utmp, etc.) does not exist, cannot be opened, or
+	# has some sort of error (e.g., syntax error).
 	EX_OSFILE      = 72
 
-	# A (user specified) output file cannot be created.
+	# <b>:cantcreat,</b> <b>:cant_create_output</b> - A (user specified) output
+	# file cannot be created.
 	EX_CANTCREAT   = 73
 
-	# An error occurred while doing I/O on a file.
+	# <b>:ioerr</b> - An error occurred while doing I/O on a file.
 	EX_IOERR       = 74
 
-	# Temporary failure, indicating something that is not really a serious
-	# error.  In sendmail, this means that a mailer (e.g.) could not
-	# create a connection, and the request should be reattempted later.
+	# <b>:tempfail,</b> <b>:temporary_failure,</b> <b>:try_again</b> - Temporary
+	# failure, indicating something that is not really a serious error.  In
+	# sendmail, this means that a mailer (e.g.) could not create a connection,
+	# and the request should be reattempted later.
 	EX_TEMPFAIL    = 75
 
-	# The remote system returned something that was "not possible" during
-	# a protocol exchange.
+	# <b>:protocol,</b> <b>:protocol_error</b> - The remote system returned
+	# something that was "not possible" during a protocol exchange.
 	EX_PROTOCOL    = 76
 
-	# You did not have sufficient permission to perform the operation.
-	# This is not intended for file system problems, which should use
-	# NOINPUT or CANTCREAT, but rather for higher level permissions.
+	# <b>:noperm,</b> <b>:permission_denied</b> - You did not have sufficient
+	# permission to perform the operation. This is not intended for file
+	# system problems, which should use NOINPUT or CANTCREAT, but rather
+	# for higher level permissions.
 	EX_NOPERM      = 77
 
-	# There was an error in a user-specified configuration value.
+	# <b>:config,</b> <b>:config_error</b> - There was an error in a
+	# user-specified configuration value.
 	EX_CONFIG      = 78
 
 
-	# The maximum listed value. Automatically determined because, well, we can
-	# and I'll forget to update this if I ever add any codes.
+	# <b>:_max</b> - The maximum listed value. Automatically determined
+	# because, well, we can and I'll forget to update this if I ever add
+	# any codes.
 	EX__MAX = constants.
 		select {|name| name =~ /^EX_/ }.
 		collect {|name| self.const_get(name) }.max
 	module_function
 	###############
 
-	### Enhanced exit! 
-	### @param [Symbol, String, Fixnum] status  the exit status, which can be either one of the 
-	###                                         keys of STATUS_CODES or a number.
+	### Turn +status+ into a numeric exit status and return it.
+	def exit_status( status )
+		case status
+		when Symbol, String
+			return STATUS_CODES[ status.to_sym ] || status
+		else
+			return status
+		end
+	end
+
+
+	### Exit with the exit +status+, which can be either one of the
+	### keys of STATUS_CODES or a number.
 	def exit( status=EX_OK )
-		status = case status
-		         when Symbol, String
-		         	STATUS_CODES[ status.to_sym ] or
-		         		raise "unknown status %p" % [ status ]
-		         else
-		         	status
-		         end
+		status = exit_status( status )
+		::Kernel.exit( status )
+	end
 
-		::Kernel.exit( status )
+
+	### Exit with the given +status+ without running exit handlers.
+	def exit!( status=EX_OK )
+		status = exit_status( status )
+		::Kernel.exit!( status )
 	end
 
 end # module Sysexits

File project.yml

---- 
-excluded_pkgfiles: []
-
-project_pubdir: /usr/local/www/public/code/
-project_pubhost: deveiate.org
-project_homepage: http://rubygems.org/gems/sysexits
-gem_pubhost: rubygems.org
-project_requirements: {}
-
-release_smtphost: mail.faeriemud.org
-project_description: |-
-  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 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!
-release_mailto: Ruby-Talk List <ruby-talk@ruby-lang.org>
-project_dependencies: {}
-
-project_summary: Exit status codes for system programs.
-version_file: sysexits.rb
-additional_pkgfiles: []
-
-dev_dependencies: {}
-authors: 
-  Michael Granger: ged@FaerieMUD.org
-post_install_message: Happy exiting!
-project_name: sysexits