diff --git a/patchfile.gemspec b/patchfile.gemspec index 3dfdd55..7746d83 100644 --- a/patchfile.gemspec +++ b/patchfile.gemspec @@ -48,28 +48,28 @@ if bundle_update_flag change_text_fix1 = ' {{site_name}}' all_template.each do |folder| if !folder.include?('mobile') - begin - filename = folder+'partial/_head.html.erb' - 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 = new_texts.gsub("<%= javascript_include_tag \"bootstrap.min\"%>"){|t| - bootstrap_count += 1 - (bootstrap_count > 1) ? "" : t - } - if new_texts.include?('jquery_prefix') - new_texts = new_texts.gsub(/<.*javascript_include_tag.*\/jquery\.min.*>|<.*javascript_include_tag.*\/jquery-1\.11\.0\.min.*>/,"<%= javascript_include_tag \"jquery.min\"%>") - else - new_texts = new_texts.gsub(/<%= javascript_include_tag \"jquery.min\"%>/,"<%= javascript_include_tag \"jquery.min\"%>\n\t<%= javascript_include_tag \"jquery_prefix\"%>") - end - if texts != new_texts - File.open(filename,'w') do |f| - f.write new_texts - end - end - rescue => e - puts "#{e.inspect}\nnot found #{folder}partial/_head.html.erb" - end + #begin + # filename = folder+'partial/_head.html.erb' + # 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 = new_texts.gsub("<%= javascript_include_tag \"bootstrap.min\"%>"){|t| + # bootstrap_count += 1 + # (bootstrap_count > 1) ? "" : t + # } + # if new_texts.include?('jquery_prefix') + # new_texts = new_texts.gsub(/<.*javascript_include_tag.*\/jquery\.min.*>|<.*javascript_include_tag.*\/jquery-1\.11\.0\.min.*>/,"<%= javascript_include_tag \"jquery.min\"%>") + # else + # new_texts = new_texts.gsub(/<%= javascript_include_tag \"jquery.min\"%>/,"<%= javascript_include_tag \"jquery.min\"%>\n\t<%= javascript_include_tag \"jquery_prefix\"%>") + # end + # if texts != new_texts + # File.open(filename,'w') do |f| + # f.write new_texts + # end + # end + #rescue => e + # puts "#{e.inspect}\nnot found #{folder}partial/_head.html.erb" + #end begin begin