six-updater 0.19.7-x86-mingw32 → 0.20.0-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ require 'rake/testtask'
13
13
  spec = Gem::Specification.new do |s|
14
14
  s.platform = "x86-mingw32"
15
15
  s.name = 'six-updater'
16
- s.version = '0.19.7'
16
+ s.version = '0.20.0'
17
17
  s.has_rdoc = true
18
18
  s.extra_rdoc_files = ['README', 'LICENSE']
19
19
  s.summary = 'Your summary here'
@@ -35,7 +35,7 @@ end
35
35
  spec3 = Gem::Specification.new do |s|
36
36
  s.platform = "x86-mswin32"
37
37
  s.name = 'six-updater'
38
- s.version = '0.19.7'
38
+ s.version = '0.20.0'
39
39
  s.has_rdoc = true
40
40
  s.extra_rdoc_files = ['README', 'LICENSE']
41
41
  s.summary = 'Your summary here'
@@ -56,7 +56,7 @@ end
56
56
 
57
57
  spec2 = Gem::Specification.new do |s|
58
58
  s.name = 'six-updater'
59
- s.version = '0.19.7'
59
+ s.version = '0.20.0'
60
60
  s.has_rdoc = true
61
61
  s.extra_rdoc_files = ['README', 'LICENSE']
62
62
  s.summary = 'Your summary here'
data/lib/six/updater.rb CHANGED
@@ -39,7 +39,7 @@ end
39
39
  module Six
40
40
  # TODO: Evaluate if this module should be a class instead?
41
41
  module Updater
42
- VERSION = '0.19.7'
42
+ VERSION = '0.20.0'
43
43
  COMPONENT = 'six-updater'
44
44
  LOG_LIMIT = 9999
45
45
 
@@ -107,6 +107,27 @@ module Six
107
107
  @repository.repository.reset(nil, {:hard => true})
108
108
  end
109
109
 
110
+ # Convert process
111
+ def convert
112
+ if @installed
113
+ log.warn "Already a six-updater repository, not converting."
114
+ else
115
+ unless File.directory?(@path)
116
+ log.warn "Modfolder doesn't exist"
117
+ return
118
+ end
119
+ opts = {}
120
+ opts.merge!({:log => log}) if @config[:verbose]
121
+ @repository = RsyncRepo.new(@modconfig[:repository], @path, :log => log)
122
+ begin
123
+ @repository.convert(opts)
124
+ rescue => e
125
+ log.warn 'WARNING: Error during conversion..'
126
+ log.debug "ERROR: #{e.class} #{e.message} #{e.backtrace.join("\n")}"
127
+ end
128
+ end
129
+ end
130
+
110
131
  # UPDATE Process
111
132
  def update
112
133
  if self.skip?
@@ -30,6 +30,10 @@ module Six
30
30
  todo << :update if bool
31
31
  end
32
32
 
33
+ opts.on("-n", "--convert", "Convert each mod available on the updater network to updater") do |bool|
34
+ todo << :convert if bool
35
+ end
36
+
33
37
  opts.on("-r", "--reset", "Resets the modfolders to latest commit status. All modifications lost") do |bool|
34
38
  todo << :reset if bool
35
39
  end
@@ -20,6 +20,10 @@ module Six
20
20
  cfg ? cfg[:version] : nil
21
21
  end
22
22
 
23
+ def convert(opts = {})
24
+ @repository = Six::Repositories::Rsync.convert(@path, :log => log)
25
+ end
26
+
23
27
  def open(opts = {})
24
28
  repository(opts)
25
29
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 19
8
- - 7
9
- version: 0.19.7
7
+ - 20
8
+ - 0
9
+ version: 0.20.0
10
10
  platform: x86-mingw32
11
11
  authors:
12
12
  - Sickboy