lib/gumboot/strap.rb in aaf-gumboot-1.2.0 vs lib/gumboot/strap.rb in aaf-gumboot-2.0.1
- old
+ new
@@ -21,21 +21,21 @@
ensure_database(db)
ensure_database_user(db)
end
end
- def ensure_database(db)
- adapter, database = db.values_at('adapter', 'database')
+ def ensure_database(dbase)
+ adapter, database = dbase.values_at('adapter', 'database')
raise('Only supports mysql2 adapter') unless adapter == 'mysql2'
Rails.logger.info "Ensuring database `#{database}` exists"
client.query("CREATE DATABASE IF NOT EXISTS `#{database}` " \
'CHARACTER SET utf8 COLLATE utf8_bin')
end
- def ensure_database_user(db)
+ def ensure_database_user(dbase)
adapter, database, username, password =
- db.values_at('adapter', 'database', 'username', 'password')
+ dbase.values_at('adapter', 'database', 'username', 'password')
raise('Only supports mysql2 adapter') unless adapter == 'mysql2'
Rails.logger.info(
"Ensuring access to `#{database}` for #{username} user is granted"