Sha256: 02ccbbbd1ff92f03379092a0a9fe88ad71491d792733b80fe2cec067dfaf2e1d
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
require 'rails/generators' require 'rails/generators/rails/app/app_generator' require 'json' require 'active_support/core_ext/hash/indifferent_access' module MobileWorkflowCli class AppCleaner < Thor class_option :version, type: :boolean, aliases: "-v", desc: "Show version number and quit" class_option :help, type: :boolean, aliases: '-h', desc: "Show this help message and quit" class_option :heroku, type: :boolean, default: false, desc: "Clean Heroku app" class_option :s3_storage, type: :boolean, default: false, desc: "Clean an s3 backend for attachment upload and storage" class_option :aws_region, type: :string, default: 'us-east-1', desc: "Specify a region to create AWS resources in" default_task :clean desc "APP_NAME", "clean the app" def clean(app_name) `rm -rf #{app_name}` AwsBackend.new(app_name: app_name, region: options[:aws_region]).destroy if options[:s3_storage] HerokuBackend.new(app_name: app_name).destroy if options[:heroku] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mobile_workflow_cli-0.1.7 | lib/mobile_workflow_cli/app_cleaner.rb |