Class: Ditty::CLI
Instance Method Summary collapse
Instance Method Details
#console ⇒ Object
73 74 75 |
# File 'lib/ditty/cli.rb', line 73 def console Rake::Task['ditty:console'].invoke end |
#migrate ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/ditty/cli.rb', line 55 def migrate # Prep Ditty Rake::Task['ditty:prep:migrations'].invoke # Run the migrations Rake::Task['ditty:migrate:up'].invoke puts 'Ditty Migrations Executed' Rake::Task['ditty:dump_schema'].invoke puts 'Ditty DB Schema Dumped' end |
#seed ⇒ Object
68 69 70 |
# File 'lib/ditty/cli.rb', line 68 def seed Rake::Task['ditty:seed'].invoke end |
#server ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/ditty/cli.rb', line 34 def server # Ensure the token files are present Rake::Task['ditty:generate_tokens'].invoke # Prep Ditty Rake::Task['ditty:prep:folders'].invoke Rake::Task['ditty:prep:migrations'].invoke # Check the migrations Rake::Task['ditty:migrate:check'].invoke # Seed Ditty DB puts 'Seeding the Ditty DB' Rake::Task['ditty:seed'].invoke # RackUP! puts 'Starting the Ditty Server' Rack::Server.start(config: 'config.ru') end |