metanorma-iso 1.8.0 → 1.8.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +3 -13
  3. data/.hound.yml +3 -1
  4. data/.rubocop.yml +4 -8
  5. data/lib/asciidoctor/iso/base.rb +14 -11
  6. data/lib/asciidoctor/iso/biblio.rng +1 -0
  7. data/lib/asciidoctor/iso/cleanup.rb +40 -24
  8. data/lib/asciidoctor/iso/front.rb +28 -16
  9. data/lib/asciidoctor/iso/front_id.rb +66 -50
  10. data/lib/asciidoctor/iso/isodoc.rng +191 -3
  11. data/lib/asciidoctor/iso/isostandard-amd.rng +3 -0
  12. data/lib/asciidoctor/iso/isostandard.rng +12 -0
  13. data/lib/asciidoctor/iso/section.rb +2 -1
  14. data/lib/asciidoctor/iso/validate.rb +22 -110
  15. data/lib/asciidoctor/iso/validate_image.rb +97 -0
  16. data/lib/asciidoctor/iso/validate_requirements.rb +26 -20
  17. data/lib/asciidoctor/iso/validate_section.rb +55 -29
  18. data/lib/asciidoctor/iso/validate_style.rb +36 -24
  19. data/lib/asciidoctor/iso/validate_title.rb +2 -4
  20. data/lib/isodoc/iso/base_convert.rb +20 -14
  21. data/lib/isodoc/iso/html/isodoc.css +475 -20
  22. data/lib/isodoc/iso/html/isodoc.scss +456 -23
  23. data/lib/isodoc/iso/html/wordstyle.css +202 -31
  24. data/lib/isodoc/iso/html/wordstyle.scss +194 -32
  25. data/lib/isodoc/iso/iso.amendment.xsl +666 -193
  26. data/lib/isodoc/iso/iso.international-standard.xsl +666 -193
  27. data/lib/isodoc/iso/metadata.rb +3 -2
  28. data/lib/isodoc/iso/presentation_xml_convert.rb +15 -14
  29. data/lib/isodoc/iso/sts_convert.rb +10 -13
  30. data/lib/isodoc/iso/word_convert.rb +153 -39
  31. data/lib/isodoc/iso/xref.rb +44 -29
  32. data/lib/metanorma/iso/processor.rb +1 -0
  33. data/lib/metanorma/iso/version.rb +1 -1
  34. data/metanorma-iso.gemspec +3 -3
  35. data/spec/asciidoctor/base_spec.rb +426 -305
  36. data/spec/asciidoctor/blocks_spec.rb +96 -34
  37. data/spec/asciidoctor/cleanup_spec.rb +383 -25
  38. data/spec/asciidoctor/section_spec.rb +0 -14
  39. data/spec/asciidoctor/validate_spec.rb +218 -83
  40. data/spec/isodoc/amd_spec.rb +193 -201
  41. data/spec/isodoc/blocks_spec.rb +100 -88
  42. data/spec/isodoc/i18n_spec.rb +36 -36
  43. data/spec/isodoc/inline_spec.rb +2 -2
  44. data/spec/isodoc/iso_spec.rb +86 -138
  45. data/spec/isodoc/postproc_spec.rb +492 -442
  46. data/spec/isodoc/ref_spec.rb +6 -6
  47. data/spec/isodoc/section_spec.rb +301 -306
  48. data/spec/isodoc/table_spec.rb +166 -231
  49. data/spec/isodoc/terms_spec.rb +11 -8
  50. data/spec/isodoc/xref_spec.rb +147 -118
  51. data/spec/spec_helper.rb +16 -15
  52. metadata +8 -7
data/spec/spec_helper.rb CHANGED
@@ -24,16 +24,14 @@ RSpec.configure do |config|
24
24
  c.syntax = :expect
25
25
  end
26
26
 
27
- =begin
28
- config.around do |example|
29
- Dir.mktmpdir("rspec-") do |dir|
30
- tmp_assets = File.join(dir, "spec/assets/")
31
- FileUtils.mkdir_p tmp_assets
32
- FileUtils.cp_r Dir.glob("spec/assets/*"), tmp_assets
33
- Dir.chdir(dir) { example.run }
34
- end
35
- end
36
- =end
27
+ # config.around do |example|
28
+ # Dir.mktmpdir("rspec-") do |dir|
29
+ # tmp_assets = File.join(dir, "spec/assets/")
30
+ # FileUtils.mkdir_p tmp_assets
31
+ # FileUtils.cp_r Dir.glob("spec/assets/*"), tmp_assets
32
+ # Dir.chdir(dir) { example.run }
33
+ # end
34
+ # end
37
35
  end
38
36
 
39
37
  def strip_guid(xml)
@@ -120,22 +118,25 @@ VALIDATING_BLANK_HDR = <<~"HDR".freeze
120
118
  :no-isobib:
121
119
  HDR
122
120
 
123
- ASCIIDOCTOR_ISO_DIR = Pathname.new(File.dirname(__FILE__)) / "../lib/asciidoctor/iso"
121
+ ASCIIDOCTOR_ISO_DIR = Pathname
122
+ .new(File.dirname(__FILE__)) / "../lib/asciidoctor/iso"
124
123
 
125
124
  BOILERPLATE =
126
125
  HTMLEntities.new.decode(
127
126
  File.read(ASCIIDOCTOR_ISO_DIR / "boilerplate.xml", encoding: "utf-8")
128
- .gsub(/\{\{ agency \}\}/, "ISO").gsub(/\{\{ docyear \}\}/, Date.today.year.to_s)
127
+ .gsub(/\{\{ agency \}\}/, "ISO")
128
+ .gsub(/\{\{ docyear \}\}/, Date.today.year.to_s)
129
129
  .gsub(/\{% if unpublished %\}.*\{% endif %\}/m, "")
130
- .gsub(/(?<=\p{Alnum})'(?=\p{Alpha})/, "’")
130
+ .gsub(/(?<=\p{Alnum})'(?=\p{Alpha})/, "’"),
131
131
  )
132
132
 
133
133
  BOILERPLATE_FR =
134
134
  HTMLEntities.new.decode(
135
135
  File.read(ASCIIDOCTOR_ISO_DIR / "boilerplate-fr.xml", encoding: "utf-8")
136
- .gsub(/\{\{ agency \}\}/, "ISO").gsub(/\{\{ docyear \}\}/, Date.today.year.to_s)
136
+ .gsub(/\{\{ agency \}\}/, "ISO")
137
+ .gsub(/\{\{ docyear \}\}/, Date.today.year.to_s)
137
138
  .gsub(/\{% if unpublished %\}.*\{% endif %\}/m, "")
138
- .gsub(/(?<=\p{Alnum})'(?=\p{Alpha})/, "’")
139
+ .gsub(/(?<=\p{Alnum})'(?=\p{Alpha})/, "’"),
139
140
  )
140
141
 
141
142
  BLANK_HDR1 = <<~"HDR".freeze
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-12 00:00:00.000000000 Z
11
+ date: 2021-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: isodoc
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.6.0
19
+ version: 1.6.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.6.0
26
+ version: 1.6.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: metanorma-standoc
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.5.0
47
+ version: 1.8.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.5.0
54
+ version: 1.8.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: ruby-jing
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -294,6 +294,7 @@ files:
294
294
  - lib/asciidoctor/iso/reqt.rng
295
295
  - lib/asciidoctor/iso/section.rb
296
296
  - lib/asciidoctor/iso/validate.rb
297
+ - lib/asciidoctor/iso/validate_image.rb
297
298
  - lib/asciidoctor/iso/validate_requirements.rb
298
299
  - lib/asciidoctor/iso/validate_section.rb
299
300
  - lib/asciidoctor/iso/validate_style.rb
@@ -401,7 +402,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
401
402
  requirements:
402
403
  - - ">="
403
404
  - !ruby/object:Gem::Version
404
- version: 2.4.0
405
+ version: 2.5.0
405
406
  required_rubygems_version: !ruby/object:Gem::Requirement
406
407
  requirements:
407
408
  - - ">="