def replace_path_variables(template_path, plugin_info)
      path = template_path.dup

      loop do
        replacement_variable_regexp = /%([\w\-]*)%/
        match = replacement_variable_regexp.match(path)

        break unless match

        replacement_value = plugin_info.send(match[1].to_sym)
        path.gsub!(replacement_variable_regexp, replacement_value)
      end

      path
    end
def replace_path_variables(template_path, plugin_info)
      path = template_path.dup

      loop do
        replacement_variable_regexp = /%([\w\-]*)%/
        match = replacement_variable_regexp.match(path)

        break unless match

        replacement_value = plugin_info.send(match[1].to_sym)
        path.gsub!(replacement_variable_regexp, replacement_value)
      end

      path
    end
Path variables can be defined like: %gem_name%

 The text between the percent signs will be used to invoke an accessor
 method on the PluginInfo object to be the replacement value.