six-updater-web 0.21.6 → 0.22.0

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.21.6'
10
+ s.version = '0.22.0'
11
11
  s.has_rdoc = false
12
12
  #s.extra_rdoc_files = ['README', 'LICENSE']
13
13
  s.summary = 'Your summary here'
@@ -20,7 +20,7 @@ spec = Gem::Specification.new do |s|
20
20
  s.executables = ['six-updater-web', 'six-updater-web-rake', 'six-get']
21
21
  #s.add_dependency('faster_require', '>= 0.5.2')
22
22
  s.add_dependency('uuidtools', '>= 2.0.0')
23
- s.add_dependency('six-updater', '>= 0.17.0')
23
+ s.add_dependency('six-updater', '>= 0.22.1')
24
24
  s.add_dependency('rails', '2.3.8')
25
25
  s.add_dependency('haml', '3.0.10')
26
26
  s.add_dependency('coderay', '>= 0.9.3')
@@ -1,7 +1,7 @@
1
1
  class MainController < ApplicationController
2
2
  def index
3
3
  @msg = []
4
- @skip, @install, @check, @disabled = [], [], [], []
4
+ @skip, @install, @check, @disabled, @special = [], [], [], [], []
5
5
  preset, queryserver, server, action, setting, reset, ok = nil, nil, nil, nil, nil, false, true
6
6
  grab = false
7
7
  save_fav = true
@@ -287,6 +287,10 @@ class MainController < ApplicationController
287
287
  end
288
288
  mod.save unless mod.new_record?
289
289
  mod.disabled = true if !mod.version_match?(setting)
290
+ if mod.special
291
+ @special << mod
292
+ next
293
+ end
290
294
  if mod.disabled
291
295
  @disabled << mod
292
296
  next
@@ -18,6 +18,8 @@ class ModsController < ApplicationController
18
18
  :updated_at,
19
19
  :updated_version,
20
20
  :priority,
21
+ :incl,
22
+ :excl,
21
23
  :skip,
22
24
  :disabled,
23
25
  :remote]
@@ -25,7 +27,7 @@ class ModsController < ApplicationController
25
27
  config.update.columns.exclude :remote, :queryservers, :servers
26
28
  config.action_links.add 'copy', :label => 'Clone', :type => :record, :position => false, :confirm => "Do you really want to *clone* this item?"
27
29
 
28
- config.list.columns.exclude :sixconfigs, :servers, :path, :updated_at, :priority
30
+ config.list.columns.exclude :sixconfigs, :servers, :path, :updated_at, :priority, :incl, :excl
29
31
 
30
32
  config.list.sorting = { :name => :asc }
31
33
 
@@ -131,6 +131,10 @@ class Mod < ActiveRecord::Base
131
131
  self.skip = if self.new_record?; true ; else; ((self.version == self.version_local) && !self.version.nil?); end
132
132
  end
133
133
 
134
+ def special
135
+ self.incl && !self.incl.empty?
136
+ end
137
+
134
138
  def to_updater_yml
135
139
  return unless self.real_name
136
140
  hash = Hash.new
@@ -140,6 +144,13 @@ class Mod < ActiveRecord::Base
140
144
  # TODO: Enable once proper processing is implemented
141
145
  #hash[:path] = self.path
142
146
  hash[:disabled] = self.disabled
147
+ if self.incl
148
+ hash[:include] = self.incl.split(";")
149
+ hash[:force] = true unless hash[:include].empty?
150
+ end
151
+ if self.excl
152
+ hash[:exclude] = self.excl.split(";")
153
+ end
143
154
  hash[:priority] = self.priority
144
155
  name = self.real_name.clone
145
156
  name.gsub!("@", '')
@@ -11,7 +11,7 @@
11
11
  - mods.each do |mod|
12
12
  %tr
13
13
  %td{:width => "30%"}
14
- = link_to mod.name, "/mods/edit/#{mod.id}", {:title => "Size: #{mod.size}, Updated Version: #{mod.updated_version}. #{mod.categories.map{|e| e.name}.join(", ")}"}
14
+ = link_to mod.name, "/mods/edit/#{mod.id}", {:title => "Size: #{mod.size}, Updated Version: #{mod.updated_version}.#{" Incl: #{mod.incl} " if mod.incl}#{" Excl: #{mod.excl} " if mod.excl}#{mod.categories.map{|e| e.name}.join(", ")}"}
15
15
  %td{:class => if mod.version_local == mod.version; "green"; else; "red"; end}
16
16
  = if mod.version_local.empty?; "none" else; mod.version_local; end
17
17
  %td= mod.version
@@ -12,7 +12,7 @@
12
12
  %br
13
13
  Autoskip: #{@autoskip ? "Enabled" : "Disaabled"}.
14
14
  %br
15
- - if (@check.size + @skip.size + @install.size + @disabled.size) > 0
15
+ - if (@check.size + @skip.size + @install.size + @disabled.size + @special.size) > 0
16
16
  - if @check.size > 0
17
17
  %br
18
18
  To be checked:
@@ -28,6 +28,11 @@
28
28
  Not installed:
29
29
  %br
30
30
  = render :partial => "check", :locals => {:mods => @install}
31
+ - if @special.size > 0
32
+ %br
33
+ Special (Hover over modname to see why):
34
+ %br
35
+ = render :partial => "check", :locals => {:mods => @special}
31
36
  - if @disabled.size > 0
32
37
  %br
33
38
  Disabled:
@@ -22,7 +22,7 @@ case RUBY_VERSION
22
22
  end
23
23
 
24
24
  module SixUpdaterWeb
25
- VERSION = "0.21.6"
25
+ VERSION = "0.22.0"
26
26
  COMPONENT = "six-updater-web"
27
27
 
28
28
  DEFAULT_IP = "127.0.0.1" unless defined?(DEFAULT_IP)
@@ -0,0 +1,11 @@
1
+ class AddInclAndExclToMods < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :mods, :incl, :string
4
+ add_column :mods, :excl, :string
5
+ end
6
+
7
+ def self.down
8
+ remove_column :mods, :incl
9
+ remove_column :mods, :excl
10
+ end
11
+ end
@@ -9,7 +9,7 @@
9
9
  #
10
10
  # It's strongly recommended to check this file into your version control system.
11
11
 
12
- ActiveRecord::Schema.define(:version => 20100715142962) do
12
+ ActiveRecord::Schema.define(:version => 20100724124730) do
13
13
 
14
14
  create_table "actions", :id => false, :force => true do |t|
15
15
  t.string "id", :limit => 36, :null => false
@@ -193,6 +193,8 @@ ActiveRecord::Schema.define(:version => 20100715142962) do
193
193
  t.integer "size_wd", :default => 0
194
194
  t.datetime "updated_version"
195
195
  t.string "type", :default => "Mod"
196
+ t.string "incl"
197
+ t.string "excl"
196
198
  end
197
199
 
198
200
  create_table "mods_networks", :id => false, :force => true do |t|
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 21
8
- - 6
9
- version: 0.21.6
7
+ - 22
8
+ - 0
9
+ version: 0.22.0
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-07-23 00:00:00 +02:00
17
+ date: 2010-07-24 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -42,9 +42,9 @@ dependencies:
42
42
  - !ruby/object:Gem::Version
43
43
  segments:
44
44
  - 0
45
- - 17
46
- - 0
47
- version: 0.17.0
45
+ - 22
46
+ - 1
47
+ version: 0.22.1
48
48
  type: :runtime
49
49
  version_requirements: *id002
50
50
  - !ruby/object:Gem::Dependency
@@ -266,6 +266,7 @@ files:
266
266
  - lib/six-updater-web/db/migrate/20100715142960_add_beta_to_system_settings.rb
267
267
  - lib/six-updater-web/db/migrate/20100715142961_add_queryserver_to_sixconfigs.rb
268
268
  - lib/six-updater-web/db/migrate/20100715142962_add_server_bool_to_system_settings.rb
269
+ - lib/six-updater-web/db/migrate/20100724124730_add_incl_and_excl_to_mods.rb
269
270
  - lib/six-updater-web/db/schema.rb
270
271
  - lib/six-updater-web/doc/README_FOR_APP
271
272
  - lib/six-updater-web/init.rb