fix
This commit is contained in:
parent
65b96b9fdc
commit
19b2afcab1
|
@ -22,23 +22,25 @@ puts 'copying module'
|
|||
check_texts = '<%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/js/bootstrap.min.js"%>'
|
||||
edit_texts = '<%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"%>'
|
||||
all_template.each do |folder|
|
||||
if folder.split('/')[-1] != 'mobile'
|
||||
begin
|
||||
system ('cp -r '+ app_path + '/modules/. ' + folder+'/modules/.')
|
||||
rescue
|
||||
puts 'error copy'
|
||||
end
|
||||
end
|
||||
texts = File.read(folder+'partial/_head.html.erb')
|
||||
insert_flag = 0
|
||||
if texts.include?(check_texts)
|
||||
texts.gsub(check_texts,edit_texts)
|
||||
insert_flag = 1
|
||||
end
|
||||
if insert_flag == 1
|
||||
f = File.open(folder+'partial/_head.html.erb','w')
|
||||
f.write(texts)
|
||||
f.close
|
||||
if !folder.include?('mobile')
|
||||
if folder.split('/')[-1] != 'mobile'
|
||||
begin
|
||||
system ('cp -r '+ app_path + '/modules/. ' + folder+'/modules/.')
|
||||
rescue
|
||||
puts 'error copy'
|
||||
end
|
||||
end
|
||||
texts = File.read(folder+'partial/_head.html.erb')
|
||||
insert_flag = 0
|
||||
if texts.include?(check_texts)
|
||||
texts.gsub(check_texts,edit_texts)
|
||||
insert_flag = 1
|
||||
end
|
||||
if insert_flag == 1
|
||||
f = File.open(folder+'partial/_head.html.erb','w')
|
||||
f.write(texts)
|
||||
f.close
|
||||
end
|
||||
end
|
||||
end
|
||||
Gem::Specification.new do |s|
|
||||
|
|
Loading…
Reference in New Issue