metanorma-iso 1.10.3 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +3 -33
  3. data/.github/workflows/ubuntu.yml +1 -1
  4. data/.gitignore +26 -0
  5. data/Gemfile +1 -1
  6. data/Makefile +1 -1
  7. data/lib/asciidoctor/iso/base.rb +2 -69
  8. data/lib/asciidoctor/iso/cleanup.rb +2 -175
  9. data/lib/asciidoctor/iso/converter.rb +2 -17
  10. data/lib/asciidoctor/iso/deprecated.rb +5 -0
  11. data/lib/asciidoctor/iso/front.rb +2 -156
  12. data/lib/asciidoctor/iso/front_id.rb +2 -221
  13. data/lib/asciidoctor/iso/section.rb +2 -48
  14. data/lib/asciidoctor/iso/validate.rb +2 -171
  15. data/lib/asciidoctor/iso/validate_image.rb +2 -96
  16. data/lib/asciidoctor/iso/validate_requirements.rb +2 -110
  17. data/lib/asciidoctor/iso/validate_section.rb +2 -246
  18. data/lib/asciidoctor/iso/validate_style.rb +2 -169
  19. data/lib/asciidoctor/iso/validate_title.rb +2 -104
  20. data/lib/isodoc/iso/base_convert.rb +14 -31
  21. data/lib/isodoc/iso/html/style-human.css +40 -8
  22. data/lib/isodoc/iso/html/style-human.scss +36 -8
  23. data/lib/isodoc/iso/html/style-iso.css +35 -5
  24. data/lib/isodoc/iso/html/style-iso.scss +31 -5
  25. data/lib/isodoc/iso/html/wordstyle.css +10 -8
  26. data/lib/isodoc/iso/html/wordstyle.scss +10 -8
  27. data/lib/isodoc/iso/html_convert.rb +83 -22
  28. data/lib/isodoc/iso/index.rb +53 -45
  29. data/lib/isodoc/iso/iso.amendment.xsl +477 -264
  30. data/lib/isodoc/iso/iso.international-standard.xsl +477 -264
  31. data/lib/isodoc/iso/metadata.rb +27 -22
  32. data/lib/isodoc/iso/presentation_xml_convert.rb +42 -17
  33. data/lib/isodoc/iso/sts_convert.rb +2 -4
  34. data/lib/isodoc/iso/word_convert.rb +0 -2
  35. data/lib/metanorma/iso/base.rb +70 -0
  36. data/lib/{asciidoctor → metanorma}/iso/basicdoc.rng +0 -0
  37. data/lib/{asciidoctor → metanorma}/iso/biblio.rng +0 -0
  38. data/lib/{asciidoctor → metanorma}/iso/boilerplate-fr.xml +0 -0
  39. data/lib/{asciidoctor → metanorma}/iso/boilerplate.xml +0 -0
  40. data/lib/metanorma/iso/cleanup.rb +176 -0
  41. data/lib/metanorma/iso/converter.rb +18 -0
  42. data/lib/metanorma/iso/front.rb +170 -0
  43. data/lib/metanorma/iso/front_id.rb +225 -0
  44. data/lib/{asciidoctor → metanorma}/iso/isodoc.rng +49 -2
  45. data/lib/{asciidoctor → metanorma}/iso/isostandard-amd.rng +0 -0
  46. data/lib/{asciidoctor → metanorma}/iso/isostandard.rnc +0 -0
  47. data/lib/{asciidoctor → metanorma}/iso/isostandard.rng +14 -0
  48. data/lib/{asciidoctor → metanorma}/iso/reqt.rng +0 -0
  49. data/lib/metanorma/iso/section.rb +49 -0
  50. data/lib/metanorma/iso/validate.rb +172 -0
  51. data/lib/metanorma/iso/validate_image.rb +97 -0
  52. data/lib/metanorma/iso/validate_requirements.rb +111 -0
  53. data/lib/metanorma/iso/validate_section.rb +247 -0
  54. data/lib/metanorma/iso/validate_style.rb +170 -0
  55. data/lib/metanorma/iso/validate_title.rb +105 -0
  56. data/lib/metanorma/iso/version.rb +1 -1
  57. data/lib/metanorma-iso.rb +1 -1
  58. data/metanorma-iso.gemspec +2 -2
  59. data/spec/isodoc/amd_spec.rb +261 -250
  60. data/spec/isodoc/inline_spec.rb +238 -212
  61. data/spec/isodoc/iso_spec.rb +3 -1
  62. data/spec/isodoc/postproc_spec.rb +111 -28
  63. data/spec/isodoc/ref_spec.rb +4 -2
  64. data/spec/isodoc/section_spec.rb +1 -1
  65. data/spec/isodoc/terms_spec.rb +17 -24
  66. data/spec/{asciidoctor → metanorma}/amd_spec.rb +1 -1
  67. data/spec/metanorma/base_spec.rb +1185 -0
  68. data/spec/{asciidoctor → metanorma}/blank_spec.rb +1 -1
  69. data/spec/{asciidoctor → metanorma}/blocks_spec.rb +1 -1
  70. data/spec/{asciidoctor → metanorma}/cleanup_spec.rb +1 -1
  71. data/spec/{asciidoctor → metanorma}/inline_spec.rb +1 -1
  72. data/spec/{asciidoctor → metanorma}/lists_spec.rb +1 -1
  73. data/spec/metanorma/processor_spec.rb +1 -1
  74. data/spec/{asciidoctor → metanorma}/refs_spec.rb +1 -1
  75. data/spec/{asciidoctor → metanorma}/section_spec.rb +1 -1
  76. data/spec/{asciidoctor → metanorma}/table_spec.rb +1 -1
  77. data/spec/{asciidoctor → metanorma}/validate_spec.rb +1 -1
  78. data/spec/spec_helper.rb +1 -1
  79. data/spec/vcr_cassettes/docrels.yml +35 -425
  80. metadata +40 -27
  81. data/spec/asciidoctor/base_spec.rb +0 -1333
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe Asciidoctor::ISO do
3
+ RSpec.describe Metanorma::ISO do
4
4
  it "processes a blank document" do
5
5
  input = <<~INPUT
6
6
  #{ASCIIDOC_BLANK_HDR}
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe Asciidoctor::ISO do
3
+ RSpec.describe Metanorma::ISO do
4
4
  it "processes open blocks" do
5
5
  input = <<~INPUT
6
6
  #{ASCIIDOC_BLANK_HDR}
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe Asciidoctor::ISO do
3
+ RSpec.describe Metanorma::ISO do
4
4
  it "removes empty text elements" do
5
5
  input = <<~INPUT
6
6
  #{ASCIIDOC_BLANK_HDR}
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe Asciidoctor::ISO do
3
+ RSpec.describe Metanorma::ISO do
4
4
  it "processes inline_quoted formatting" do
5
5
  expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
6
6
  #{ASCIIDOC_BLANK_HDR}
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe Asciidoctor::ISO do
3
+ RSpec.describe Metanorma::ISO do
4
4
  it "processes simple lists" do
5
5
  output = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
6
6
  #{ASCIIDOC_BLANK_HDR}
@@ -38,7 +38,7 @@ RSpec.describe Metanorma::Iso::Processor do
38
38
  <substage>60</substage>
39
39
  </status>
40
40
  <copyright>
41
- <from>2021</from>
41
+ <from>#{Time.new.year}</from>
42
42
  <owner>
43
43
  <organization>
44
44
  <name>International Organization for Standardization</name>
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
  require "relaton_iso"
3
3
  require "relaton_ietf"
4
4
 
5
- RSpec.describe Asciidoctor::ISO do
5
+ RSpec.describe Metanorma::ISO do
6
6
  it "processes draft ISO reference" do
7
7
  mock_fdis
8
8
  input = <<~INPUT
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe Asciidoctor::ISO do
3
+ RSpec.describe Metanorma::ISO do
4
4
  it "processes sections" do
5
5
  input = <<~INPUT
6
6
  #{ASCIIDOC_BLANK_HDR}
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe Asciidoctor::ISO do
3
+ RSpec.describe Metanorma::ISO do
4
4
  it "processes basic tables" do
5
5
  expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
6
6
  #{ASCIIDOC_BLANK_HDR}
@@ -1,7 +1,7 @@
1
1
  require "spec_helper"
2
2
  require "fileutils"
3
3
 
4
- RSpec.describe Asciidoctor::ISO do
4
+ RSpec.describe Metanorma::ISO do
5
5
  context "when xref_error.adoc compilation" do
6
6
  it "generates error file" do
7
7
  FileUtils.rm_f "xref_error.err"
data/spec/spec_helper.rb CHANGED
@@ -132,7 +132,7 @@ VALIDATING_BLANK_HDR = <<~"HDR".freeze
132
132
  HDR
133
133
 
134
134
  ASCIIDOCTOR_ISO_DIR = Pathname
135
- .new(File.dirname(__FILE__)) / "../lib/asciidoctor/iso"
135
+ .new(File.dirname(__FILE__)) / "../lib/metanorma/iso"
136
136
 
137
137
  BOILERPLATE =
138
138
  HTMLEntities.new.decode(