death 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README +21 -1
  2. data/VERSION +1 -1
  3. data/bin/death +11 -1
  4. data/death.gemspec +2 -2
  5. metadata +2 -2
data/README CHANGED
@@ -1,3 +1,23 @@
1
- = Operating environment
1
+ = death
2
+
3
+ kill command wrapper. say "DEATH" with death voice.
4
+
5
+ == INSTALL
6
+
7
+ gem install death
8
+
9
+ == SYNOPSIS
10
+
11
+ death [-s signal_name] pid ...
12
+ death -l [exit_status]
13
+ death -signal_name pid ...
14
+ death -signal_number pid ...
15
+
16
+ == Operating environment
17
+
2
18
  MacOS X (only)
3
19
 
20
+ == LICENCE
21
+
22
+ MIT
23
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.0
data/bin/death CHANGED
@@ -1,5 +1,15 @@
1
1
  #!/usr/bin/env ruby
2
+ require 'open3'
2
3
 
3
4
  10.times { system('say -v Ralph deeeeeeeeeeeattttth &') }
4
- system "kill #{ARGV.join(' ')}"
5
5
 
6
+ raise 'death command is supporting only MacOS X.' unless RUBY_PLATFORM =~ /darwin/
7
+
8
+ Open3.popen3("kill #{ARGV.join(' ')}") do |stdin, stdout, stderr|
9
+ msg = stderr.read
10
+ if msg =~ /kill: illegal process id: kill/
11
+ puts 'death: illegal process id: kill'
12
+ else
13
+ puts "#{msg.gsub(/kill/, 'death')}"
14
+ end
15
+ end
data/death.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{death}
8
- s.version = "0.2.0"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["koic"]
12
- s.date = %q{2012-03-29}
12
+ s.date = %q{2012-03-30}
13
13
  s.description = %q{kill command wrapper. say "DEATH" with death voice. Operating environment is MacOS X only.}
14
14
  s.email = %q{koic.ito@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: death
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-29 00:00:00.000000000 +09:00
12
+ date: 2012-03-30 00:00:00.000000000 +09:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
  description: kill command wrapper. say "DEATH" with death voice. Operating environment