lib/isodoc/gb/gbconvert.rb in asciidoctor-gb-0.3.5 vs lib/isodoc/gb/gbconvert.rb in asciidoctor-gb-0.3.7

- old
+ new

@@ -1,8 +1,9 @@ require "isodoc" require_relative "./gbcleanup.rb" require_relative "./metadata.rb" +require "fileutils" module IsoDoc module Gb # A {Converter} implementation that generates GB output, and a document # schema encapsulation of the document for validation @@ -17,11 +18,12 @@ def format_agency(agency, format) return agency unless agency.is_a?(Array) if agency == ["中华人民共和国国家质量监督检验检疫总局", "中国国家标准化管理委员会"] logo = "gb-issuer-default.gif" - system "cp #{fileloc(File.join('html/gb-logos', logo))} #{logo}" + #system "cp #{fileloc(File.join('html/gb-logos', logo))} #{logo}" + FileUtils.cp fileloc(File.join('html/gb-logos', logo)), logo return "<img src='#{logo}' alt='#{agency.join(",")}'></img>" end format_agency1(agency, format) end @@ -50,10 +52,11 @@ end def format_logo1(logo, prefix, scope) logo += ".gif" - system "cp #{fileloc(File.join('html/gb-logos', logo))} #{logo}" + #system "cp #{fileloc(File.join('html/gb-logos', logo))} #{logo}" + FileUtils.cp fileloc(File.join('html/gb-logos', logo)), logo local = local_logo_suffix(scope) #@files_to_delete << logo "<img width='113' height='56' src='#{logo}' alt='#{prefix}'></img>"\ "#{local}" end