six-updater 0.12.2 → 0.12.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/six/updater-app.rb +13 -9
- data/lib/six/updater.rb +1 -1
- metadata +2 -2
data/Rakefile
CHANGED
data/lib/six/updater-app.rb
CHANGED
@@ -13,18 +13,22 @@ module Six
|
|
13
13
|
|
14
14
|
if File.exist?(PID_FILE)
|
15
15
|
pid = File.open(PID_FILE) {|file| file.read}
|
16
|
-
|
16
|
+
pid = pid.to_i
|
17
17
|
found = false
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
18
|
+
begin
|
19
|
+
out = %x[tasklist]
|
20
|
+
out.split("\n").each do |line|
|
21
|
+
line[/\Aruby\.exe[\t| ]*([0-9]*)/]
|
22
|
+
p = $1
|
23
|
+
if p
|
24
|
+
if p.size > 0
|
25
|
+
found = true if pid == p.to_i
|
26
|
+
end
|
25
27
|
end
|
26
28
|
end
|
27
|
-
|
29
|
+
rescue
|
30
|
+
log.warn "Failed checking tasklist for #{pid}"
|
31
|
+
log.debug "#{$!}"
|
28
32
|
end
|
29
33
|
if found
|
30
34
|
log.error "The program seems to be already running (PID: #{pid}). Please wait/close the other application first."
|
data/lib/six/updater.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: six-updater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sickboy
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-18 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|