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 CHANGED
@@ -12,7 +12,7 @@ require 'rake/testtask'
12
12
 
13
13
  spec = Gem::Specification.new do |s|
14
14
  s.name = 'six-updater'
15
- s.version = '0.12.2'
15
+ s.version = '0.12.3'
16
16
  s.has_rdoc = true
17
17
  s.extra_rdoc_files = ['README', 'LICENSE']
18
18
  s.summary = 'Your summary here'
@@ -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
- out = %x[tasklist]
16
+ pid = pid.to_i
17
17
  found = false
18
- out.split("\n").each do |line|
19
- line[/\Aruby\.exe[\t| ]*([0-9]*)/]
20
- p = $1
21
- if p
22
- if p.size > 0
23
- pid = pid.to_i
24
- found = true if pid == p.to_i
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
- #end
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
@@ -44,7 +44,7 @@ end
44
44
  module Six
45
45
  # TODO: Evaluate if this module should be a class instead?
46
46
  module Updater
47
- VERSION = '0.12.2'
47
+ VERSION = '0.12.3'
48
48
  COMPONENT = 'six-updater'
49
49
 
50
50
  # Configuration
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.2
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-17 00:00:00 +01:00
12
+ date: 2009-12-18 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency