sysexits 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/ChangeLog +41 -2
- data/History.rdoc +5 -0
- data/Rakefile +0 -15
- data/lib/sysexits.rb +4 -4
- metadata +170 -183
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 90e2a532b00661937b3ea2a8e64eab5fb23aa6fb
|
4
|
+
data.tar.gz: a28624e04fef79b4067a4f86388c2fb3bf65dc30
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a565cc4130447651acec8fc10606ece3c2efffb3bf8b39b0489926bbda6dc664f5202c4981a6dfe2cdf5c3c4873d7c0ec29e45bf5dc97c72e0e3d5719712dd19
|
7
|
+
data.tar.gz: 12296344dca09c520d2119996941d46a28f62e31924bd4f7cc7f1431cceaa923db2dba45be69ef53b259e169ce60675a938e4aa9f68c25748602e01809c7f52a
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/ChangeLog
CHANGED
@@ -1,12 +1,51 @@
|
|
1
|
+
2014-08-08 Michael Granger <ged@FaerieMUD.org>
|
2
|
+
|
3
|
+
* Rakefile:
|
4
|
+
Remove the post-install message. 😢
|
5
|
+
[6395823d3d92] [tip]
|
6
|
+
|
7
|
+
* History.md, README.md, Rakefile, project.yml:
|
8
|
+
Merged with 9696db8c5bf9
|
9
|
+
[1cbfa89d296d]
|
10
|
+
|
11
|
+
2012-09-18 Michael Granger <ged@FaerieMUD.org>
|
12
|
+
|
13
|
+
* .hgtags:
|
14
|
+
Added tag v1.1.0 for changeset 2be7ed2d3669
|
15
|
+
[bbe65e080037]
|
16
|
+
|
17
|
+
* .hgsigs:
|
18
|
+
Added signature for changeset 2b88de1e7380
|
19
|
+
[2be7ed2d3669] [v1.1.0]
|
20
|
+
|
21
|
+
* .hgtags:
|
22
|
+
Added tag semver for changeset d0f0419db01c
|
23
|
+
[2b88de1e7380]
|
24
|
+
|
25
|
+
* .hgignore, .rvm.gems, .rvmrc, History.md, History.rdoc,
|
26
|
+
Manifest.txt, README.md, README.rdoc, Rakefile, lib/sysexits.rb,
|
27
|
+
project.yml:
|
28
|
+
Update docs, add exit!.
|
29
|
+
[003b25c84462]
|
30
|
+
|
31
|
+
2014-08-08 Michael Granger <ged@FaerieMUD.org>
|
32
|
+
|
33
|
+
* Rakefile:
|
34
|
+
Critical bugfix.
|
35
|
+
|
36
|
+
Thanks to Matt Greensmith for spotting this! I'm clearly not ready
|
37
|
+
to Exit Like a Pro™ yet.
|
38
|
+
[9696db8c5bf9]
|
39
|
+
|
1
40
|
2010-12-22 Michael Granger <ged@FaerieMUD.org>
|
2
41
|
|
3
42
|
* .hgtags:
|
4
43
|
Added tag v1.0.2 for changeset d0f0419db01c
|
5
|
-
[f4502cd6a855]
|
44
|
+
[f4502cd6a855]
|
6
45
|
|
7
46
|
* .hgsigs:
|
8
47
|
Added signature for changeset 2baa1e0251b7
|
9
|
-
[d0f0419db01c] [v1.0.2]
|
48
|
+
[d0f0419db01c] [semver, v1.0.2]
|
10
49
|
|
11
50
|
* README.md:
|
12
51
|
Point to the Bitbucket page for project stuff.
|
data/History.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -21,21 +21,6 @@ hoespec = Hoe.spec 'sysexits' do
|
|
21
21
|
self.dependency 'simplecov', '~> 0.6', :developer
|
22
22
|
|
23
23
|
self.spec_extras[:licenses] = ["BSD"]
|
24
|
-
self.spec_extras[:post_install_message] = %{
|
25
|
-
Get ready to be amazed. I'll bet you can't wait to Exit Like
|
26
|
-
a Pro®!
|
27
|
-
|
28
|
-
Well, if you want, you can do it right from the command-line! Check
|
29
|
-
this out:
|
30
|
-
|
31
|
-
ruby -rubygems -e \\
|
32
|
-
'require "sysexits"; include Sysexits; exit :software_error' \\
|
33
|
-
|| echo $?
|
34
|
-
|
35
|
-
I know, I know: so awesome right? Okay, I'll let you bask in the
|
36
|
-
warn glow of superior systems-programming now.
|
37
|
-
|
38
|
-
}.gsub( /^\t+/m, '' )
|
39
24
|
|
40
25
|
self.require_ruby_version( '>=1.8.7' )
|
41
26
|
self.hg_sign_tags = true if self.respond_to?( :hg_sign_tags )
|
data/lib/sysexits.rb
CHANGED
@@ -71,10 +71,10 @@
|
|
71
71
|
module Sysexits
|
72
72
|
|
73
73
|
# The library version
|
74
|
-
VERSION = '1.
|
74
|
+
VERSION = '1.2.0'
|
75
75
|
|
76
76
|
# The library's revision id
|
77
|
-
REVISION = %q$Revision:
|
77
|
+
REVISION = %q$Revision: 8d7b699637cf $
|
78
78
|
|
79
79
|
|
80
80
|
#
|
@@ -100,11 +100,11 @@ module Sysexits
|
|
100
100
|
# like "No message" to a mailer (if it cared to catch it).
|
101
101
|
EX_NOINPUT = 66
|
102
102
|
|
103
|
-
# <b>:nouser,</b> <b>:no_such_user</b> - The user specified did not exist.
|
103
|
+
# <b>:nouser,</b> <b>:no_such_user</b> - The user specified did not exist.
|
104
104
|
# This might be used for mail addresses or remote logins.
|
105
105
|
EX_NOUSER = 67
|
106
106
|
|
107
|
-
# <b>:nohost,</b> <b>:no_such_host</b> - The host specified did not exist.
|
107
|
+
# <b>:nohost,</b> <b>:no_such_host</b> - The host specified did not exist.
|
108
108
|
# This is used in mail addresses or network requests.
|
109
109
|
EX_NOHOST = 68
|
110
110
|
|
metadata
CHANGED
@@ -1,178 +1,182 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: sysexits
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 1
|
9
|
-
- 0
|
10
|
-
version: 1.1.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.2.0
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Michael Granger
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
|
-
cert_chain:
|
10
|
+
cert_chain:
|
17
11
|
- |
|
18
12
|
-----BEGIN CERTIFICATE-----
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
13
|
+
MIIDbDCCAlSgAwIBAgIBATANBgkqhkiG9w0BAQUFADA+MQwwCgYDVQQDDANnZWQx
|
14
|
+
GTAXBgoJkiaJk/IsZAEZFglGYWVyaWVNVUQxEzARBgoJkiaJk/IsZAEZFgNvcmcw
|
15
|
+
HhcNMTQwMzE5MDQzNTI2WhcNMTUwMzE5MDQzNTI2WjA+MQwwCgYDVQQDDANnZWQx
|
16
|
+
GTAXBgoJkiaJk/IsZAEZFglGYWVyaWVNVUQxEzARBgoJkiaJk/IsZAEZFgNvcmcw
|
17
|
+
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDb92mkyYwuGBg1oRxt2tkH
|
18
|
+
+Uo3LAsaL/APBfSLzy8o3+B3AUHKCjMUaVeBoZdWtMHB75X3VQlvXfZMyBxj59Vo
|
19
|
+
cDthr3zdao4HnyrzAIQf7BO5Y8KBwVD+yyXCD/N65TTwqsQnO3ie7U5/9ut1rnNr
|
20
|
+
OkOzAscMwkfQxBkXDzjvAWa6UF4c5c9kR/T79iA21kDx9+bUMentU59aCJtUcbxa
|
21
|
+
7kcKJhPEYsk4OdxR9q2dphNMFDQsIdRO8rywX5FRHvcb+qnXC17RvxLHtOjysPtp
|
22
|
+
EWsYoZMxyCDJpUqbwoeiM+tAHoz2ABMv3Ahie3Qeb6+MZNAtMmaWfBx3dg2u+/WN
|
23
|
+
AgMBAAGjdTBzMAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBSZ0hCV
|
24
|
+
qoHr122fGKelqffzEQBhszAcBgNVHREEFTATgRFnZWRARmFlcmllTVVELm9yZzAc
|
25
|
+
BgNVHRIEFTATgRFnZWRARmFlcmllTVVELm9yZzANBgkqhkiG9w0BAQUFAAOCAQEA
|
26
|
+
TuL1Bzl6TBs1YEzEubFHb9XAPgehWzzUudjDKzTRd+uyZmxnomBqTCQjT5ucNRph
|
27
|
+
3jZ6bhLNooLQxTjIuHodeGcEMHZdt4Yi7SyPmw5Nry12z6wrDp+5aGps3HsE5WsQ
|
28
|
+
Zq2EuyEOc96g31uoIvjNdieKs+1kE+K+dJDjtw+wTH2i63P7r6N/NfPPXpxsFquo
|
29
|
+
wcYRRrHdR7GhdJeT+V8Q8Bi5bglCUGdx+8scMgkkePc98k9osQHypbACmzO+Bqkv
|
30
|
+
c7ZKPJcWBv0sm81+FCZXNACn2f9jfF8OQinxVs0O052KbGuEQaaiGIYeuuwQE2q6
|
31
|
+
ggcrPfcYeTwWlfZPu2LrBg==
|
36
32
|
-----END CERTIFICATE-----
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
- !ruby/object:Gem::Dependency
|
33
|
+
date: 2014-08-08 00:00:00.000000000 Z
|
34
|
+
dependencies:
|
35
|
+
- !ruby/object:Gem::Dependency
|
41
36
|
name: hoe-mercurial
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
- - ~>
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
hash: 7
|
49
|
-
segments:
|
50
|
-
- 1
|
51
|
-
- 4
|
52
|
-
- 0
|
37
|
+
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
53
41
|
version: 1.4.0
|
54
42
|
type: :development
|
55
|
-
version_requirements: *id001
|
56
|
-
- !ruby/object:Gem::Dependency
|
57
|
-
name: hoe-highline
|
58
43
|
prerelease: false
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
44
|
+
version_requirements: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 1.4.0
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: hoe-highline
|
51
|
+
requirement: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 0.1.0
|
70
56
|
type: :development
|
71
|
-
version_requirements: *id002
|
72
|
-
- !ruby/object:Gem::Dependency
|
73
|
-
name: rdoc
|
74
57
|
prerelease: false
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 0.1.0
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: rdoc
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '4.0'
|
85
70
|
type: :development
|
86
|
-
version_requirements: *id003
|
87
|
-
- !ruby/object:Gem::Dependency
|
88
|
-
name: rspec
|
89
71
|
prerelease: false
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '4.0'
|
77
|
+
- !ruby/object:Gem::Dependency
|
78
|
+
name: rspec
|
79
|
+
requirement: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '2.11'
|
100
84
|
type: :development
|
101
|
-
version_requirements: *id004
|
102
|
-
- !ruby/object:Gem::Dependency
|
103
|
-
name: simplecov
|
104
85
|
prerelease: false
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
86
|
+
version_requirements: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - "~>"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '2.11'
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: simplecov
|
93
|
+
requirement: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - "~>"
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0.6'
|
115
98
|
type: :development
|
116
|
-
version_requirements: *id005
|
117
|
-
- !ruby/object:Gem::Dependency
|
118
|
-
name: hoe
|
119
99
|
prerelease: false
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
100
|
+
version_requirements: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - "~>"
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0.6'
|
105
|
+
- !ruby/object:Gem::Dependency
|
106
|
+
name: hoe
|
107
|
+
requirement: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - "~>"
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '3.9'
|
130
112
|
type: :development
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
<code>
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
113
|
+
prerelease: false
|
114
|
+
version_requirements: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - "~>"
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '3.9'
|
119
|
+
description: |-
|
120
|
+
Have you ever wanted to call <code>exit()</code> with an error condition, but
|
121
|
+
weren't sure what exit status to use? No? Maybe it's just me, then.
|
122
|
+
|
123
|
+
Anyway, I was reading manpages late one evening before retiring to bed in my
|
124
|
+
palatial estate in rural Oregon, and I stumbled across
|
125
|
+
<code>sysexits(3)</code>. Much to my chagrin, I couldn't find a +sysexits+ for
|
126
|
+
Ruby! Well, for the other 2 people that actually care about
|
127
|
+
<code>style(9)</code> as it applies to Ruby code, now there is one!
|
128
|
+
|
129
|
+
Sysexits is a *completely* *awesome* collection of human-readable constants for
|
130
|
+
the standard (BSDish) exit codes, used as arguments to +exit+ to
|
131
|
+
indicate a specific error condition to the parent process.
|
132
|
+
|
133
|
+
It's so fantastically fabulous that you'll want to fork it right away to avoid
|
134
|
+
being thought of as that guy that's still using Webrick for his blog. I mean,
|
135
|
+
<code>exit(1)</code> is so passé! This is like the 14-point font of Systems
|
136
|
+
Programming.
|
137
|
+
|
138
|
+
Like the C header file from which this was derived (I mean forked, naturally),
|
139
|
+
error numbers begin at <code>Sysexits::EX__BASE</code> (which is way more cool
|
140
|
+
than plain old +64+) to reduce the possibility of clashing with other exit
|
141
|
+
statuses that other programs may already return.
|
142
|
+
|
143
|
+
The codes are available in two forms: as constants which can be imported into
|
144
|
+
your own namespace via <code>include Sysexits</code>, or as
|
145
|
+
<code>Sysexits::STATUS_CODES</code>, a Hash keyed by Symbols derived from the
|
146
|
+
constant names.
|
147
|
+
|
148
|
+
Allow me to demonstrate. First, the old way:
|
149
|
+
|
150
|
+
exit( 69 )
|
151
|
+
|
152
|
+
Whaaa...? Is that a euphemism? What's going on? See how unattractive and...
|
153
|
+
well, 1970 that is? We're not changing vaccuum tubes here, people, we're
|
154
|
+
<em>building a totally-awesome future in the Cloud™!</em>
|
155
|
+
|
156
|
+
include Sysexits
|
157
|
+
exit EX_UNAVAILABLE
|
158
|
+
|
159
|
+
Okay, at least this is readable to people who have used <code>fork()</code>
|
160
|
+
more than twice, but you could do so much better!
|
161
|
+
|
162
|
+
include Sysexits
|
163
|
+
exit :unavailable
|
164
|
+
|
165
|
+
Holy Toledo! It's like we're writing Ruby, but our own made-up dialect in
|
166
|
+
which variable++ is possible! Well, okay, it's not quite that cool. But it
|
167
|
+
does look more Rubyish. And no monkeys were patched in the filming of this
|
168
|
+
episode! All the simpletons still exiting with icky _numbers_ can still
|
169
|
+
continue blithely along, none the wiser.
|
170
|
+
email:
|
166
171
|
- ged@FaerieMUD.org
|
167
172
|
executables: []
|
168
|
-
|
169
173
|
extensions: []
|
170
|
-
|
171
|
-
extra_rdoc_files:
|
174
|
+
extra_rdoc_files:
|
172
175
|
- History.rdoc
|
173
176
|
- Manifest.txt
|
174
177
|
- README.rdoc
|
175
|
-
files:
|
178
|
+
files:
|
179
|
+
- ".gemtest"
|
176
180
|
- ChangeLog
|
177
181
|
- History.rdoc
|
178
182
|
- LICENSE
|
@@ -181,50 +185,33 @@ files:
|
|
181
185
|
- Rakefile
|
182
186
|
- lib/sysexits.rb
|
183
187
|
- spec/sysexits_spec.rb
|
184
|
-
- .gemtest
|
185
188
|
homepage: https://bitbucket.org/ged/sysexits
|
186
|
-
licenses:
|
189
|
+
licenses:
|
187
190
|
- BSD
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
this out:\n\n ruby -rubygems -e \\\n 'require \"sysexits\"; include Sysexits; exit :software_error' \\\n || echo $?\n\n\
|
193
|
-
I know, I know: so awesome right? Okay, I'll let you bask in the\n\
|
194
|
-
warn glow of superior systems-programming now.\n\n"
|
195
|
-
rdoc_options:
|
196
|
-
- -f
|
191
|
+
metadata: {}
|
192
|
+
post_install_message:
|
193
|
+
rdoc_options:
|
194
|
+
- "-f"
|
197
195
|
- fivefish
|
198
|
-
- -t
|
196
|
+
- "-t"
|
199
197
|
- Sysexits
|
200
|
-
require_paths:
|
198
|
+
require_paths:
|
201
199
|
- lib
|
202
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
203
|
-
|
204
|
-
requirements:
|
200
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
201
|
+
requirements:
|
205
202
|
- - ">="
|
206
|
-
- !ruby/object:Gem::Version
|
207
|
-
hash: 57
|
208
|
-
segments:
|
209
|
-
- 1
|
210
|
-
- 8
|
211
|
-
- 7
|
203
|
+
- !ruby/object:Gem::Version
|
212
204
|
version: 1.8.7
|
213
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
214
|
-
|
215
|
-
requirements:
|
205
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
206
|
+
requirements:
|
216
207
|
- - ">="
|
217
|
-
- !ruby/object:Gem::Version
|
218
|
-
|
219
|
-
segments:
|
220
|
-
- 0
|
221
|
-
version: "0"
|
208
|
+
- !ruby/object:Gem::Version
|
209
|
+
version: '0'
|
222
210
|
requirements: []
|
223
|
-
|
224
211
|
rubyforge_project: sysexits
|
225
|
-
rubygems_version:
|
212
|
+
rubygems_version: 2.2.2
|
226
213
|
signing_key:
|
227
|
-
specification_version:
|
228
|
-
summary: Have you ever wanted to call <code>exit()</code> with an error condition,
|
214
|
+
specification_version: 4
|
215
|
+
summary: Have you ever wanted to call <code>exit()</code> with an error condition,
|
216
|
+
but weren't sure what exit status to use? No? Maybe it's just me, then
|
229
217
|
test_files: []
|
230
|
-
|
metadata.gz.sig
CHANGED
Binary file
|