From 458a64d0464bedc9407fd652196738d648620d46 Mon Sep 17 00:00:00 2001 From: Silverwizard Date: Mon, 12 Jan 2015 11:04:39 -0500 Subject: [PATCH] Fixed it so rather than a flat db.rb file - has a generator --- config.rb | 12 ++++++++++++ db.rb | 2 -- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 config.rb delete mode 100644 db.rb diff --git a/config.rb b/config.rb new file mode 100755 index 0000000..a6a6cd1 --- /dev/null +++ b/config.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") diff --git a/db.rb b/db.rb deleted file mode 100644 index c18ba82..0000000 --- a/db.rb +++ /dev/null @@ -1,2 +0,0 @@ -require "mysql" -$my = Mysql.connect('localhost', 'dice', 'Yqv8JPzsYew34YY7', 'dieroller')