{"id":16068125,"url":"https://github.com/ged/sysexits","last_synced_at":"2025-09-15T09:26:16.551Z","repository":{"id":948997,"uuid":"728640","full_name":"ged/sysexits","owner":"ged","description":"Exit status codes for Ruby system programs.","archived":false,"fork":false,"pushed_at":"2014-08-08T20:06:01.000Z","size":143,"stargazers_count":32,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T12:48:01.554Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://bitbucket.org/ged/sysexits/overview","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ged.png","metadata":{"files":{"readme":"README.rdoc","changelog":"History.rdoc","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-06-18T23:02:59.000Z","updated_at":"2023-08-01T19:46:37.000Z","dependencies_parsed_at":"2022-07-05T23:30:45.278Z","dependency_job_id":null,"html_url":"https://github.com/ged/sysexits","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ged/sysexits","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ged%2Fsysexits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ged%2Fsysexits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ged%2Fsysexits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ged%2Fsysexits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ged","download_url":"https://codeload.github.com/ged/sysexits/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ged%2Fsysexits/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263826447,"owners_count":23516763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T06:08:38.721Z","updated_at":"2025-07-05T23:40:40.874Z","avatar_url":"https://github.com/ged.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= sysexits\n\nproject:: https://bitbucket.org/ged/sysexits\ngithub:: https://github.com/ged/sysexits\ndocs:: http://deveiate.org/code/sysexits\n\n\n== Description\n\nHave you ever wanted to call \u003ccode\u003eexit()\u003c/code\u003e with an error condition, but\nweren't sure what exit status to use? No? Maybe it's just me, then.\n\nAnyway, I was reading manpages late one evening before retiring to bed in my\npalatial estate in rural Oregon, and I stumbled across\n\u003ccode\u003esysexits(3)\u003c/code\u003e. Much to my chagrin, I couldn't find a +sysexits+ for\nRuby! Well, for the other 2 people that actually care about\n\u003ccode\u003estyle(9)\u003c/code\u003e as it applies to Ruby code, now there is one!\n\nSysexits is a *completely* *awesome* collection of human-readable constants for\nthe standard (BSDish) exit codes, used as arguments to +exit+ to\nindicate a specific error condition to the parent process.\n\nIt's so fantastically fabulous that you'll want to fork it right away to avoid\nbeing thought of as that guy that's still using Webrick for his blog. I mean,\n\u003ccode\u003eexit(1)\u003c/code\u003e is so passé! This is like the 14-point font of Systems\nProgramming.\n\nLike the C header file from which this was derived (I mean forked, naturally),\nerror numbers begin at \u003ccode\u003eSysexits::EX__BASE\u003c/code\u003e (which is way more cool\nthan plain old +64+) to reduce the possibility of clashing with other exit\nstatuses that other programs may already return.\n\nThe codes are available in two forms: as constants which can be imported into\nyour own namespace via \u003ccode\u003einclude Sysexits\u003c/code\u003e, or as\n\u003ccode\u003eSysexits::STATUS_CODES\u003c/code\u003e, a Hash keyed by Symbols derived from the\nconstant names.\n\nAllow me to demonstrate. First, the old way:\n\n    exit( 69 )\n\nWhaaa...? Is that a euphemism? What's going on? See how unattractive and...\nwell, 1970 that is? We're not changing vaccuum tubes here, people, we're\n\u003cem\u003ebuilding a totally-awesome future in the Cloud™!\u003c/em\u003e\n\n    include Sysexits\n    exit EX_UNAVAILABLE\n\nOkay, at least this is readable to people who have used \u003ccode\u003efork()\u003c/code\u003e\nmore than twice, but you could do so much better!\n\n    include Sysexits\n    exit :unavailable\n\nHoly Toledo! It's like we're writing Ruby, but our own made-up dialect in\nwhich variable++ is possible! Well, okay, it's not quite that cool. But it\ndoes look more Rubyish. And no monkeys were patched in the filming of this\nepisode! All the simpletons still exiting with icky _numbers_ can still\ncontinue blithely along, none the wiser.\n\n== Caveats\n\nAt some point, Apple started including their own +sysexits+ library in\n+vendor_ruby+, so to load the gem version on a MacOS X 10.7+ box, you need to\ndo:\n\n    gem 'sysexits'\n\trequire 'sysexits'\n\nIt's a bit ugly, but there isn't a whole lot I can do about it. Sorry.\n\n\n== Contributing\n\nYou can clone the source with Mercurial, submit bug reports, suggestions,\netc., via the project page:\n\n    https://bitbucket.org/ged/sysexits\n\nOr if you prefer Git, you can clone the source via its Github mirror:\n\n    https://github.com/ged/sysexits\n\nAfter checking out the source, run:\n\n    $ rake newb\n\nThis task will install any missing dependencies, run the tests/specs,\nand generate the RDoc.\n\nYou can read more super-exited pointless marketing at:\n\n    http://deveiate.org/sysexits.html\n\nOr maybe not.\n\n\n== License\n\nCopyright (c) 2010-2012, Michael Granger\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice,\n  this list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* Neither the name of the author/s, nor the names of the project's\n  contributors may be used to endorse or promote products derived from this\n  software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fged%2Fsysexits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fged%2Fsysexits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fged%2Fsysexits/lists"}