Pronounceable Password Generator

A much-needed, cleaner update to ye olde Pronounceable Password Generator

# app/models/pronounceable_password.rb
class PronounceablePassword
  WORDS = IO.readlines(File.join(Rails.root, 'lib', 'words.txt')).each { |w| w.chop! }

  def self.generate
    WORDS.sample(4).join('-')
  end
end

Drop your words list in lib/words.txt:

airy
ally
bold
boss
calm
care
cool
core
cure
cute
...

Create a unique but memorable password simply with:

PronounceablePassword.generate
=> "dazzling-nourished-whacko-cute"