Fixed it so rather than a flat db.rb file - has a generator

master
Silverwizard 10 years ago
parent 98e696c71a
commit 458a64d046
  1. 12
      config.rb
  2. 2
      db.rb

@ -0,0 +1,12 @@
#!/usr/local/bin/ruby
config = File.new("db.rb", "w")
config.print("require mysql\n")
print "hostname: "
hostname = gets
print "username: "
username = gets
print "password: "
password = gets
print "dbname: "
dbname = gets
config.print("my = Mysql.connect('" + hostname.strip + "', '" + username.strip + "', '" + password.strip + "', '" + dbname.strip + "')\n")

@ -1,2 +0,0 @@
require "mysql"
$my = Mysql.connect('localhost', 'dice', 'Yqv8JPzsYew34YY7', 'dieroller')
Loading…
Cancel
Save