Sha256: 5e56c860a63d53838a3f1731b4e2117693de8061b4160b0a831a205b209a2b49

Contents?: true

Size: 1.22 KB

Versions: 1

Compression:

Stored size: 1.22 KB

Contents

#!/usr/bin/env ruby

require 'generic_app'

def get_input(default_value)
  value_input = gets.chomp
  if value_input == ''
    default_value
  else
    value_input
  end
end

puts '***********************'
puts 'Welcome to Generic App!'
puts

default_subdir = 'tmp9'
puts
puts "DEFAULT VALUE: #{default_subdir}"
puts 'Enter the directory name you wish to use for your new app:'
subdir_name = get_input(default_subdir)
puts "You chose '#{subdir_name}'."
puts

default_email = 'please-change-me-at-config-initializers-devise@example.com'
puts "DEFAULT VALUE: #{default_email}"
puts "Enter the email address you wish to use for your new app's mailer:"
email = get_input(default_email)

default_title = 'Placeholder Title'
puts "DEFAULT TITLE: #{default_title}"
puts 'Enter the desired title you wish to use for your new app:'
title = get_input(default_title)

GenericApp.create_new(subdir_name, email, title)

puts 'Your new Rails app has been created at'
puts "#{ENV['PWD']}/#{subdir_name} ."
puts ''
puts 'Enter the following commands:'
puts "cd #{subdir_name}"
puts 'git commit -m "Initial commit"'
puts
puts 'Use the all.sh script to test, outline, and seed your app.'
puts
puts 'There is a list of things to do in the README-to_do.txt file.'
puts

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
generic_app-2.0.1 bin/generic_app