Sha256: ccaa03b775b74d448c0259e2b0f82d2b85a031b2656d5b1c2f727e2259069a47
Contents?: true
Size: 529 Bytes
Versions: 42
Compression:
Stored size: 529 Bytes
Contents
desc 'create-database-yml', '[sic]', :hide => true def create_database_yml real_yml = 'config/database.yml' sample_yml = 'config/database.sample.yml' if File.exists?(sample_yml) and not File.exists?(real_yml) announce 'Creating ' + real_yml print 'Please enter your DB password: ' db_password = STDIN.gets.strip sample = File.read(sample_yml) real = sample.gsub(/password:.*$/, "password: #{db_password}") File.open(real_yml, 'w') { |f| f.write(real) } note "Created #{real_yml}." end end
Version data entries
42 entries across 42 versions & 1 rubygems