six-updater-web 0.12.1 → 0.12.2
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 +1 -1
- data/lib/app/controllers/main_controller.rb +2 -2
- data/lib/app/controllers/mods_controller.rb +1 -1
- data/lib/app/controllers/networks_controller.rb +3 -2
- data/lib/app/controllers/repositories_controller.rb +1 -0
- data/lib/app/models/mod.rb +17 -7
- data/lib/app/models/queryserver.rb +2 -2
- data/lib/config/six-updater-web.rb +2 -1
- metadata +3 -3
data/Rakefile
CHANGED
@@ -377,8 +377,8 @@ class MainController < ApplicationController
|
|
377
377
|
|
378
378
|
@cloghash = Hash.new
|
379
379
|
Mod.find(:all).each do |mod|
|
380
|
-
clog = File.join(path, mod.
|
381
|
-
@cloghash[mod.
|
380
|
+
clog = File.join(path, mod.real_name, "changelog.txt")
|
381
|
+
@cloghash[mod.real_name] = File.open(clog) {|f| f.readlines } if File.exists?(clog)
|
382
382
|
end
|
383
383
|
end
|
384
384
|
|
@@ -9,9 +9,10 @@ class NetworksController < ApplicationController
|
|
9
9
|
:homepage,
|
10
10
|
:repositories,
|
11
11
|
:mods,
|
12
|
+
:created_at,
|
13
|
+
:updated_at,
|
12
14
|
:priority,
|
13
|
-
:disabled
|
14
|
-
:created_at
|
15
|
+
:disabled
|
15
16
|
]
|
16
17
|
[:disabled, :priority].each do |column| # , :favorite
|
17
18
|
config.columns[column].inplace_edit = true
|
data/lib/app/models/mod.rb
CHANGED
@@ -6,13 +6,23 @@ class Mod < ActiveRecord::Base
|
|
6
6
|
|
7
7
|
six_guid
|
8
8
|
|
9
|
+
def real_name
|
10
|
+
return unless self.name
|
11
|
+
case RUBY_PLATFORM
|
12
|
+
when /-mingw32$/, /-mswin32$/
|
13
|
+
self.name
|
14
|
+
else
|
15
|
+
self.name.downcase
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
9
19
|
def installed?
|
10
20
|
!self.version_local.empty?
|
11
21
|
end
|
12
22
|
|
13
23
|
def exists?(setting)
|
14
|
-
return false unless setting.real_modpath && self.
|
15
|
-
File.exists?(File.join(setting.real_modpath, self.
|
24
|
+
return false unless setting.real_modpath && self.real_name
|
25
|
+
File.exists?(File.join(setting.real_modpath, self.real_name))
|
16
26
|
end
|
17
27
|
|
18
28
|
def remote
|
@@ -24,8 +34,8 @@ class Mod < ActiveRecord::Base
|
|
24
34
|
end
|
25
35
|
|
26
36
|
def read_version(path)
|
27
|
-
return unless path && self.
|
28
|
-
cfg = File.join(path, self.
|
37
|
+
return unless path && self.real_name
|
38
|
+
cfg = File.join(path, self.real_name, '.rsync', '.repository.yml')
|
29
39
|
if File.exists?(cfg)
|
30
40
|
conf = YAML::load(File.open(cfg))
|
31
41
|
if conf
|
@@ -70,16 +80,16 @@ class Mod < ActiveRecord::Base
|
|
70
80
|
end
|
71
81
|
|
72
82
|
def to_updater_yml
|
73
|
-
return unless self.
|
83
|
+
return unless self.real_name
|
74
84
|
hash = Hash.new
|
75
|
-
hash[:folder] = self.
|
85
|
+
hash[:folder] = self.real_name
|
76
86
|
hash[:repository] = []
|
77
87
|
hash[:skip] = self.skip
|
78
88
|
# TODO: Enable once proper processing is implemented
|
79
89
|
#hash[:path] = self.path
|
80
90
|
hash[:disabled] = self.disabled
|
81
91
|
hash[:priority] = self.priority
|
82
|
-
name = self.
|
92
|
+
name = self.real_name.clone
|
83
93
|
name.gsub!("@", '')
|
84
94
|
unless self.new_record?
|
85
95
|
self.all_repositories.each do |rep|
|
@@ -21,7 +21,7 @@ class Queryserver < ActiveRecord::Base
|
|
21
21
|
mods = Mod.find(:all, :conditions => "name LIKE '#{m}'") # needed for case insensitivity :S
|
22
22
|
mod = nil
|
23
23
|
mods.each do |mo|
|
24
|
-
if mo.name.downcase == m.downcase
|
24
|
+
if mo.name.downcase == m.downcase
|
25
25
|
mod = mo
|
26
26
|
break
|
27
27
|
else
|
@@ -47,7 +47,7 @@ class Queryserver < ActiveRecord::Base
|
|
47
47
|
mods = Mod.find(:all, :conditions => "name LIKE '#{m}'") # needed for case insensitivity :S
|
48
48
|
mod = nil
|
49
49
|
mods.each do |mo|
|
50
|
-
if mo.name.downcase == m.downcase
|
50
|
+
if mo.name.downcase == m.downcase
|
51
51
|
mod = mo
|
52
52
|
break
|
53
53
|
else
|
@@ -10,7 +10,7 @@ end
|
|
10
10
|
require 'open3'
|
11
11
|
|
12
12
|
module SixUpdaterWeb
|
13
|
-
VERSION = "0.12.
|
13
|
+
VERSION = "0.12.2"
|
14
14
|
|
15
15
|
COMPONENT = "six-updater-web"
|
16
16
|
SIX_PORT = 3000 unless defined?(SIX_PORT)
|
@@ -30,6 +30,7 @@ module SixUpdaterWeb
|
|
30
30
|
else
|
31
31
|
Dir.pwd
|
32
32
|
end
|
33
|
+
|
33
34
|
bpath.gsub!("\\", "/")
|
34
35
|
BASE_PATH = bpath
|
35
36
|
TOOL_PATH = File.join(BASE_PATH, 'tools')
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 12
|
8
|
-
-
|
9
|
-
version: 0.12.
|
8
|
+
- 2
|
9
|
+
version: 0.12.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Sickboy
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-26 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|