six-updater-web 0.13.1 → 0.13.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/config/six-updater-web.rb +1 -17
- data/lib/init.rb +19 -0
- metadata +2 -2
data/Rakefile
CHANGED
@@ -19,7 +19,7 @@ case RUBY_VERSION
|
|
19
19
|
end
|
20
20
|
|
21
21
|
module SixUpdaterWeb
|
22
|
-
VERSION = "0.13.
|
22
|
+
VERSION = "0.13.2"
|
23
23
|
|
24
24
|
COMPONENT = "six-updater-web"
|
25
25
|
SIX_PORT = 3000 unless defined?(SIX_PORT)
|
@@ -124,22 +124,6 @@ module SixUpdaterWeb
|
|
124
124
|
end
|
125
125
|
end
|
126
126
|
|
127
|
-
def prepare_data_path
|
128
|
-
# Arrange appdata!
|
129
|
-
lf = File.join(DATA_PATH, "logs")
|
130
|
-
FileUtils.mkdir_p(lf) unless File.directory?(lf)
|
131
|
-
df = File.join(DATA_PATH, "db")
|
132
|
-
FileUtils.mkdir_p(df) unless File.directory?(df)
|
133
|
-
db = File.join(DATA_PATH, "db", "production.sqlite3")
|
134
|
-
|
135
|
-
unless File.exists?(db)
|
136
|
-
puts "Database Missing, creating and loading default schema and system data..."
|
137
|
-
File.open(db, 'w') {|f| }
|
138
|
-
system "ruby -rubygems \"_rake.rb\" db:schema:load sync:system"
|
139
|
-
#FileUtils.cp(File.join(BASE_PATH, "db", "production.sqlite3"), db)
|
140
|
-
end
|
141
|
-
end
|
142
|
-
|
143
127
|
def print_info
|
144
128
|
puts "Six Updater Web (GUI) #{VERSION}, by Sickboy"
|
145
129
|
puts "BASE: #{BASE_PATH}"
|
data/lib/init.rb
CHANGED
@@ -17,6 +17,25 @@ module SixUpdaterWeb
|
|
17
17
|
# TODO: SIX_HOST?
|
18
18
|
ARGV << "--binding=#{DEFAULT_IP}"
|
19
19
|
end
|
20
|
+
|
21
|
+
module_function
|
22
|
+
def prepare_data_path
|
23
|
+
# Arrange appdata!
|
24
|
+
lf = File.join(DATA_PATH, "logs")
|
25
|
+
FileUtils.mkdir_p(lf) unless File.directory?(lf)
|
26
|
+
df = File.join(DATA_PATH, "db")
|
27
|
+
FileUtils.mkdir_p(df) unless File.directory?(df)
|
28
|
+
db = File.join(DATA_PATH, "db", "production.sqlite3")
|
29
|
+
|
30
|
+
unless File.exists?(db)
|
31
|
+
puts "Database Missing, creating and loading default schema and system data..."
|
32
|
+
File.open(db, 'w') {|f| }
|
33
|
+
Dir.chdir(File.dirname(__FILE__)) do
|
34
|
+
system "ruby -rubygems \"_rake.rb\" db:schema:load sync:system"
|
35
|
+
end
|
36
|
+
#FileUtils.cp(File.join(BASE_PATH, "db", "production.sqlite3"), db)
|
37
|
+
end
|
38
|
+
end
|
20
39
|
end
|
21
40
|
|
22
41
|
require 'common'
|