vmail 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/vmail/database.rb +5 -6
- data/lib/vmail/version.rb +1 -1
- metadata +1 -1
data/lib/vmail/database.rb
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
require 'sequel'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
if !File.exists?("vmail.db")
|
7
|
-
create_table_script = File.expand_path("../db/create.sql", __FILE__)
|
8
|
-
DB.run create_table_script
|
3
|
+
if !File.size?('vmail.db')
|
4
|
+
create_table_script = File.expand_path("../../../db/create.sql", __FILE__)
|
5
|
+
puts `sqlite3 vmail.db < #{create_table_script}`
|
9
6
|
end
|
10
7
|
|
8
|
+
DB = Sequel.connect 'sqlite://vmail.db'
|
9
|
+
|
11
10
|
if DB[:version].count == 0
|
12
11
|
DB[:version].insert(:vmail_version => Vmail::VERSION)
|
13
12
|
end
|
data/lib/vmail/version.rb
CHANGED