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

Version Path
geordi-2.6.0 lib/geordi/commands/create_database_yml.rb
geordi-2.5.0 lib/geordi/commands/create_database_yml.rb
geordi-2.4.0 lib/geordi/commands/create_database_yml.rb
geordi-2.3.0 lib/geordi/commands/create_database_yml.rb
geordi-2.2.0 lib/geordi/commands/create_database_yml.rb
geordi-2.1.0 lib/geordi/commands/create_database_yml.rb
geordi-2.0.0 lib/geordi/commands/create_database_yml.rb
geordi-1.10.0 lib/geordi/commands/create_database_yml.rb
geordi-1.9.1 lib/geordi/commands/create_database_yml.rb
geordi-1.9.0 lib/geordi/commands/create_database_yml.rb
geordi-1.8.0 lib/geordi/commands/create_database_yml.rb
geordi-1.7.1 lib/geordi/commands/create_database_yml.rb
geordi-1.7.0 lib/geordi/commands/create_database_yml.rb
geordi-1.6.5 lib/geordi/commands/create_database_yml.rb
geordi-1.6.4 lib/geordi/commands/create_database_yml.rb
geordi-1.6.3 lib/geordi/commands/create_database_yml.rb
geordi-1.6.2 lib/geordi/commands/create_database_yml.rb
geordi-1.6.1 lib/geordi/commands/create_database_yml.rb
geordi-1.6.0 lib/geordi/commands/create_database_yml.rb
geordi-1.5.2 lib/geordi/commands/create_database_yml.rb