six-updater-web 0.12.1 → 0.12.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ require 'rake/testtask'
7
7
 
8
8
  spec = Gem::Specification.new do |s|
9
9
  s.name = 'six-updater-web'
10
- s.version = '0.12.1'
10
+ s.version = '0.12.2'
11
11
  s.has_rdoc = false
12
12
  #s.extra_rdoc_files = ['README', 'LICENSE']
13
13
  s.summary = 'Your summary here'
@@ -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.name, "changelog.txt")
381
- @cloghash[mod.name] = File.open(clog) {|f| f.readlines } if File.exists?(clog)
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
 
@@ -7,12 +7,12 @@ class ModsController < ApplicationController
7
7
  :version,
8
8
  :version_local,
9
9
  :path,
10
- :priority,
11
10
  :sixconfigs,
12
11
  :networks,
13
12
  :queryservers,
14
13
  # :created_at,
15
14
  :updated_at,
15
+ :priority,
16
16
  :skip,
17
17
  :disabled,
18
18
  :remote]
@@ -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
@@ -5,6 +5,7 @@ class RepositoriesController < ApplicationController
5
5
  config.columns = [
6
6
  :url,
7
7
  :network,
8
+ :created_at,
8
9
  :updated_at,
9
10
  :priority,
10
11
  :disabled
@@ -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.name
15
- File.exists?(File.join(setting.real_modpath, self.name))
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.name
28
- cfg = File.join(path, self.name, '.rsync', '.repository.yml')
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.name
83
+ return unless self.real_name
74
84
  hash = Hash.new
75
- hash[:folder] = self.name
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.name.downcase
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.1"
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
- - 1
9
- version: 0.12.1
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-25 00:00:00 +02:00
17
+ date: 2010-04-26 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency