diff --git a/patchfile.gemspec b/patchfile.gemspec index a8e6545..13b8e01 100644 --- a/patchfile.gemspec +++ b/patchfile.gemspec @@ -51,7 +51,7 @@ all_template.each do |folder| texts = File.read(filename).force_encoding('UTF-8') new_texts = texts.gsub(/<.*javascript_include_tag.*bootstrap.*>/,"<%= javascript_include_tag \"bootstrap.min\"%>") bootstrap_count = 0 - new_texts.gsub("<%= javascript_include_tag \"bootstrap.min\"%>"){|t| + new_texts = new_texts.gsub("<%= javascript_include_tag \"bootstrap.min\"%>"){|t| bootstrap_count += 1 (bootstrap_count > 1) ? "" : t }