<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: database code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sat, 06 Sep 2008 15:13:22 GMT</pubDate>
    <description>DZone Snippets: database code</description>
    <item>
      <title>Request Database Authentication</title>
      <link>http://snippets.dzone.com/posts/show/3389</link>
      <description>Simple solution to a problem that may not affect very many folks.&lt;br /&gt;If you don't like your password displayed in plain text in database.yml, this might help you.&lt;br /&gt;It utilizes the Highline gem (big thanks to James Edward Gray II).&lt;br /&gt;&lt;http://www.bigbold.com/snippets/posts/show/3361&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# database.yml&lt;br /&gt;&lt;br /&gt;&lt;%&lt;br /&gt;require 'highline/import'&lt;br /&gt;&lt;br /&gt;def request_input(msg, show_input = true)&lt;br /&gt;  ask(msg) { |q| q.echo = show_input }&lt;br /&gt;end&lt;br /&gt;%&gt;&lt;br /&gt;&lt;br /&gt;#...&lt;br /&gt;  username: &lt;%= request_input 'Username: ' %&gt;&lt;br /&gt;  password: &lt;%= request_input 'Password: ', false %&gt;&lt;br /&gt;#...&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Tue, 30 Jan 2007 13:52:26 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3389</guid>
      <author>Mickael (Mickael)</author>
    </item>
  </channel>
</rss>
