Class: Setup
Overview
Handles initial setup of application
Constant Summary collapse
- GEM_DIR =
Store the root of the gem directory
"#{__dir__}/.."
- HOME_DIR =
Store users home directory
`echo $HOME`.chomp
Instance Method Summary collapse
Instance Method Details
#db_config ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/setup.rb', line 14 def db_config unless File.exist?("#{HOME_DIR}/.my_todo/data") `mkdir -p #{HOME_DIR}/.my_todo/data` say "Created .my_todo in #{HOME_DIR}" end template "config.yml.erb", "#{__dir__}/../lib/db/config.yml", force: true end |
#standard_migrations_override ⇒ Object
23 24 25 |
# File 'lib/setup.rb', line 23 def standard_migrations_override template "standalone_migrations.yml.erb", "#{__dir__}/../.standalone_migrations", force: true end |