metanorma-ogc 2.2.5 → 2.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isodoc/ogc/html/htmlstyle.css +6 -0
  3. data/lib/isodoc/ogc/html/htmlstyle.scss +1 -0
  4. data/lib/isodoc/ogc/metadata.rb +7 -6
  5. data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +122 -16
  6. data/lib/isodoc/ogc/ogc.best-practice.xsl +122 -16
  7. data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +122 -16
  8. data/lib/isodoc/ogc/ogc.community-practice.xsl +122 -16
  9. data/lib/isodoc/ogc/ogc.community-standard.xsl +122 -16
  10. data/lib/isodoc/ogc/ogc.discussion-paper.xsl +122 -16
  11. data/lib/isodoc/ogc/ogc.draft-standard.xsl +10902 -0
  12. data/lib/isodoc/ogc/ogc.engineering-report.xsl +122 -16
  13. data/lib/isodoc/ogc/ogc.other.xsl +122 -16
  14. data/lib/isodoc/ogc/ogc.policy.xsl +122 -16
  15. data/lib/isodoc/ogc/ogc.reference-model.xsl +122 -16
  16. data/lib/isodoc/ogc/ogc.release-notes.xsl +122 -16
  17. data/lib/isodoc/ogc/ogc.standard.xsl +122 -16
  18. data/lib/isodoc/ogc/ogc.test-suite.xsl +122 -16
  19. data/lib/isodoc/ogc/ogc.user-guide.xsl +122 -16
  20. data/lib/isodoc/ogc/ogc.white-paper.xsl +120 -15
  21. data/lib/isodoc/ogc/pdf_convert.rb +5 -4
  22. data/lib/isodoc/ogc/presentation_xml_convert.rb +5 -5
  23. data/lib/metanorma/ogc/biblio.rng +5 -0
  24. data/lib/metanorma/ogc/cleanup.rb +14 -14
  25. data/lib/metanorma/ogc/converter.rb +2 -2
  26. data/lib/metanorma/ogc/front.rb +12 -8
  27. data/lib/metanorma/ogc/isodoc.rng +46 -12
  28. data/lib/metanorma/ogc/relaton-ogc.rng +1 -0
  29. data/lib/metanorma/ogc/validate.rb +15 -15
  30. data/lib/metanorma/ogc/version.rb +1 -1
  31. data/metanorma-ogc.gemspec +3 -2
  32. metadata +5 -11
  33. data/.github/workflows/automerge.yml +0 -31
  34. data/.github/workflows/rake.yml +0 -15
  35. data/.github/workflows/release.yml +0 -24
  36. data/Rakefile +0 -8
  37. data/bin/console +0 -14
  38. data/bin/rspec +0 -17
  39. data/bin/setup +0 -8
@@ -32,10 +32,12 @@ module Metanorma
32
32
 
33
33
  def stage_type_validate(stage, doctype)
34
34
  err = case doctype
35
- when "standard", "abstract-specification-topic"
35
+ when "standard", "abstract-specification-topic", "draft-standard"
36
36
  %w(draft work-item-draft).include?(stage)
37
37
  when "community-standard"
38
38
  %w(draft swg-draft).include?(stage)
39
+ when "best-practice", "community-practice"
40
+ %w(draft swg-draft work-item-draft).include?(stage)
39
41
  else %w(swg-draft oab-review public-rfc tc-vote
40
42
  work-item-draft deprecated rescinded).include?(stage)
41
43
  end
@@ -44,22 +46,20 @@ module Metanorma
44
46
  end
45
47
 
46
48
  def version_validate(xmldoc)
47
- version = xmldoc&.at("//bibdata/edition")&.text
48
- doctype = xmldoc&.at("//bibdata/ext/doctype")&.text
49
+ version = xmldoc.at("//bibdata/edition")&.text
50
+ doctype = xmldoc.at("//bibdata/ext/doctype")&.text
49
51
  if %w(engineering-report discussion-paper).include? doctype
50
- version.nil? or
51
- @log.add("Document Attributes", nil,
52
- "Version not permitted for #{doctype}")
52
+ version.nil? or @log.add("Document Attributes", nil,
53
+ "Version not permitted for #{doctype}")
53
54
  else
54
- version.nil? and
55
- @log.add("Document Attributes", nil,
56
- "Version required for #{doctype}")
55
+ version.nil? and @log.add("Document Attributes", nil,
56
+ "Version required for #{doctype}")
57
57
  end
58
58
  end
59
59
 
60
60
  def execsummary_validate(xmldoc)
61
- doctype = xmldoc&.at("//bibdata/ext/doctype")&.text
62
- sect = xmldoc&.at("//clause[@type = 'executivesummary']")
61
+ doctype = xmldoc.at("//bibdata/ext/doctype")&.text
62
+ sect = xmldoc.at("//clause[@type = 'executivesummary']")
63
63
  doctype == "engineering-report" && sect.nil? and
64
64
  @log.add("Style", nil,
65
65
  "Executive Summary required for Engineering Reports!")
@@ -91,7 +91,7 @@ module Metanorma
91
91
  val: ["./self::clause[@type = 'conformance']"],
92
92
  },
93
93
  {
94
- msg: "Normative References must be followed by "\
94
+ msg: "Normative References must be followed by " \
95
95
  "Terms and Definitions",
96
96
  val: ["./self::terms | .//terms"],
97
97
  },
@@ -110,7 +110,7 @@ module Metanorma
110
110
 
111
111
  def sections_sequence_validate(root)
112
112
  return unless STANDARDTYPE.include?(
113
- root&.at("//bibdata/ext/doctype")&.text,
113
+ root.at("//bibdata/ext/doctype")&.text,
114
114
  )
115
115
 
116
116
  names = root.xpath("//sections/* | //bibliography/*")
@@ -126,7 +126,7 @@ module Metanorma
126
126
  "Document must contain at least one clause")
127
127
  return
128
128
  end
129
- root.at("//references | //clause[descendant::references]"\
129
+ root.at("//references | //clause[descendant::references]" \
130
130
  "[not(parent::clause)]") or
131
131
  @log.add("Style", nil, "Normative References are mandatory")
132
132
  end
@@ -138,7 +138,7 @@ module Metanorma
138
138
  @log.add("Style", nil, "Keywords are missing!")
139
139
  root.at("//foreword") or @log.add("Style", nil,
140
140
  "Preface is missing!")
141
- root.at("//bibdata/contributor[role/@type = 'author']/organization/"\
141
+ root.at("//bibdata/contributor[role/@type = 'author']/organization/" \
142
142
  "name") or
143
143
  @log.add("Style", nil, "Submitting Organizations is missing!")
144
144
  root.at("//submitters") or @log.add("Style", nil,
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "2.2.5".freeze
3
+ VERSION = "2.2.6".freeze
4
4
  end
5
5
  end
@@ -17,12 +17,13 @@ Gem::Specification.new do |spec|
17
17
  spec.license = "BSD-2-Clause"
18
18
 
19
19
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
20
- f.match(%r{^(test|spec|features)/})
20
+ f.match(%r{^(test|spec|features|bin|.github)/}) \
21
+ || f.match(%r{Rakefile|bin/rspec})
21
22
  end
22
23
  spec.bindir = "exe"
23
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
25
  spec.require_paths = ["lib"]
25
- spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
26
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
26
27
 
27
28
  spec.add_dependency "iso-639"
28
29
  spec.add_dependency "metanorma-standoc", "~> 2.2.4"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ogc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.5
4
+ version: 2.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-24 00:00:00.000000000 Z
11
+ date: 2022-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639
@@ -215,9 +215,6 @@ executables: []
215
215
  extensions: []
216
216
  extra_rdoc_files: []
217
217
  files:
218
- - ".github/workflows/automerge.yml"
219
- - ".github/workflows/rake.yml"
220
- - ".github/workflows/release.yml"
221
218
  - ".gitignore"
222
219
  - ".hound.yml"
223
220
  - ".rubocop.yml"
@@ -225,10 +222,6 @@ files:
225
222
  - Gemfile
226
223
  - LICENSE
227
224
  - README.adoc
228
- - Rakefile
229
- - bin/console
230
- - bin/rspec
231
- - bin/setup
232
225
  - lib/isodoc/ogc.rb
233
226
  - lib/isodoc/ogc/base_convert.rb
234
227
  - lib/isodoc/ogc/biblio.rb
@@ -266,6 +259,7 @@ files:
266
259
  - lib/isodoc/ogc/ogc.community-practice.xsl
267
260
  - lib/isodoc/ogc/ogc.community-standard.xsl
268
261
  - lib/isodoc/ogc/ogc.discussion-paper.xsl
262
+ - lib/isodoc/ogc/ogc.draft-standard.xsl
269
263
  - lib/isodoc/ogc/ogc.engineering-report.xsl
270
264
  - lib/isodoc/ogc/ogc.other.xsl
271
265
  - lib/isodoc/ogc/ogc.policy.xsl
@@ -314,14 +308,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
314
308
  requirements:
315
309
  - - ">="
316
310
  - !ruby/object:Gem::Version
317
- version: 2.5.0
311
+ version: 2.7.0
318
312
  required_rubygems_version: !ruby/object:Gem::Requirement
319
313
  requirements:
320
314
  - - ">="
321
315
  - !ruby/object:Gem::Version
322
316
  version: '0'
323
317
  requirements: []
324
- rubygems_version: 3.1.6
318
+ rubygems_version: 3.3.7
325
319
  signing_key:
326
320
  specification_version: 4
327
321
  summary: Metanorma for the Open Geospatial Consortium.
@@ -1,31 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- # source: https://github.com/marketplace/actions/merge-pull-requests#usage
4
- name: automerge
5
- on:
6
- pull_request:
7
- types:
8
- - labeled
9
- - unlabeled
10
- - synchronize
11
- - opened
12
- - edited
13
- - ready_for_review
14
- - reopened
15
- - unlocked
16
- pull_request_review:
17
- types:
18
- - submitted
19
- check_suite:
20
- types:
21
- - completed
22
- status: {}
23
- jobs:
24
- automerge:
25
- runs-on: ubuntu-latest
26
- steps:
27
- - id: automerge
28
- name: automerge
29
- uses: "pascalgn/automerge-action@v0.15.3"
30
- env:
31
- GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
@@ -1,15 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: rake
4
-
5
- on:
6
- push:
7
- branches: [ master, main ]
8
- tags: [ v* ]
9
- pull_request:
10
-
11
- jobs:
12
- notify:
13
- uses: metanorma/ci/.github/workflows/mn-processor-rake.yml@main
14
- secrets:
15
- pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
@@ -1,24 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: release
4
-
5
- on:
6
- workflow_dispatch:
7
- inputs:
8
- next_version:
9
- description: |
10
- Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
11
- required: true
12
- default: 'skip'
13
- push:
14
- tags: [ v* ]
15
-
16
- jobs:
17
- release:
18
- uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
19
- with:
20
- next_version: ${{ github.event.inputs.next_version }}
21
- secrets:
22
- rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }}
23
- pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
24
-
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
- require "isodoc/gem_tasks"
4
-
5
- IsoDoc::GemTasks.install
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- task default: :spec
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "metanorma/ogc"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/rspec DELETED
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'rspec' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path(
11
- "../../Gemfile", Pathname.new(__FILE__).realpath
12
- )
13
-
14
- require "rubygems"
15
- require "bundler/setup"
16
-
17
- load Gem.bin_path("rspec-core", "rspec")
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here