je 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/bin/je +12 -6
- data/lib/je/version.rb +1 -1
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/bin/je
CHANGED
@@ -2,11 +2,8 @@
|
|
2
2
|
require 'optparse'
|
3
3
|
require 'timeout'
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
opt.on('-v') { |v| $verbose = true }
|
8
|
-
argv = opt.parse(ARGV)
|
9
|
-
if argv.length == 0
|
5
|
+
# Help
|
6
|
+
def usage
|
10
7
|
puts <<END
|
11
8
|
Usage: je [ARGS]...
|
12
9
|
|
@@ -16,6 +13,15 @@ END
|
|
16
13
|
exit
|
17
14
|
end
|
18
15
|
|
16
|
+
# Option parsing
|
17
|
+
$verbose = false
|
18
|
+
usage() if ARGV.length == 0
|
19
|
+
if ARGV[0] == '-v'
|
20
|
+
$verbose = true
|
21
|
+
ARGV = ARGV[1..-1]
|
22
|
+
end
|
23
|
+
usage() if ARGV.length == 0
|
24
|
+
|
19
25
|
# Set ENV for preloading jemalloc
|
20
26
|
lib_dir = File.expand_path('../lib/', File.dirname(__FILE__))
|
21
27
|
if File.exists? (lib_dir + "/jemalloc.so")
|
@@ -48,7 +54,7 @@ trap("TERM") { puts "SIGTERM received"; terminate_gracefully pid }
|
|
48
54
|
|
49
55
|
# exec(2)
|
50
56
|
if pid.nil? then
|
51
|
-
Kernel.exec *
|
57
|
+
Kernel.exec *ARGV
|
52
58
|
else
|
53
59
|
pid, status = Process.wait2
|
54
60
|
Kernel.exit (status.exitstatus || 0)
|
data/lib/je/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: je
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -91,7 +91,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
91
|
version: '0'
|
92
92
|
segments:
|
93
93
|
- 0
|
94
|
-
hash:
|
94
|
+
hash: 1127827269214901943
|
95
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
96
|
none: false
|
97
97
|
requirements:
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
segments:
|
102
102
|
- 0
|
103
|
-
hash:
|
103
|
+
hash: 1127827269214901943
|
104
104
|
requirements: []
|
105
105
|
rubyforge_project:
|
106
106
|
rubygems_version: 1.8.24
|