How to hide accesses to a mailbox when using mail in ruby?

There is a script that sends the results of work on mail via SMTP using the mail gem. The script I want to put in a public repository, but do not want to burn access to email. How to make better options of sending in a separate file to add it in .gitignore?
Send this:
options = { :address => "",
 :port => 587,
 :domain => '',
 :user_name => '',
 :password => 'mail_password',
 :authentication => 'plain',
 :enable_starttls_auto => true }

Mail.defaults do
 delivery_method :smtp, options

Mail.deliver do
 from ''
 to ''
 subject 'some subject'
 html_part do
 content_type 'text/html; charset=UTF-8'
 body "#{html_mail}"
September 19th 19 at 00:10
3 answers
September 19th 19 at 00:12
In ruby to store configs usually use yaml. Read/write in this format is in the standard library of ruby
September 19th 19 at 00:14
Gem figaro to come. Remove the options in environment variables, and will be a joy :)
September 19th 19 at 00:16
In Rails 4.1 there is such a file as secrets.yml to store all this goodness. If the version is lower, it is really in individual .yml file and it to .gitignore.
A good version of the gem

Find more questions by tags Ruby