module RabbotMetaBuildTarget
Public Instance Methods
Source
# File lib/rabbot_meta_build_target.rb, line 48 def format_conflict_reply(plugin_name:, reason:) RabbotMetaBuild.format_build_conflict_reply(plugin_name: plugin_name, reason: reason) end
Source
# File lib/rabbot_meta_build_target.rb, line 26 def name_in_description?(plugin_name, description) name = normalize_plugin_name(plugin_name) return false if name.nil? || name.empty? description.to_s.match?(/\b#{Regexp.escape(name)}\b/i) end
Source
# File lib/rabbot_meta_build_target.rb, line 14 def normalize_plugin_name(name) raw = name.to_s.strip return nil if raw.empty? base = File.basename(raw, ".rb") base = base.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2') .gsub(/([a-z\d])([A-Z])/, '\1_\2') .tr("-", "_") .downcase base.empty? ? nil : base end
Source
# File lib/rabbot_meta_build_target.rb, line 33 def prepare_enhance_enqueue(plugin_name:, plugin_path:, test_path:, description: nil, queue: RabbotMetaQueue) normalized = normalize_plugin_name(plugin_name) return [:error, "Plugin not found: #{plugin_name}"] if normalized.nil? path_missing = plugin_path.to_s.strip.empty? || test_path.to_s.strip.empty? if path_missing && !queue.pending_new_build_for?(normalized) return [:error, "Plugin not found: #{plugin_name}"] end resolved_plugin = path_missing ? nil : plugin_path resolved_test = path_missing ? nil : test_path [:ok, plugin_name, description, resolved_plugin, resolved_test] end