Update to latest Unity and therefore newer Rubocop standards. Tweaked scripts to match latest standards.

This commit is contained in:
Mark VanderVoord
2023-11-22 17:40:07 -05:00
parent 32049399b3
commit a642b1fe49
22 changed files with 107 additions and 104 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ class CMockPluginManager
plugins_to_load = [:expect, config.plugins].flatten.uniq.compact
plugins_to_load.each do |plugin|
plugin_name = plugin.to_s
object_name = 'CMockGeneratorPlugin' + camelize(plugin_name)
object_name = "CMockGeneratorPlugin#{camelize(plugin_name)}"
self.class.mutex.synchronize { load_plugin(plugin_name, object_name, config, utils) }
end
@plugins.sort! { |a, b| a.priority <=> b.priority }
@@ -27,7 +27,7 @@ class CMockPluginManager
end
def camelize(lower_case_and_underscored_word)
lower_case_and_underscored_word.gsub(/\/(.?)/) { '::' + Regexp.last_match(1).upcase }.gsub(/(^|_)(.)/) { Regexp.last_match(2).upcase }
lower_case_and_underscored_word.gsub(/\/(.?)/) { "::#{Regexp.last_match(1).upcase}" }.gsub(/(^|_)(.)/) { Regexp.last_match(2).upcase }
end
def self.mutex