fastlane/lib/fastlane/plugins/plugin_info_collector.rb in fastlane-2.214.0 vs fastlane/lib/fastlane/plugins/plugin_info_collector.rb in fastlane-2.215.0
- old
+ new
@@ -43,20 +43,20 @@
if gem_name_taken?(gem_name)
# Gem name is already taken on RubyGems
@ui.message("\nThe gem name '#{gem_name}' is already taken on RubyGems, please choose a different plugin name.")
else
# That's a naming error
- @ui.message("\nPlugin names can only contain lower case letters, numbers, and underscores")
+ @ui.message("\nPlugin names can only contain lowercase letters, numbers, and underscores")
@ui.message("and should not contain 'fastlane' or 'plugin'.")
end
end
plugin_name
end
def plugin_name_valid?(name)
- # Only lower case letters, numbers and underscores allowed
+ # Only lowercase letters, numbers and underscores allowed
/^[a-z0-9_]+$/ =~ name &&
# Does not contain the words 'fastlane' or 'plugin' since those will become
# part of the gem name
[/fastlane/, /plugin/].none? { |regex| regex =~ name } &&
# Gem name isn't taken on RubyGems yet
@@ -77,10 +77,10 @@
# that is acceptable, returning that suggestion
def fix_plugin_name(name)
name = name.to_s.downcase
fixes = {
/[\- ]/ => '_', # dashes and spaces become underscores
- /[^a-z0-9_]/ => '', # anything other than lower case letters, numbers and underscores is removed
+ /[^a-z0-9_]/ => '', # anything other than lowercase letters, numbers and underscores is removed
/fastlane[_]?/ => '', # 'fastlane' or 'fastlane_' is removed
/plugin[_]?/ => '' # 'plugin' or 'plugin_' is removed
}
fixes.each do |regex, replacement|
name = name.gsub(regex, replacement)