test fix
This commit is contained in:
parent
38f9601a2b
commit
2bd6a5de31
|
@ -14,21 +14,19 @@ end
|
|||
#Add patchfile to Admin area
|
||||
@patchfile_li = File.read(app_path+"/patchfile_li.txt")
|
||||
@patchfile_li_choices = File.read(app_path+"/patchfile_li_choices.txt")
|
||||
Dir.chdir(ENV['PWD']+'/app/views/shared') do
|
||||
@file_text = File.read("_side_bar.html.erb")
|
||||
if !@file_text.include?('<div class="patchfile sub-nav-block icons-megaphone">')
|
||||
@indert_index = @file_text.index('</nav>')
|
||||
@file_text.insert(@indert_index , @patchfile_li_choices)
|
||||
end
|
||||
if !@file_text.include?('patchfile_li')
|
||||
@indert_index = @file_text.index('<li title="<%= t(\'site_info\') %>">')
|
||||
@file_text.insert(@indert_index , @patchfile_li)
|
||||
end
|
||||
f = File.open('_side_bar.html.erb','w')
|
||||
f.write(@file_text)
|
||||
f.close
|
||||
puts "finish change patchfile in #{ENV['PWD']}/app/views/shared"
|
||||
@file_text = File.read(ENV['PWD']+'/app/views/shared/_side_bar.html.erb")
|
||||
if !@file_text.include?('<div class="patchfile sub-nav-block icons-megaphone">')
|
||||
@indert_index = @file_text.index('</nav>')
|
||||
@file_text.insert(@indert_index , @patchfile_li_choices)
|
||||
end
|
||||
if !@file_text.include?('patchfile_li')
|
||||
@indert_index = @file_text.index('<li title="<%= t(\'site_info\') %>">')
|
||||
@file_text.insert(@indert_index , @patchfile_li)
|
||||
end
|
||||
f = File.open(ENV['PWD']+'/app/views/shared/_side_bar.html.erb','w')
|
||||
f.write(@file_text)
|
||||
f.close
|
||||
puts "finish change patchfile in #{ENV['PWD']}/app/views/shared"
|
||||
# Describe your gem and declare its dependencies:
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "patchfile"
|
||||
|
|
Loading…
Reference in New Issue