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"%>'
|
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"%>'
|
edit_texts = '<%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"%>'
|
||||||
all_template.each do |folder|
|
all_template.each do |folder|
|
||||||
if folder.split('/')[-1] != 'mobile'
|
if !folder.include?('mobile')
|
||||||
begin
|
if folder.split('/')[-1] != 'mobile'
|
||||||
system ('cp -r '+ app_path + '/modules/. ' + folder+'/modules/.')
|
begin
|
||||||
rescue
|
system ('cp -r '+ app_path + '/modules/. ' + folder+'/modules/.')
|
||||||
puts 'error copy'
|
rescue
|
||||||
end
|
puts 'error copy'
|
||||||
end
|
end
|
||||||
texts = File.read(folder+'partial/_head.html.erb')
|
end
|
||||||
insert_flag = 0
|
texts = File.read(folder+'partial/_head.html.erb')
|
||||||
if texts.include?(check_texts)
|
insert_flag = 0
|
||||||
texts.gsub(check_texts,edit_texts)
|
if texts.include?(check_texts)
|
||||||
insert_flag = 1
|
texts.gsub(check_texts,edit_texts)
|
||||||
end
|
insert_flag = 1
|
||||||
if insert_flag == 1
|
end
|
||||||
f = File.open(folder+'partial/_head.html.erb','w')
|
if insert_flag == 1
|
||||||
f.write(texts)
|
f = File.open(folder+'partial/_head.html.erb','w')
|
||||||
f.close
|
f.write(texts)
|
||||||
|
f.close
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
|
|
Loading…
Reference in New Issue