Request Database Authentication
Join the DZone community and get the full member experience.
Join For FreeSimple solution to a problem that may not affect very many folks.
If you don't like your password displayed in plain text in database.yml, this might help you.
It utilizes the Highline gem (big thanks to James Edward Gray II).
# database.yml
<%
require 'highline/import'
def request_input(msg, show_input = true)
ask(msg) { |q| q.echo = show_input }
end
%>
#...
username: <%= request_input 'Username: ' %>
password: <%= request_input 'Password: ', false %>
#...
Database
Requests
authentication
Opinions expressed by DZone contributors are their own.
Comments