six-updater 0.11.4 → 0.11.5

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.11.4'
15
+ s.version = '0.11.5'
16
16
  s.has_rdoc = true
17
17
  s.extra_rdoc_files = ['README', 'LICENSE']
18
18
  s.summary = 'Your summary here'
@@ -255,7 +255,7 @@ module Six
255
255
  if FileTest.exist?(@path)
256
256
  log.warn "WARNING: Folder already exists but seems incompatible. Not installing."
257
257
  else
258
- log.info "Installing (depth: #{@modconfig[:depth]})... This might take a while, please wait."
258
+ log.info "Installing... This might take a while, please wait."
259
259
  folder = ''
260
260
  if @modconfig[:folder][/(.*)\/(.*)/]
261
261
  basepath, subfolder = $1, $2
@@ -274,17 +274,26 @@ module Six
274
274
  log.debug cmd
275
275
  output = %x[#{cmd}]
276
276
  log.debug output
277
- begin
278
- @repository = RsyncRepo.new(@modconfig[:repository], @path, :log => log)
279
- #@repository.reset(nil, {:hard => true})
280
- @installed = true
281
- get_repositories
282
- update
283
- rescue
284
- log.warn "WARNING: Failed to open the repository, not installed!"
277
+
278
+ if File.exists?(File.join(@path, ".rsync", "config.yml"))
279
+ begin
280
+ @repository = RsyncRepo.new(@modconfig[:repository], @path, :log => log)
281
+ @installed = true
282
+ get_repositories
283
+ update
284
+ rescue
285
+ @installed = false
286
+ FileUtils::rm_rf(@path) if FileTest.exist?(@path)
287
+ end
288
+ else
289
+ log.warn "WARNING: Failed to open the repository, the #{@folder_str}.7z does not seem to be correct"
290
+ log.warn "Installing from rsync network instead"
285
291
  log.debug "#{$!}"
292
+ FileUtils::rm_rf(@path) if FileTest.exist?(@path)
286
293
  end
287
- else
294
+ end
295
+
296
+ unless @installed
288
297
  @repository = if @repositories[0][/\Arsync:\/\//]
289
298
  RsyncRepo.new(@repositories, @path, @modconfig[:depth])
290
299
  else
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.11.4'
47
+ VERSION = '0.11.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.11.4
4
+ version: 0.11.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-12-11 00:00:00 +01:00
12
+ date: 2009-12-13 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency