fastlane/lib/fastlane/plugins/plugin_info_collector.rb in fastlane-2.62.1 vs fastlane/lib/fastlane/plugins/plugin_info_collector.rb in fastlane-2.63.0.beta.20171018010003
- old
+ new
@@ -22,11 +22,11 @@
plugin_name = initial_name
first_try = true
loop do
if !first_try || plugin_name.to_s.empty?
- plugin_name = @ui.input("What would you like to be the name of your plugin?")
+ plugin_name = @ui.input("\nWhat would you like to be the name of your plugin?")
end
first_try = false
unless plugin_name_valid?(plugin_name)
fixed_name = fix_plugin_name(plugin_name)
@@ -101,11 +101,11 @@
def collect_author(initial_author = nil)
return initial_author if author_valid?(initial_author)
author = nil
loop do
- author = @ui.input("What is the plugin author's name?")
+ author = @ui.input("\nWhat is the plugin author's name?")
break if author_valid?(author)
@ui.message('An author name is required.')
end
@@ -124,21 +124,21 @@
git_email = Helper.backticks('git config --get user.email', print: FastlaneCore::Globals.verbose?).strip
return git_email.empty? ? nil : git_email
end
def collect_email(initial_email = nil)
- return initial_email || @ui.input("What is the plugin author's email address?")
+ return initial_email || @ui.input("\nWhat is the plugin author's email address?")
end
#
# Summary
#
def collect_summary
summary = nil
loop do
- summary = @ui.input("Please enter a short summary of this fastlane plugin:")
+ summary = @ui.input("\nPlease enter a short summary of this fastlane plugin:")
break if summary_valid?(summary)
@ui.message('A summary is required.')
end
@@ -151,9 +151,21 @@
#
# Summary
#
def collect_details
- return @ui.input("Please enter a detailed description of this fastlane plugin:").to_s
+ details = nil
+ loop do
+ details = @ui.input("\nPlease enter a detailed description of this fastlane plugin:")
+ break if details_valid?(details)
+
+ @ui.message('A detailed description is required.')
+ end
+
+ details
+ end
+
+ def details_valid?(details)
+ !details.to_s.strip.empty?
end
end
end