Skip to content

Commit

Permalink
rspec
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed May 25, 2024
1 parent beeea8c commit cd49114
Show file tree
Hide file tree
Showing 6 changed files with 1,440 additions and 24 deletions.
11 changes: 6 additions & 5 deletions lib/metanorma/plateau/converter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def validate(doc)
File.join(File.dirname(__FILE__), "plateau.rng"))
end

def org_abbrev
def org_abbrev
super.merge("Japanese Ministry of Land, Infrastructure, Transport and Tourism" => "MLIT")
end

Expand All @@ -25,17 +25,18 @@ def default_publisher

# Plateau reuse of the JIS publisher default setting
JIS_HASH =
{ "ja" => "国土交通省都市局", "en" => "Japanese Ministry of Land, Infrastructure, Transport and Tourism" }.freeze
{ "ja" => "国土交通省都市局",
"en" => "Japanese Ministry of Land, Infrastructure, Transport and Tourism" }.freeze

def metadata_ext(node, xml)
super
metadata_coverpage_images(node, xml)
metadata_author_cooperation(node, xml)
end

def metadata_author_cooperation(node, xml)
a = node.attr("author-cooperation") and xml.author_cooperation a
end
def metadata_author_cooperation(node, xml)
a = node.attr("author-cooperation") and xml.author_cooperation a
end

def metadata_coverpage_images(node, xml)
%w(coverpage-image).each do |n|
Expand Down
16 changes: 8 additions & 8 deletions lib/metanorma/plateau/processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ def output(xml, inname, outname, format, options = {})
options_preprocess(options)
case format
when :html
IsoDoc::Plateau::HtmlConvert.new(options).convert(inname, xml, nil,
outname)
IsoDoc::Plateau::HtmlConvert.new(options)
.convert(inname, xml, nil, outname)
when :doc
IsoDoc::Plateau::WordConvert.new(options).convert(inname, xml, nil,
outname)
IsoDoc::Plateau::WordConvert.new(options)
.convert(inname, xml, nil, outname)
when :pdf
IsoDoc::Plateau::PdfConvert.new(options).convert(inname, xml, nil,
outname)
IsoDoc::Plateau::PdfConvert.new(options)
.convert(inname, xml, nil, outname)
when :presentation
IsoDoc::Plateau::PresentationXMLConvert.new(options).convert(inname, xml,
nil, outname)
IsoDoc::Plateau::PresentationXMLConvert.new(options)
.convert(inname, xml, nil, outname)
else
super
end
Expand Down
Loading

0 comments on commit cd49114

Please sign in to comment.