Sha256: 462f6c901a9327a610227a53c9efa7ee8c45b7bc5b943cd76ff700a0c44bba0e

Contents?: true

Size: 666 Bytes

Versions: 3

Compression:

Stored size: 666 Bytes

Contents

require 'commander'
require_relative '../lib/setup'
require_relative '../lib/util'

module SetupCommand
	def setup(c)
		c.syntax = 'm2m setup [options]'
		c.summary = ''
		c.description = '配置M2M'
		c.option '--mail', '配置邮件相关的信息'
		c.option '--mail-password', '配置邮件相关的信息'
		c.option '--site', '在当前目录下,配置网站相关信息'
		c.action do |args, options|
			setup = Setup.instance
			util = Util.instance

			if options.mail
				setup.ask_mail
			elsif options.mail_password
				setup.ask_mail_password
			elsif options.site
				util.workbench = util.get_merge_path './'
				setup.ask_site
			end
		end
	end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
m2m-0.2.3 exe/setup.rb
m2m-0.2.1 exe/setup.rb
m2m-0.2.0 exe/setup.rb