Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Aug 19, 2024
1 parent 2b7281b commit 58a738d
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion lib/metanorma/standoc/blocks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def pass(node)
noko do |xml|
xml.passthrough **attr_code(formats:
node.attr("format") || "metanorma") do |p|
#p << @c.encode(@c.decode(node.content), :basic, :hexadecimal)
# p << @c.encode(@c.decode(node.content), :basic, :hexadecimal)
p << @c.encode(node.content, :basic, :hexadecimal)
end
end
Expand Down
3 changes: 1 addition & 2 deletions lib/metanorma/standoc/cleanup_bibdata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ def ext_contributors_process(yaml, ins)
yaml.is_a?(Hash) && !yaml["contributor"] and yaml = [yaml]
yaml.is_a?(Array) and yaml = { "contributor" => yaml }
r = yaml2relaton(yaml)
Nokogiri::XML(r).xpath("//contributor").reverse
.each do |c|
Nokogiri::XML(r).xpath("//contributor").reverse_each do |c|
ins.next = c
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/metanorma/standoc/cleanup_toc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def toc_cleanup(xmldoc)

def toc_cleanup_para(xmldoc)
xmldoc.xpath("//p[toc]").each do |x|
x.xpath("./toc").reverse.each do |t|
x.xpath("./toc").reverse_each do |t|
x.next = t
end
x.remove if x.text.strip.empty?
Expand Down
22 changes: 11 additions & 11 deletions lib/metanorma/standoc/datamodel/plantuml_renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def join_as_plantuml(*ary)
def render
ERB.new(
File.read(
File.join(TEMPLATES_PATH, "plantuml_representation.adoc.erb")
)
File.join(TEMPLATES_PATH, "plantuml_representation.adoc.erb"),
),
).result(binding)
end

Expand All @@ -46,7 +46,7 @@ def class_defs_yml_to_plantuml
'******* CLASS DEFINITIONS ********************************************
#{join_as_plantuml(
classes_to_classes_plantuml(yml['classes']),
enums_to_enums_plantuml(yml['enums'])
enums_to_enums_plantuml(yml['enums']),
)}
TEMPLATE
end
Expand All @@ -57,7 +57,7 @@ def class_groups_yml_to_plantuml
<<~TEMPLATE
'******* CLASS GROUPS *************************************************
#{join_as_plantuml(
groups_to_plantuml(yml['groups'])
groups_to_plantuml(yml['groups']),
)}
TEMPLATE
end
Expand All @@ -69,7 +69,7 @@ def class_relations_yml_to_plantuml
'******* CLASS RELATIONS **********************************************
#{join_as_plantuml(
classes_to_relations_plantuml(yml['classes']),
relations_to_plantuml(nil, yml['relations'])
relations_to_plantuml(nil, yml['relations']),
)}
TEMPLATE
end
Expand All @@ -80,7 +80,7 @@ def diagram_options_yml_to_plantuml
<<~TEMPLATE
'******* DIAGRAM SPECIFIC CONFIG **************************************
#{join_as_plantuml(
diagram_options_to_plantuml(yml['diagram_options'])
diagram_options_to_plantuml(yml['diagram_options']),
)}
TEMPLATE
end
Expand Down Expand Up @@ -122,7 +122,7 @@ def class_to_plantuml(class_name, class_hash)
class #{class_name}#{model_stereotype_to_plantuml(class_hash['type'])} {
#{join_as_plantuml(
attributes_to_plantuml(class_hash['attributes']),
constraints_to_plantuml(class_hash['constraints'])
constraints_to_plantuml(class_hash['constraints']),
)}
}
TEMPLATE
Expand Down Expand Up @@ -165,7 +165,7 @@ def constraints_to_plantuml(constraints)
<<~TEMPLATE
__ constraints __
#{join_as_plantuml(
*constraints_output
*constraints_output,
)}
TEMPLATE
end
Expand Down Expand Up @@ -218,14 +218,14 @@ def relation_label(action)

def source_arrow_end(source, relationship)
source_attribute = relationship_cardinality_to_plantuml(
relationship["source"]["attribute"]
relationship["source"]["attribute"],
)
[source, source_attribute].join(" ")
end

def target_arrow_end(target, relationship, action)
target_attribute = relationship_cardinality_to_plantuml(
relationship["target"]["attribute"]
relationship["target"]["attribute"],
)
[
[target_attribute, target].join(" "),
Expand Down Expand Up @@ -283,7 +283,7 @@ def attribute_cardinality(attribute_cardinality)
if attribute_cardinality
cardinality = attribute_cardinality_plantuml(
attribute_cardinality,
false
false,
)
cardinality = " #{cardinality}"
end
Expand Down
2 changes: 1 addition & 1 deletion lib/metanorma/standoc/reqt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def requirement(node, obligation, type)

def requirement_validate(docxml)
docxml.xpath("//requirement | //recommendation | //permission")
.each_with_object([]) do |r, m|
.each do |r|
@reqt_models.model(r["model"]).validate(r, @log)
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/metanorma/standoc/spans_to_bibitem_preprocessing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def span_preprocess1(span, ret)
case span[:key]
when "uri", "docid"
val = link_unwrap(Nokogiri::XML.fragment(span[:val])).to_xml
ret[span[:key].to_sym] << { type: span[:type], val: val }
ret[span[:key].to_sym] << { type: span[:type], val: }
when "date"
ret[span[:key].to_sym] << { type: span[:type] || "published",
val: span[:val] }
Expand Down Expand Up @@ -79,7 +79,7 @@ def span_preprocess1(span, ret)
else
msg = "unrecognised key '#{span[:key]}' in " \
"`span:#{span[:key]}[#{span[:val]}]`"
@err << { msg: msg }
@err << { msg: }
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/metanorma/standoc/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ def versioned(mod, flavour)
end

module Standoc
VERSION = "2.9.3".freeze
VERSION = "2.9.4".freeze
end
end

0 comments on commit 58a738d

Please sign in to comment.