six-updater-web 0.14.7 → 0.14.8

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 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.14.7'
10
+ s.version = '0.14.8'
11
11
  s.has_rdoc = false
12
12
  #s.extra_rdoc_files = ['README', 'LICENSE']
13
13
  s.summary = 'Your summary here'
@@ -22,7 +22,7 @@ case RUBY_VERSION
22
22
  end
23
23
 
24
24
  module SixUpdaterWeb
25
- VERSION = "0.14.7"
25
+ VERSION = "0.14.8"
26
26
  COMPONENT = "six-updater-web"
27
27
 
28
28
  DEFAULT_IP = "127.0.0.1" unless defined?(DEFAULT_IP)
@@ -6,7 +6,7 @@ class CreateRepositories < ActiveRecord::Migration
6
6
  create_table :repositories do |t|
7
7
  t.string :url
8
8
 
9
- t.timestamps
9
+ t.timestamps :lock_version => false
10
10
  end
11
11
  six_join(FIELDS, :up)
12
12
  end
@@ -5,7 +5,7 @@ class CreateMods < ActiveRecord::Migration
5
5
  create_table :mods do |t|
6
6
  t.string :name
7
7
 
8
- t.timestamps
8
+ t.timestamps :lock_version => false
9
9
  end
10
10
 
11
11
  # generate the join tables
@@ -8,7 +8,7 @@ class CreateServers < ActiveRecord::Migration
8
8
  t.integer :port
9
9
  t.string :password
10
10
 
11
- t.timestamps
11
+ t.timestamps :lock_version => false
12
12
  end
13
13
 
14
14
  # generate the join tables
@@ -9,7 +9,7 @@ class CreateAppsettings < ActiveRecord::Migration
9
9
  t.string :exe
10
10
  t.string :params
11
11
 
12
- t.timestamps
12
+ t.timestamps :lock_version => false
13
13
  end
14
14
  six_join(["appsetting", "sixconfig"])
15
15
  end
@@ -6,7 +6,7 @@ class CreateSixconfigs < ActiveRecord::Migration
6
6
  t.integer :current_setting_id
7
7
  t.integer :current_server_id
8
8
 
9
- t.timestamps
9
+ t.timestamps :lock_version => false
10
10
  end
11
11
  end
12
12
 
@@ -6,7 +6,7 @@ class CreateActions < ActiveRecord::Migration
6
6
  t.string :name
7
7
  t.text :tasks
8
8
 
9
- t.timestamps
9
+ t.timestamps :lock_version => false
10
10
  end
11
11
  six_join(["action", "sixconfig"])
12
12
  end
@@ -4,7 +4,7 @@ class CreateLogs < ActiveRecord::Migration
4
4
  t.text :content
5
5
  t.integer :logsession_id
6
6
 
7
- t.timestamps
7
+ t.timestamps :lock_version => false
8
8
  end
9
9
  end
10
10
 
@@ -3,7 +3,7 @@ class CreateLogsessions < ActiveRecord::Migration
3
3
  create_table :logsessions do |t|
4
4
  t.string :name
5
5
 
6
- t.timestamps
6
+ t.timestamps :lock_version => false
7
7
  end
8
8
  end
9
9
 
@@ -3,7 +3,7 @@ class CreateSessions < ActiveRecord::Migration
3
3
  create_table :sessions do |t|
4
4
  t.string :session_id, :null => false
5
5
  t.text :data
6
- t.timestamps
6
+ t.timestamps :lock_version => false
7
7
  end
8
8
 
9
9
  add_index :sessions, :session_id
@@ -4,7 +4,7 @@ class CreateSystemSettings < ActiveRecord::Migration
4
4
  t.string :server_username
5
5
  t.string :server_password
6
6
 
7
- t.timestamps
7
+ t.timestamps :lock_version => false
8
8
  end
9
9
  end
10
10
 
@@ -8,7 +8,7 @@ class CreateQueryservers < ActiveRecord::Migration
8
8
  t.text :content, :limit => 1024*1024
9
9
  t.integer :failures, :default => 0
10
10
 
11
- t.timestamps
11
+ t.timestamps :lock_version => false
12
12
  end
13
13
  end
14
14
 
@@ -10,7 +10,7 @@ class CreateNetworks < ActiveRecord::Migration
10
10
  t.boolean :disabled
11
11
  t.integer :priority
12
12
 
13
- t.timestamps :deleted_at => false, :lock_version => false
13
+ t.timestamps :lock_version => false
14
14
  end
15
15
  six_join(["mod", "network"], :up, true)
16
16
  add_column :repositories, :network_id, :string, :limit => 36
@@ -210,7 +210,6 @@ ActiveRecord::Schema.define(:version => 20100425143140) do
210
210
  t.boolean "disabled"
211
211
  t.integer "priority"
212
212
  t.datetime "created_at"
213
- t.datetime "deleted_at"
214
213
  t.datetime "updated_at"
215
214
  end
216
215
 
@@ -223,7 +222,7 @@ ActiveRecord::Schema.define(:version => 20100425143140) do
223
222
  t.string "name"
224
223
  t.string "ip"
225
224
  t.integer "port"
226
- t.integer "failures"
225
+ t.integer "failures", :default => 0
227
226
  t.datetime "created_at"
228
227
  t.datetime "updated_at"
229
228
  t.text "mod", :limit => 1048576
@@ -8,17 +8,23 @@ module SixUpdaterWeb
8
8
 
9
9
  OPEN_BROWSER = true
10
10
 
11
- argvs = ARGV.to_s
12
-
13
- SIX_HOST = if argvs[/--bindi?n?g?=([0-9\.]+)/] || argvs[/-b *([0-9\.]+)/]
14
- $1
11
+ # Process commandline args to setup host and port
12
+ argvs = ARGV.join(" ")
13
+ SIX_HOST = case argvs
14
+ when /-b *(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/
15
+ $1
16
+ when /--bindi?n?g?=(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/
17
+ $1
15
18
  else
16
19
  ARGV << "--binding=#{DEFAULT_IP}"
17
20
  DEFAULT_IP
18
21
  end
19
22
 
20
- SIX_PORT = if argvs[/--port=([0-9]+)/] || argvs[/-p *([0-9]+)/]
21
- $1
23
+ SIX_PORT = case argvs
24
+ when /--port=([0-9]+)/
25
+ $1
26
+ when /-p *([0-9]+)/
27
+ $1
22
28
  else
23
29
  ARGV << "--port=#{DEFAULT_PORT}"
24
30
  DEFAULT_PORT
@@ -37,10 +43,12 @@ module SixUpdaterWeb
37
43
  puts "Database Missing, creating and loading default schema and system data..."
38
44
  File.open(db, 'w') {|f| }
39
45
  Dir.chdir(File.dirname(__FILE__)) do
40
- system "ruby -rubygems \"_rake.rb\" db:schema:load sync:system"
46
+ system "ruby -rubygems \"_rake.rb\" db:migrate goldberg:migrate db:schema:dump sync:system"
41
47
  end
42
48
  #FileUtils.cp(File.join(BASE_PATH, "db", "production.sqlite3"), db)
49
+ return true
43
50
  end
51
+ false
44
52
  end
45
53
  end
46
54
 
@@ -52,12 +60,24 @@ puts "This window needs to remain running during GUI operations"
52
60
  puts ""
53
61
 
54
62
  #if defined?(SixUpdaterWeb::OLDLOCATION)
55
- SixUpdaterWeb.prepare_data_path
63
+ done = SixUpdaterWeb.prepare_data_path
56
64
  #end
57
65
 
58
- puts "Checking for required Database migrations..."
59
- Dir.chdir(File.dirname(__FILE__)) do
60
- system "ruby -rubygems \"_rake.rb\" db:migrate" # goldberg:migrate
66
+ unless done
67
+ =begin
68
+ # Fix older db's. TODO: convert into code
69
+ begin
70
+ if "SELECT * FROM plugin_schema_migrations WHERE plugin_name = 'goldberg'"
71
+ [1, 2, 3, 4].each {|i| "INSERT INTO plugin_schema_migrations VALUES('goldberg', '#{i}')" }
72
+ end
73
+ rescue => e
74
+ puts "Something went wrong processing plugin_schema_migrations. #{e.class} #{e.message}: #{e.backtrace.join("\n")}"
75
+ end
76
+ =end
77
+ puts "Checking for required Database migrations..."
78
+ Dir.chdir(File.dirname(__FILE__)) do
79
+ system "ruby -rubygems \"_rake.rb\" db:migrate"
80
+ end
61
81
  end
62
82
 
63
83
  # Check for required data updates?
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 14
8
- - 7
9
- version: 0.14.7
8
+ - 8
9
+ version: 0.14.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sickboy