nice-sigint 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +14 -0
- data/README.md +6 -0
- data/Rakefile +6 -0
- data/lib/nice-sigint.rb +13 -0
- metadata +60 -0
data/LICENSE
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
2
|
+
Version 2, December 2004
|
3
|
+
|
4
|
+
Copyright (C) 2013 James Pearson
|
5
|
+
|
6
|
+
Everyone is permitted to copy and distribute verbatim or modified
|
7
|
+
copies of this license document, and changing it is allowed as long
|
8
|
+
as the name is changed.
|
9
|
+
|
10
|
+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
11
|
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
12
|
+
|
13
|
+
0. You just DO WHAT THE FUCK YOU WANT TO.
|
14
|
+
|
data/README.md
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
Ruby will, be default, print out an ugly stack trace when you ctrl-c (that is,
|
2
|
+
send a SIGINT) to a process. This is pretty much never the behavior I want.
|
3
|
+
|
4
|
+
I got tired of copy+pasting the same few lines into every one of my scripts to
|
5
|
+
make this behavior better, so this is instead a gem I can require.
|
6
|
+
|
data/Rakefile
ADDED
data/lib/nice-sigint.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
# May you recognize your weaknesses and share your strengths.
|
5
|
+
# May you share freely, never taking more than you give.
|
6
|
+
# May you find love and love everyone you find.
|
7
|
+
|
8
|
+
# Show prettier output on interrupt (ctrl+c)
|
9
|
+
trap("INT") do |s|
|
10
|
+
puts
|
11
|
+
exit(s)
|
12
|
+
end
|
13
|
+
|
metadata
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: nice-sigint
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.1.0
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- xiongchiamiov
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2013-04-27 00:00:00 -07:00
|
14
|
+
default_executable:
|
15
|
+
dependencies: []
|
16
|
+
|
17
|
+
description: Make Ruby handle SIGINTs in a less-ugly manner.
|
18
|
+
email:
|
19
|
+
- xiong.chiamiov@gmail.com
|
20
|
+
executables: []
|
21
|
+
|
22
|
+
extensions: []
|
23
|
+
|
24
|
+
extra_rdoc_files:
|
25
|
+
- README.md
|
26
|
+
files:
|
27
|
+
- LICENSE
|
28
|
+
- Rakefile
|
29
|
+
- README.md
|
30
|
+
- lib/nice-sigint.rb
|
31
|
+
has_rdoc: true
|
32
|
+
homepage: https://github.com/xiongchiamiov/nice-sigint/
|
33
|
+
licenses: []
|
34
|
+
|
35
|
+
post_install_message:
|
36
|
+
rdoc_options: []
|
37
|
+
|
38
|
+
require_paths:
|
39
|
+
- lib
|
40
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: "0"
|
46
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
47
|
+
none: false
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: "0"
|
52
|
+
requirements: []
|
53
|
+
|
54
|
+
rubyforge_project:
|
55
|
+
rubygems_version: 1.5.3
|
56
|
+
signing_key:
|
57
|
+
specification_version: 3
|
58
|
+
summary: Make Ruby handle SIGINTs in a less-ugly manner.
|
59
|
+
test_files: []
|
60
|
+
|