def sync(args=[]): if 0 != os.system( env.docker_compose_env( env.run( ['%s && %s' % (COMMAND_DEPENDENCES, COMMAND_DB_MIGRATE)]))): config_info()
def rails_new(args=[]): if 0 == os.system( env.docker_compose_env( env.run([ 'gem install rails && rails new . -d postgresql --webpack=vue' ]))): print(env.line_seperator('=', 80)) print("\n INSTALL FINISH\n") config_info() show_hint()
def migrate(args=[]): os.system(env.docker_compose_env(env.run(['%s' % (COMMAND_DB_MIGRATE)])))
def prepare(args=[]): os.system( env.docker_compose_env( env.run(['%s && %s' % (COMMAND_DEPENDENCES, COMMAND_PREPARE)], run_args='--no-deps')))
def rails_publish(args=[]): prepare() os.system(env.docker_compose_env(env.down())) migrate() os.system(env.docker_compose_env(env.up()))
def rails_reset(args=[]): os.system( env.docker_compose_env( env.run(['%s && %s' % (COMMAND_DROP, COMMAND_DB_SEED)])))
def rails_drop(args=[]): os.system(env.docker_compose_env(env.run([COMMAND_DROP])))
def rails_c(args=[]): os.system(env.docker_compose_env(env.run(['rails c'])))