lib/cocoapods-ykutility/command/create.rb in cocoapods-ykutility-2.0.0 vs lib/cocoapods-ykutility/command/create.rb in cocoapods-ykutility-2.0.1
- old
+ new
@@ -36,13 +36,19 @@
@config.name = argv.shift_argument
@config.language = (["objc", "oc"].include? argv.option('language', "swift").downcase) ? "objc" : "swift"
@config.with_demo = !argv.flag?('no-demo', false)
@config.with_register = argv.flag?('business', false)
- @config.author = argv.option('author', open("|git config --global user.name").gets).strip.gsub('.', '')
- @config.author_email = argv.option('email', open("|git config --global user.email").gets).strip
- @config.prefix = argv.option('prefix', "YK")
+ author = argv.option('author', open("|git config --global user.name").gets)
+ author = author.blank? ? "defualt_author" : author
+ @config.author = author.strip.gsub('.', '')
+
+ email = argv.option('email', open("|git config --global user.email").gets)
+ email = email.blank? ? "defualt_email" : email
+ @config.author_email = email.strip
+
+ @config.prefix = argv.option('prefix', "ST")
@config.path = File.expand_path(argv.option('pod-path', Dir.getwd.to_s))
super
@additional_args = argv.remainder!
end
@@ -71,6 +77,6 @@
end
end
end
-end
\ No newline at end of file
+end