metanorma-iso 1.8.1 → 1.8.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) 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 +1 -0
  6. data/lib/asciidoctor/iso/biblio.rng +1 -0
  7. data/lib/asciidoctor/iso/cleanup.rb +17 -5
  8. data/lib/asciidoctor/iso/front.rb +3 -1
  9. data/lib/asciidoctor/iso/front_id.rb +66 -50
  10. data/lib/asciidoctor/iso/isodoc.rng +209 -4
  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_section.rb +16 -9
  15. data/lib/isodoc/iso/base_convert.rb +13 -13
  16. data/lib/isodoc/iso/html/isodoc.css +475 -20
  17. data/lib/isodoc/iso/html/isodoc.scss +456 -23
  18. data/lib/isodoc/iso/html/wordstyle.css +202 -31
  19. data/lib/isodoc/iso/html/wordstyle.scss +194 -32
  20. data/lib/isodoc/iso/iso.amendment.xsl +679 -473
  21. data/lib/isodoc/iso/iso.international-standard.xsl +679 -473
  22. data/lib/isodoc/iso/metadata.rb +3 -2
  23. data/lib/isodoc/iso/presentation_xml_convert.rb +18 -9
  24. data/lib/isodoc/iso/sts_convert.rb +10 -13
  25. data/lib/isodoc/iso/word_convert.rb +153 -39
  26. data/lib/isodoc/iso/xref.rb +42 -27
  27. data/lib/metanorma/iso/version.rb +1 -1
  28. data/metanorma-iso.gemspec +4 -4
  29. data/spec/asciidoctor/base_spec.rb +426 -334
  30. data/spec/asciidoctor/blocks_spec.rb +96 -34
  31. data/spec/asciidoctor/cleanup_spec.rb +383 -25
  32. data/spec/asciidoctor/section_spec.rb +0 -14
  33. data/spec/asciidoctor/validate_spec.rb +119 -39
  34. data/spec/isodoc/amd_spec.rb +193 -201
  35. data/spec/isodoc/blocks_spec.rb +100 -88
  36. data/spec/isodoc/i18n_spec.rb +36 -36
  37. data/spec/isodoc/inline_spec.rb +282 -2
  38. data/spec/isodoc/iso_spec.rb +86 -138
  39. data/spec/isodoc/postproc_spec.rb +492 -442
  40. data/spec/isodoc/ref_spec.rb +6 -6
  41. data/spec/isodoc/section_spec.rb +301 -306
  42. data/spec/isodoc/table_spec.rb +166 -231
  43. data/spec/isodoc/terms_spec.rb +11 -8
  44. data/spec/isodoc/xref_spec.rb +147 -118
  45. data/spec/spec_helper.rb +16 -15
  46. metadata +9 -9
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.1
4
+ version: 1.8.6
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-26 00:00:00.000000000 Z
11
+ date: 2021-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: isodoc
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.6.0
19
+ version: 1.7.0
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.7.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: metanorma-standoc
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.9.0
33
+ version: 1.10.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.9.0
40
+ version: 1.10.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: mn2sts
43
43
  requirement: !ruby/object:Gem::Requirement
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
@@ -402,7 +402,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
402
402
  requirements:
403
403
  - - ">="
404
404
  - !ruby/object:Gem::Version
405
- version: 2.4.0
405
+ version: 2.5.0
406
406
  required_rubygems_version: !ruby/object:Gem::Requirement
407
407
  requirements:
408
408
  - - ">="