fastlane/lib/fastlane/new_action.rb in fastlane-2.74.1 vs fastlane/lib/fastlane/new_action.rb in fastlane-2.75.0.beta.20180109010003
- old
+ new
@@ -5,15 +5,15 @@
name = new_action_name && check_action_name_from_args(new_action_name) ? new_action_name : fetch_name
generate_action(name)
end
def self.fetch_name
- puts "Must be lower case, and use a '_' between words. Do not use '.'".green
- puts "examples: 'testflight', 'upload_to_s3'".green
+ puts("Must be lower case, and use a '_' between words. Do not use '.'".green)
+ puts("examples: 'testflight', 'upload_to_s3'".green)
name = UI.input("Name of your action: ")
until name_valid?(name)
- puts "Name is invalid. Please ensure the name is all lowercase, free of spaces and without special characters! Try again."
+ puts("Name is invalid. Please ensure the name is all lowercase, free of spaces and without special characters! Try again.")
name = UI.input("Name of your action: ")
end
name
end
@@ -26,17 +26,17 @@
actions_path = File.join((FastlaneCore::FastlaneFolder.path || Dir.pwd), 'actions')
FileUtils.mkdir_p(actions_path) unless File.directory?(actions_path)
path = File.join(actions_path, "#{name}.rb")
File.write(path, template)
- UI.success "Created new action file '#{path}'. Edit it to implement your custom action."
+ UI.success("Created new action file '#{path}'. Edit it to implement your custom action.")
end
def self.check_action_name_from_args(new_action_name)
if name_valid?(new_action_name)
new_action_name
else
- puts "Name is invalid. Please ensure the name is all lowercase, free of spaces and without special characters! Try again."
+ puts("Name is invalid. Please ensure the name is all lowercase, free of spaces and without special characters! Try again.")
end
end
def self.name_valid?(name)
name =~ /^[a-z0-9_]+$/