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 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.13.1'
10
+ s.version = '0.13.2'
11
11
  s.has_rdoc = false
12
12
  #s.extra_rdoc_files = ['README', 'LICENSE']
13
13
  s.summary = 'Your summary here'
@@ -19,7 +19,7 @@ case RUBY_VERSION
19
19
  end
20
20
 
21
21
  module SixUpdaterWeb
22
- VERSION = "0.13.1"
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'
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 13
8
- - 1
9
- version: 0.13.1
8
+ - 2
9
+ version: 0.13.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sickboy