fix error
This commit is contained in:
parent
a43eaf4215
commit
b0b010d274
|
@ -46,10 +46,10 @@ all_template.each do |folder|
|
||||||
filename = folder+'partial/_head.html.erb'
|
filename = folder+'partial/_head.html.erb'
|
||||||
texts = File.read(filename).force_encoding('UTF-8')
|
texts = File.read(filename).force_encoding('UTF-8')
|
||||||
new_texts = texts.gsub(/<.*javascript_include_tag.*bootstrap.*>/,"<%= javascript_include_tag \"bootstrap.min\"%>")
|
new_texts = texts.gsub(/<.*javascript_include_tag.*bootstrap.*>/,"<%= javascript_include_tag \"bootstrap.min\"%>")
|
||||||
if new_texts.scan('jquery_prefix').length>0
|
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\"%>")
|
new_texts = new_texts.gsub(/<.*javascript_include_tag.*\/jquery\.min.*>|<.*javascript_include_tag.*\/jquery-1\.11\.0\.min.*>/,"<%= javascript_include_tag \"jquery.min\"%>")
|
||||||
else
|
else
|
||||||
new_texts = new_texts.gsub(/<.*javascript_include_tag.*\/jquery\.min.*>|<.*javascript_include_tag.*\/jquery-1\.11\.0\.min.*>/,"<%= javascript_include_tag \"jquery.min\"%><%= javascript_include_tag \"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\"%>\n<%= javascript_include_tag \"jquery_prefix\"%>")
|
||||||
end
|
end
|
||||||
if texts != new_texts
|
if texts != new_texts
|
||||||
File.open(filename,'w') do |f|
|
File.open(filename,'w') do |f|
|
||||||
|
|
Loading…
Reference in New Issue