Class: Ditty::CLI
Instance Method Summary collapse
Instance Method Details
#console ⇒ Object
68 69 70 |
# File 'lib/ditty/cli.rb', line 68 def console Rake::Task['ditty:console'].invoke end |
#migrate ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/ditty/cli.rb', line 50 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
63 64 65 |
# File 'lib/ditty/cli.rb', line 63 def seed Rake::Task['ditty:seed'].invoke end |
#server ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/ditty/cli.rb', line 29 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 |