vnews 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/vnews/sql.rb +1 -1
- data/lib/vnews/version.rb +1 -1
- metadata +1 -1
data/lib/vnews/sql.rb
CHANGED
@@ -11,7 +11,7 @@ class Vnews
|
|
11
11
|
def self.create_db(config)
|
12
12
|
config = symbolize_config(config)
|
13
13
|
create_sql = File.join(File.dirname(__FILE__), '..', 'create.sql')
|
14
|
-
passwordarg = config[:password] ? ("-p
|
14
|
+
passwordarg = config[:password] ? ("-p#{shell_escape(config[:password])}") : ''
|
15
15
|
puts `mysqladmin -h #{shell_escape config[:host]} -u #{shell_escape config[:username]} #{passwordarg} create #{shell_escape config[:database]}`
|
16
16
|
puts `mysql -h #{shell_escape config[:host]} -D #{shell_escape config[:database]} -u #{shell_escape config[:username]} #{passwordarg} < #{create_sql}`
|
17
17
|
end
|
data/lib/vnews/version.rb
CHANGED