six-updater 0.10.4 → 0.10.5

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/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.10.4'
15
+ s.version = '0.10.5'
16
16
  s.has_rdoc = true
17
17
  s.extra_rdoc_files = ['README', 'LICENSE']
18
18
  s.summary = 'Your summary here'
@@ -4,7 +4,16 @@ require 'six/updater'
4
4
  # TODO: Should exec outside the module
5
5
  module Six
6
6
  module Updater
7
+ PID_FILE = File.join(BASE_PATH, "#{COMPONENT}.pid")
7
8
  if not defined?(Ocra)
9
+ if File.exist?(PID_FILE)
10
+ log.error "The program seems to be already running. Please wait/close the other application first."
11
+ log.info "If you believe this is in error, please delete #{PID_FILE}"
12
+ sleep 5
13
+ Process.exit
14
+ end
15
+ File.open(PID_FILE, 'w') {|f| f.puts Process.pid}
16
+
8
17
  initialize
9
18
  mods = []
10
19
  puts
@@ -1,4 +1,4 @@
1
- # encoding: UTF-8
1
+ # encoding: UTF-8
2
2
 
3
3
  require 'yaml'
4
4
  require 'fileutils'
@@ -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.10.4'
47
+ VERSION = '0.10.5'
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.10.4
4
+ version: 0.10.5
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-10-17 00:00:00 +02:00
12
+ date: 2009-10-25 01:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency