sysexits 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -53,10 +53,10 @@
53
53
  module Sysexits
54
54
 
55
55
  # The library version
56
- VERSION = '1.0.1'
56
+ VERSION = '1.0.2'
57
57
 
58
58
  # The library's revision id
59
- REVISION = %q$Revision: abfbf4b067bd $
59
+ REVISION = %q$Revision: bbab3d3bc005 $
60
60
 
61
61
 
62
62
  #
@@ -8,7 +8,7 @@ BEGIN {
8
8
  $LOAD_PATH.unshift( libdir.to_s ) unless $LOAD_PATH.include?( libdir.to_s )
9
9
  }
10
10
 
11
- require 'spec'
11
+ require 'rspec'
12
12
  require 'sysexits'
13
13
 
14
14
  describe Sysexits do
@@ -44,7 +44,7 @@ describe Sysexits do
44
44
  end
45
45
 
46
46
 
47
- it "overrides Kernel.exit without patching any monkeys" do
47
+ it "overrides Kernel.exit without patching any monkeys. I mean freedoms. Or something." do
48
48
  monkey = Class.new do
49
49
  include Sysexits
50
50
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sysexits
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Granger
@@ -35,19 +35,88 @@ cert_chain:
35
35
  cmlhXe46pZNJgWKbxZah85jIjx95hR8vOI+NAM5iH9kOqK13DrxacTKPhqj5PjwF
36
36
  -----END CERTIFICATE-----
37
37
 
38
- date: 2010-10-14 00:00:00 -07:00
38
+ date: 2010-12-22 00:00:00 -08:00
39
39
  default_executable:
40
- dependencies: []
41
-
42
- description: |-
43
- Have you ever wanted to call exit() with an error condition, but
44
- weren't sure what exit status to use? No? Maybe it's just me, then.
45
-
46
- Anyway, I was reading manpages late one evening before retiring to
47
- bed in my palatial estate in rural Oregon, and I stumbled across
48
- sysexits(3). Much to my chagrin, I couldn't find a 'sysexits' for
49
- Ruby! Well, for the other 2 people that actually care about style(9)
50
- as it applies to Ruby code, now there is one!
40
+ dependencies:
41
+ - !ruby/object:Gem::Dependency
42
+ name: hoe-yard
43
+ prerelease: false
44
+ requirement: &id001 !ruby/object:Gem::Requirement
45
+ none: false
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ hash: 31
50
+ segments:
51
+ - 0
52
+ - 1
53
+ - 2
54
+ version: 0.1.2
55
+ type: :development
56
+ version_requirements: *id001
57
+ - !ruby/object:Gem::Dependency
58
+ name: rspec
59
+ prerelease: false
60
+ requirement: &id002 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ~>
64
+ - !ruby/object:Gem::Version
65
+ hash: 11
66
+ segments:
67
+ - 2
68
+ - 1
69
+ - 0
70
+ version: 2.1.0
71
+ type: :development
72
+ version_requirements: *id002
73
+ - !ruby/object:Gem::Dependency
74
+ name: hoe
75
+ prerelease: false
76
+ requirement: &id003 !ruby/object:Gem::Requirement
77
+ none: false
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ hash: 47
82
+ segments:
83
+ - 2
84
+ - 8
85
+ - 0
86
+ version: 2.8.0
87
+ type: :development
88
+ version_requirements: *id003
89
+ description: "Have you ever wanted to call exit() with an error condition, but weren't sure\n\
90
+ what exit status to use? No? Maybe it's just me, then.\n\n\
91
+ Anyway, I was reading manpages late one evening before retiring to bed in my\n\
92
+ palatial estate in rural Oregon, and I stumbled across sysexits(3). Much to my\n\
93
+ chagrin, I couldn't find a 'sysexits' for Ruby! Well, for the other 2 people\n\
94
+ that actually care about style(9) as it applies to Ruby code, now there is\n\
95
+ one!\n\n\
96
+ Sysexits is a _completely awesome_ collection of human-readable constants for\n\
97
+ the standard (BSDish) exit codes, used as arguments to `Kernel.exit` to\n\
98
+ indicate a specific error condition to the parent process.\n\n\
99
+ It's so fantastically fabulous that you'll want to fork it right away to avoid\n\
100
+ being thought of as that guy that's still using Webrick for his blog. I mean,\n\
101
+ `exit(1)` is so pass\xC3\xA9! This is like the 14-point font of Systems Programming.\n\n\
102
+ Like the C header file from which this was derived (I mean forked, naturally),\n\
103
+ error numbers begin at `Sysexits::EX__BASE` (which is way more cool than plain\n\
104
+ old '64') to reduce the possibility of clashing with other exit statuses that\n\
105
+ other programs may already return.\n\n\
106
+ The codes are available in two forms: as constants which can be imported into\n\
107
+ your own namespace via `include Sysexits`, or as `Sysexits::STATUS_CODES`, a\n\
108
+ Hash keyed by Symbols derived from the constant names.\n\n\
109
+ Allow me to demonstrate. First, the old way:\n\n exit( 69 ) \n\n\
110
+ Whaaa...? Is that a euphemism? What's going on? See how unattractive and...\n\
111
+ well, 1970 that is? We're not changing vaccuum tubes here, people, we're\n\
112
+ _building a totally-awesome future in the Cloud\xE2\x84\xA2!_\n\n include Sysexits\n exit EX_UNAVAILABLE\n\n\
113
+ Okay, at least this is readable to people who have used fork() more than\n\
114
+ twice, but you could do so much better!\n\n include Sysexits\n exit :unavailable\n\n\
115
+ Holy Toledo! It's like we're writing Ruby, but our own made-up dialect in\n\
116
+ which variable++ is possible! Well, okay, it's not quite that cool. But it\n\
117
+ does look more Rubyish. And no monkeys were patched in the filming of this\n\
118
+ episode! All the simpletons still exiting with icky *numbers* can still\n\
119
+ continue blithely along, none the wiser."
51
120
  email:
52
121
  - ged@FaerieMUD.org
53
122
  executables: []
@@ -55,40 +124,31 @@ executables: []
55
124
  extensions: []
56
125
 
57
126
  extra_rdoc_files:
58
- - ChangeLog
59
- - README.md
60
- - LICENSE
127
+ - History.md
61
128
  files:
62
- - Rakefile
63
- - ChangeLog
64
- - README.md
65
129
  - LICENSE
66
- - spec/sysexits_spec.rb
130
+ - README.md
131
+ - Rakefile
67
132
  - lib/sysexits.rb
68
- - rake/191_compat.rb
69
- - rake/dependencies.rb
70
- - rake/documentation.rb
71
- - rake/helpers.rb
72
- - rake/hg.rb
73
- - rake/manual.rb
74
- - rake/packaging.rb
75
- - rake/publishing.rb
76
- - rake/style.rb
77
- - rake/svn.rb
78
- - rake/testing.rb
79
- - rake/verifytask.rb
80
- has_rdoc: true
81
- homepage: http://rubygems.org/gems/sysexits
82
- licenses: []
83
-
84
- post_install_message: Happy exiting!
133
+ - spec/sysexits_spec.rb
134
+ - History.md
135
+ has_rdoc: yard
136
+ homepage: http://deveiate.org/sysexits.html
137
+ licenses:
138
+ - BSD
139
+ post_install_message: "\n\
140
+ Get ready to be amazed. I'll bet you can't wait to Exit Like \n\
141
+ a Pro\xC2\xAE!\n\n\
142
+ Well, if you want, you can do it right from the command-line! Check \n\
143
+ this out:\n\n ruby -rubygems -e \\\n 'require \"sysexits\"; include Sysexits; exit :software_error' \\\n || echo $?\n\n\
144
+ I know, I know: so awesome right? Okay, I'll let you bask in the\n\
145
+ warn glow of superior systems-programming now.\n\n"
85
146
  rdoc_options:
86
- - --tab-width=4
87
- - --show-hash
88
- - --include
89
- - .
90
- - --main=README.md
91
- - --title=sysexits
147
+ - --use-cache
148
+ - --protected
149
+ - --verbose
150
+ - --title
151
+ - Sysexits Documentation
92
152
  require_paths:
93
153
  - lib
94
154
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -96,10 +156,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
156
  requirements:
97
157
  - - ">="
98
158
  - !ruby/object:Gem::Version
99
- hash: 3
159
+ hash: 57
100
160
  segments:
101
- - 0
102
- version: "0"
161
+ - 1
162
+ - 8
163
+ - 7
164
+ version: 1.8.7
103
165
  required_rubygems_version: !ruby/object:Gem::Requirement
104
166
  none: false
105
167
  requirements:
@@ -111,10 +173,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
173
  version: "0"
112
174
  requirements: []
113
175
 
114
- rubyforge_project:
176
+ rubyforge_project: sysexits
115
177
  rubygems_version: 1.3.7
116
178
  signing_key:
117
179
  specification_version: 3
118
- summary: Exit status codes for system programs.
119
- test_files:
120
- - spec/sysexits_spec.rb
180
+ summary: 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
181
+ test_files: []
182
+
metadata.gz.sig CHANGED
Binary file
data/ChangeLog DELETED
File without changes
@@ -1,26 +0,0 @@
1
- # 1.9.1 fixes
2
-
3
-
4
- # Make Pathname compatible with 1.8.7 Pathname.
5
- unless Pathname.instance_methods.include?( :=~ )
6
- class Pathname
7
- def self::glob( *args ) # :yield: p
8
- args = args.collect {|p| p.to_s }
9
- if block_given?
10
- Dir.glob(*args) {|f| yield self.new(f) }
11
- else
12
- Dir.glob(*args).map {|f| self.new(f) }
13
- end
14
- end
15
-
16
- def =~( other )
17
- self.to_s =~ other
18
- end
19
-
20
- def to_str
21
- self.to_s
22
- end
23
- end
24
- end
25
-
26
-
@@ -1,76 +0,0 @@
1
- #
2
- # Dependency-checking and Installation Rake Tasks
3
-
4
- #
5
-
6
- require 'rubygems/dependency_installer'
7
- require 'rubygems/source_index'
8
- require 'rubygems/requirement'
9
- require 'rubygems/doc_manager'
10
-
11
- ### Install the specified +gems+ if they aren't already installed.
12
- def install_gems( gems )
13
-
14
- defaults = Gem::DependencyInstaller::DEFAULT_OPTIONS.merge({
15
- :generate_rdoc => true,
16
- :generate_ri => true,
17
- :install_dir => Gem.dir,
18
- :format_executable => false,
19
- :test => false,
20
- :version => Gem::Requirement.default,
21
- })
22
-
23
- # Check for root
24
- if Process.euid != 0
25
- $stderr.puts "This probably won't work, as you aren't root, but I'll try anyway"
26
- end
27
-
28
- gemindex = Gem::SourceIndex.from_installed_gems
29
-
30
- gems.each do |gemname, reqstring|
31
- requirement = Gem::Requirement.new( reqstring )
32
- trace "requirement is: %p" % [ requirement ]
33
-
34
- trace "Searching for an installed #{gemname}..."
35
- specs = gemindex.find_name( gemname )
36
- trace "...found %d specs: %s" %
37
- [ specs.length, specs.collect {|s| "%s %s" % [s.name, s.version] }.join(', ') ]
38
-
39
- if spec = specs.find {|spec| requirement.satisfied_by?(spec.version) }
40
- log "Version %s of %s is already installed (needs %s); skipping..." %
41
- [ spec.version, spec.name, requirement ]
42
- next
43
- end
44
-
45
- rgv = Gem::Version.new( Gem::RubyGemsVersion )
46
- installer = nil
47
-
48
- log "Trying to install #{gemname.inspect} #{requirement}..."
49
- if rgv >= Gem::Version.new( '1.1.1' )
50
- installer = Gem::DependencyInstaller.new
51
- installer.install( gemname, requirement )
52
- else
53
- installer = Gem::DependencyInstaller.new( gemname )
54
- installer.install
55
- end
56
-
57
- installer.installed_gems.each do |spec|
58
- log "Installed: %s" % [ spec.full_name ]
59
- end
60
-
61
- end
62
- end
63
-
64
-
65
- ### Task: install runtime dependencies
66
- desc "Install runtime dependencies as gems"
67
- task :install_dependencies do
68
- install_gems( DEPENDENCIES )
69
- end
70
-
71
- ### Task: install gems for development tasks
72
- desc "Install development dependencies as gems"
73
- task :install_dev_dependencies do
74
- install_gems( DEVELOPMENT_DEPENDENCIES )
75
- end
76
-
@@ -1,123 +0,0 @@
1
- #
2
- # Documentation Rake tasks
3
- #
4
-
5
- require 'rake/clean'
6
-
7
-
8
- # Append docs/lib to the load path if it exists for documentation
9
- # helpers.
10
- DOCSLIB = DOCSDIR + 'lib'
11
- $LOAD_PATH.unshift( DOCSLIB.to_s ) if DOCSLIB.exist?
12
-
13
- # Make relative string paths of all the stuff we need to generate docs for
14
- DOCFILES = Rake::FileList[ LIB_FILES + EXT_FILES + GEMSPEC.extra_rdoc_files ]
15
-
16
- # Documentation coverage constants
17
- COVERAGE_DIR = BASEDIR + 'coverage'
18
- COVERAGE_REPORT = COVERAGE_DIR + 'documentation.txt'
19
-
20
-
21
- # Prefer YARD, fallback to RDoc
22
- begin
23
- require 'yard'
24
- require 'yard/rake/yardoc_task'
25
-
26
- # Undo the lazy-assed monkeypatch yard/globals.rb installs and
27
- # re-install them as mixins as they should have been from the
28
- # start
29
- # <metamonkeypatch>
30
- class Object
31
- remove_method :log
32
- remove_method :P
33
- end
34
-
35
- module YardGlobals
36
- def P(namespace, name = nil)
37
- namespace, name = nil, namespace if name.nil?
38
- YARD::Registry.resolve(namespace, name, false, true)
39
- end
40
-
41
- def log
42
- YARD::Logger.instance
43
- end
44
- end
45
-
46
- class YARD::CLI::Base; include YardGlobals; end
47
- class YARD::CLI::Command; include YardGlobals; end
48
- class YARD::Parser::SourceParser; extend YardGlobals; include YardGlobals; end
49
- class YARD::Parser::CParser; include YardGlobals; end
50
- class YARD::CodeObjects::Base; include YardGlobals; end
51
- class YARD::Handlers::Base; include YardGlobals; end
52
- class YARD::Handlers::Processor; include YardGlobals; end
53
- class YARD::Serializers::Base; include YardGlobals; end
54
- class YARD::RegistryStore; include YardGlobals; end
55
- class YARD::Docstring; include YardGlobals; end
56
- module YARD::Templates::Helpers::ModuleHelper; include YardGlobals; end
57
- module YARD::Templates::Helpers::HtmlHelper; include YardGlobals; end
58
-
59
- if vvec(RUBY_VERSION) >= vvec("1.9.1")
60
- # Monkeypatched to allow more than two '#' characters at the beginning
61
- # of the comment line.
62
- # Patched from yard-0.5.8
63
- require 'yard/parser/ruby/ruby_parser'
64
- class YARD::Parser::Ruby::RipperParser < Ripper
65
- def on_comment(comment)
66
- visit_ns_token(:comment, comment)
67
- case comment
68
- when /\A# @group\s+(.+)\s*\Z/
69
- @groups.unshift [lineno, $1]
70
- return
71
- when /\A# @endgroup\s*\Z/
72
- @groups.unshift [lineno, nil]
73
- return
74
- end
75
-
76
- comment = comment.gsub(/^\#+\s{0,1}/, '').chomp
77
- append_comment = @comments[lineno - 1]
78
-
79
- if append_comment && @comments_last_column == column
80
- @comments.delete(lineno - 1)
81
- comment = append_comment + "\n" + comment
82
- end
83
-
84
- @comments[lineno] = comment
85
- @comments_last_column = column
86
- end
87
- end # class YARD::Parser::Ruby::RipperParser
88
- end
89
-
90
- # </metamonkeypatch>
91
-
92
- YARD_OPTIONS = [] unless defined?( YARD_OPTIONS )
93
-
94
- yardoctask = YARD::Rake::YardocTask.new( :apidocs ) do |task|
95
- task.files = DOCFILES
96
- task.options = YARD_OPTIONS
97
- task.options << '--debug' << '--verbose' if $trace
98
- end
99
- yardoctask.before = lambda {
100
- trace "Calling yardoc like:",
101
- " yardoc %s" % [ quotelist(yardoctask.options + yardoctask.files).join(' ') ]
102
- }
103
-
104
- YARDOC_CACHE = BASEDIR + '.yardoc'
105
- CLOBBER.include( YARDOC_CACHE.to_s )
106
-
107
- rescue LoadError
108
- require 'rdoc/task'
109
-
110
- desc "Build API documentation in #{API_DOCSDIR}"
111
- RDoc::Task.new( :apidocs ) do |task|
112
- task.main = "README"
113
- task.rdoc_files.include( DOCFILES )
114
- task.rdoc_dir = API_DOCSDIR.to_s
115
- task.options = RDOC_OPTIONS
116
- end
117
- end
118
-
119
- # Need the DOCFILES to exist to build the API docs
120
- task :apidocs => DOCFILES
121
-
122
- CLEAN.include( API_DOCSDIR.to_s )
123
-