six-updater 0.10.11 → 0.11.2

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.10.11'
15
+ s.version = '0.11.2'
16
16
  s.has_rdoc = true
17
17
  s.extra_rdoc_files = ['README', 'LICENSE']
18
18
  s.summary = 'Your summary here'
@@ -6,9 +6,15 @@ module Six
6
6
  module Updater
7
7
  PID_FILE = File.join(BASE_PATH, "#{COMPONENT}.pid")
8
8
  if not defined?(Ocra)
9
+ #Signal.trap("EXIT") { exit_app }
10
+ #Signal.trap("INT") { exit_app }
11
+ #Signal.trap("TERM") { exit_app }
12
+ #Signal.trap("KILL") { exit_app }
13
+
9
14
  if File.exist?(PID_FILE)
10
15
  log.error "The program seems to be already running. Please wait/close the other application first."
11
16
  log.info "If you believe this is in error, please delete #{PID_FILE}"
17
+ log.info "If the file doesn't exist, you are probably NOT running this software 'As Administrator'"
12
18
  sleep 15
13
19
  Process.exit
14
20
  end
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.10.11'
47
+ VERSION = '0.11.2'
48
48
  COMPONENT = 'six-updater'
49
49
 
50
50
  # Configuration
@@ -90,7 +90,7 @@ module Six
90
90
  bpath.gsub!('/', '\\')
91
91
  tpath = "#{File.join(bpath, 'tools')};#{File.join(bpath, 'tools', 'bin')}"
92
92
  tpath.gsub!('/', '\\')
93
- ENV['PATH'] = "#{ENV['PATH']};#{bpath};#{tpath}"
93
+ ENV['PATH'] = "#{bpath};#{tpath};#{ENV['PATH']}"
94
94
 
95
95
  # Create config hash with default settings
96
96
  @config = Hash.new
@@ -145,6 +145,11 @@ module Six
145
145
  @@log
146
146
  end
147
147
 
148
+ def exit_app
149
+ FileUtils.rm_f PID_FILE
150
+ exit
151
+ end
152
+
148
153
  def wait
149
154
  STDIN.gets
150
155
  end
@@ -292,7 +297,7 @@ module Six
292
297
  unless @config[:git_path] == 'PATH'
293
298
  path = @config[:git_path].clone
294
299
  path.gsub!('/','\\')
295
- ENV['PATH'] = "#{ENV['PATH']};#{path}" if path.size > 0 #unless ENV['PATH'][/git/] # ??
300
+ ENV['PATH'] = "#{path};#{ENV['PATH']}" if path.size > 0 #unless ENV['PATH'][/git/] # ??
296
301
  end
297
302
 
298
303
  log.info "Using Git at: #{@config[:git_path]}"
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.11
4
+ version: 0.11.2
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-07 00:00:00 +01:00
12
+ date: 2009-12-09 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency