Sha256: 4c189a16f5127105924592fe11c72bbc2cd2e82d7b4da6440463ca70b1bea4df

Contents?: true

Size: 512 Bytes

Versions: 17

Compression:

Stored size: 512 Bytes

Contents

module Initial
  class DatabaseGenerator < Rails::Generators::Base
    source_root File.expand_path("../templates", __FILE__)

    def add
      @name = ask "Type the project's name"
      @username = ask 'Type database username'
      @password = ask 'Type database password'
      template 'database/database.yml', 'config/database.yml'
      template 'database/database.yml', 'config/database.yml.example'
      create_db = ask 'Create database?'
      rake('db:create') if create_db =~ /y/
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
teleporter-1.2.4 lib/generators/initial/database.rb
teleporter-1.2.3 lib/generators/initial/database.rb
teleporter-1.2.2 lib/generators/initial/database.rb
teleporter-1.2.1 lib/generators/initial/database.rb
teleporter-1.1.1 lib/generators/initial/database.rb
teleporter-1.1.0 lib/generators/initial/database.rb
teleporter-1.0.2 lib/generators/initial/database.rb
teleporter-1.0.1 lib/generators/initial/database.rb
teleporter-1.0.0 lib/generators/initial/database.rb
teleporter-0.1.0 lib/generators/initial/database.rb
teleporter-0.0.34 lib/generators/initial/database.rb
teleporter-0.0.33 lib/generators/initial/database.rb
teleporter-0.0.32 lib/generators/initial/database.rb
teleporter-0.0.31 lib/generators/initial/database.rb
teleporter-0.0.30 lib/generators/initial/database.rb
teleporter-0.0.29 lib/generators/initial/database.rb
teleporter-0.0.28 lib/generators/initial/database.rb