diff --git a/Gemfile b/Gemfile
index 9265a10a..6afa08ee 100644
--- a/Gemfile
+++ b/Gemfile
@@ -4,9 +4,12 @@ Encoding.default_internal = Encoding::UTF_8
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}" }
-gemspec
+group :development, :test do
+ gem "rspec"
+end
if File.exist? "Gemfile.devel"
eval File.read("Gemfile.devel"), nil, "Gemfile.devel" # rubocop:disable Security/Eval
end
+gemspec
diff --git a/Gemfile.devel b/Gemfile.devel
new file mode 100644
index 00000000..0b68a228
--- /dev/null
+++ b/Gemfile.devel
@@ -0,0 +1,2 @@
+gem "metanorma-standoc", git: "https://github.com/metanorma/metanorma-standoc", branch: "features/logos"
+
diff --git a/lib/metanorma/ogc/front.rb b/lib/metanorma/ogc/front.rb
index bbe56bff..3339c70b 100644
--- a/lib/metanorma/ogc/front.rb
+++ b/lib/metanorma/ogc/front.rb
@@ -11,8 +11,7 @@ def metadata_author(node, xml)
end
def corporate_author(node, xml)
- return unless node.attr("submitting-organizations")
-
+ node.attr("submitting-organizations") or return
csv_split(HTMLEntities.new
.decode(node.attr("submitting-organizations")), ";")&.each do |org|
xml.contributor do |c|
@@ -49,8 +48,7 @@ def personal_role(node, contrib, suffix)
end
def ogc_editor(node, xml)
- return unless node.attr("editor")
-
+ node.attr("editor") or return
xml.contributor do |c|
c.role type: "editor"
c.person do |p|
@@ -78,12 +76,15 @@ def personal_author1(node, xml, suffix)
end
def default_publisher
- "Open Geospatial Consortium"
+ "OGC"
end
- def metadata_committee(node, xml)
- return unless node.attr("committee")
+ def org_abbrev
+ { "Open Geospatial Consortium" => "OGC" }
+ end
+ def metadata_committee(node, xml)
+ node.attr("committee") or return
xml.editorialgroup do |a|
metadata_committee1(node, a)
end
@@ -102,12 +103,10 @@ def metadata_committee1(node, xml)
end
def externalid(node)
- return node.attr("external-id") if node.attr("external-id")
-
+ i = node.attr("external-id") and return i
d = doctype(node)
a = node.attr("abbrev")
- return unless d && a
-
+ d && a or return
url = "http://www.opengis.net/doc/#{IsoDoc::Ogc::DOCTYPE_ABBR[d]}/#{a}"
v = (node.attr("edition") || node.attr("version")) and url += "/#{v}"
url
diff --git a/spec/metanorma/base_spec.rb b/spec/metanorma/base_spec.rb
index 86234027..803f1062 100644
--- a/spec/metanorma/base_spec.rb
+++ b/spec/metanorma/base_spec.rb
@@ -120,6 +120,7 @@
Open Geospatial Consortium
+ OGC
2.0
@@ -138,6 +139,7 @@
Open Geospatial Consortium
+ OGC
@@ -291,6 +293,7 @@
Open Geospatial Consortium
+ OGC
2.0
@@ -309,6 +312,7 @@
Open Geospatial Consortium
+ OGC
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index b45db05e..a7da9985 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -179,6 +179,7 @@ def boilerplate(xmldoc)
Open Geospatial Consortium
+ OGC
@@ -192,6 +193,7 @@ def boilerplate(xmldoc)
Open Geospatial Consortium
+ OGC