Merge branch 'develop'
This commit is contained in:
commit
3c4d958409
9 changed files with 14 additions and 14 deletions
|
@ -6,8 +6,8 @@ class Twenty::Command < Cmd
|
|||
##
|
||||
# mixins
|
||||
require_relative "command/mixin/common_option_mixin"
|
||||
require_relative "command/mixin/pending_migration_mixin"
|
||||
require_relative "command/mixin/sqlite_connection_mixin"
|
||||
require_relative "command/mixin/migration_mixin"
|
||||
require_relative "command/mixin/sqlite_mixin"
|
||||
|
||||
##
|
||||
# commands
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
class Twenty::Command::Connect < Twenty::Command
|
||||
set_banner usage: "twenty connect [OPTIONS]",
|
||||
description: "Connect a project to twenty"
|
||||
prepend Twenty::Command::PendingMigrationMixin
|
||||
prepend Twenty::Command::SQLiteConnectionMixin
|
||||
prepend Twenty::Command::MigrationMixin
|
||||
prepend Twenty::Command::SQLiteMixin
|
||||
|
||||
def run
|
||||
options = parse_options(argv)
|
||||
|
|
|
@ -4,8 +4,8 @@ class Twenty::Command::Console < Twenty::Command
|
|||
set_banner usage: "twenty console [OPTIONS]",
|
||||
description: "Start the twenty developer console"
|
||||
include CommonOptionMixin
|
||||
prepend Twenty::Command::PendingMigrationMixin
|
||||
prepend Twenty::Command::SQLiteConnectionMixin
|
||||
prepend Twenty::Command::MigrationMixin
|
||||
prepend Twenty::Command::SQLiteMixin
|
||||
|
||||
def run
|
||||
options = parse_options(argv)
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
class Twenty::Command::Disconnect < Twenty::Command
|
||||
set_banner usage: "twenty disconnect [OPTIONS]",
|
||||
description: "Disconnect a project from twenty"
|
||||
prepend Twenty::Command::PendingMigrationMixin
|
||||
prepend Twenty::Command::SQLiteConnectionMixin
|
||||
prepend Twenty::Command::MigrationMixin
|
||||
prepend Twenty::Command::SQLiteMixin
|
||||
|
||||
def run
|
||||
options = parse_options(argv)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class Twenty::Command::Down < Twenty::Command
|
||||
set_banner usage: "twenty down [OPTIONS]",
|
||||
description: "Stop the twenty web server"
|
||||
prepend Twenty::Command::SQLiteConnectionMixin
|
||||
prepend Twenty::Command::SQLiteMixin
|
||||
|
||||
def run
|
||||
options = parse_options(argv)
|
||||
|
|
|
@ -4,7 +4,7 @@ class Twenty::Command::Migrate < Twenty::Command
|
|||
set_banner usage: "twenty migrate [OPTIONS]",
|
||||
description: "Migrate the database"
|
||||
include CommonOptionMixin
|
||||
prepend Twenty::Command::SQLiteConnectionMixin
|
||||
prepend Twenty::Command::SQLiteMixin
|
||||
|
||||
def run
|
||||
options = parse_options(argv)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Twenty::Command::PendingMigrationMixin
|
||||
module Twenty::Command::MigrationMixin
|
||||
def run_command(...)
|
||||
if pending_migrations?
|
||||
warn "There are pending migrations.\n" \
|
|
@ -1,4 +1,4 @@
|
|||
module Twenty::Command::SQLiteConnectionMixin
|
||||
module Twenty::Command::SQLiteMixin
|
||||
def run_command(options)
|
||||
path = options.database || Twenty.default_database
|
||||
Twenty.establish_connection(path:)
|
|
@ -4,8 +4,8 @@ class Twenty::Command::Up < Twenty::Command
|
|||
set_banner usage: "twenty up [OPTIONS]",
|
||||
description: "Start the twenty web server"
|
||||
include CommonOptionMixin
|
||||
prepend Twenty::Command::PendingMigrationMixin
|
||||
prepend Twenty::Command::SQLiteConnectionMixin
|
||||
prepend Twenty::Command::MigrationMixin
|
||||
prepend Twenty::Command::SQLiteMixin
|
||||
|
||||
def run
|
||||
options = parse_options(argv)
|
||||
|
|
Loading…
Reference in a new issue