Sha256: 96d8f007b458a3d6ad8b0fb4237572c90d1643dcb82d5d9dd199aeba7c4432d8

Contents?: true

Size: 1.14 KB

Versions: 5

Compression:

Stored size: 1.14 KB

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require_relative '../lib/mobile_workflow/cli'

# Byebug for dev
begin
  require 'byebug'
rescue LoadError
end

if ARGV.empty?
  puts 'USAGE: mwf <platform> <command> [options]'
  puts 'Example: mwf rails create:app_server --help'
  puts 'Example: mwf rails destroy:app_server --help'
  exit 0
elsif ['-v', '--version'].include? ARGV[0]
  puts MobileWorkflow::VERSION
  exit 0
elsif ARGV[0] == 'rails' && ARGV[1] == 'create:app_server'
  ARGV.shift
  ARGV.shift

  templates_root = File.expand_path(File.join('..', 'lib', 'generators', 'mobile_workflow', 'install', 'templates'),
                                    File.dirname(__FILE__))
  MobileWorkflow::Cli::AppServerGenerator.source_root templates_root
  MobileWorkflow::Cli::AppServerGenerator.source_paths << Rails::Generators::AppGenerator.source_root << templates_root
  MobileWorkflow::Cli::AppServerGenerator.start
elsif ARGV[0] == 'rails' && ARGV[1] == 'destroy:app_server'
  ARGV.shift
  ARGV.shift

  ARGV.unshift(MobileWorkflow::Cli::AppServerCleaner.default_task) unless ARGV[0] == '--help'
  MobileWorkflow::Cli::AppServerCleaner.start(ARGV)
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mobile_workflow-0.12.2 bin/mwf
mobile_workflow-0.12.1 bin/mwf
mobile_workflow-0.12.0 bin/mwf
mobile_workflow-0.11.1 bin/mwf
mobile_workflow-0.11.0 bin/mwf