metanorma-csand 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28e3f3576dfbf07e2b300d70185217923feaf6b16bd7c79090d59a2200c44837
4
- data.tar.gz: 896354198a1ae335f15d95cc4cd726d96b2af155e2f3d0f8894db98adf51cc76
3
+ metadata.gz: 4672917d3bc150c1b8a85443c5c07c73f9700dc633ce3ca9302c3be42b8dee4b
4
+ data.tar.gz: 213f450ee9f49d74cb93639d5461d94bb8c7a99945b84920709491d3c2d1620c
5
5
  SHA512:
6
- metadata.gz: 9e511fb54ee8a778f03fdf4ecf4718ab67c2b79399d35019ce2b4b3191092ba8cd0f924f0733d69cbbbf7ba669e1efab7fc299b2a65fa3b35f732272a3924409
7
- data.tar.gz: 849212f69a73c1cd284f731f81819b72ff11c68f1e3653d9bb874e505f97c5a5d92cc2996e3fc13b90d3638851d9077d9cf037b7103d36812fd05b04afe04012
6
+ metadata.gz: 71727f1eb6c56433a7f60d15bc790d280635e40313cc5e5044ba084c2042c07c83242477c7aff4f18ad49c61d6980086af05bdaed36673651df66bb230bf4433
7
+ data.tar.gz: 80d1809f12129ada32c65620c90707faf9a95bfd191c86284c33f68bc60058d5ebfa00970a1b6f43a2f8a1f453f5a972d5c7d91e7a4b2523c922750ee1d4890b
@@ -1,15 +1,17 @@
1
- dist: trusty
2
- sudo: false
3
1
  language: ruby
2
+ cache: bundler
3
+ os:
4
+ - linux
5
+ - osx
4
6
  rvm:
5
- - 2.5
6
- - 2.4
7
- - 2.3
8
- - ruby-head
7
+ - 2.5
8
+ - 2.4
9
+ - 2.3
10
+ - ruby-head
9
11
  before_install:
10
- - gem install bundler -v 2.0.1
11
- - travis_retry sudo apt-get update
12
- - sudo bash -c "curl -L https://raw.githubusercontent.com/metanorma/metanorma-linux-setup/master/ubuntu-install-puppeteer.sh | bash"
12
+ - gem install bundler -v 2.0.1
13
+ - bundle update
14
+ - curl -L https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/travis.sh | bash
13
15
  matrix:
14
16
  allow_failures:
15
17
  - rvm: ruby-head
@@ -1,5 +1,8 @@
1
1
  version: '{build}'
2
2
 
3
+ cache:
4
+ - vendor/bundle
5
+
3
6
  environment:
4
7
  matrix:
5
8
  - RUBY_VERSION: 25
@@ -17,6 +20,7 @@ install:
17
20
 
18
21
  build_script:
19
22
  - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
23
+ - bundle config --local path vendor/bundle
20
24
  - bundle update
21
25
  - bundle install
22
26
 
@@ -26,5 +30,4 @@ before_test:
26
30
  - bundle -v
27
31
 
28
32
  test_script:
29
- - bundle exec rake
30
-
33
+ - bundle exec rake
@@ -636,22 +636,27 @@
636
636
  <ref name="ISO8601Date"/>
637
637
  </optional>
638
638
  </define>
639
+ <define name="BibliographicDateType">
640
+ <choice>
641
+ <value>published</value>
642
+ <value>accessed</value>
643
+ <value>created</value>
644
+ <value>implemented</value>
645
+ <value>obsoleted</value>
646
+ <value>confirmed</value>
647
+ <value>updated</value>
648
+ <value>issued</value>
649
+ <value>transmitted</value>
650
+ <value>copied</value>
651
+ <value>unchanged</value>
652
+ <value>circulated</value>
653
+ </choice>
654
+ </define>
639
655
  <define name="bdate">
640
656
  <element name="date">
641
657
  <attribute name="type">
642
658
  <choice>
643
- <value>published</value>
644
- <value>accessed</value>
645
- <value>created</value>
646
- <value>implemented</value>
647
- <value>obsoleted</value>
648
- <value>confirmed</value>
649
- <value>updated</value>
650
- <value>issued</value>
651
- <value>transmitted</value>
652
- <value>copied</value>
653
- <value>unchanged</value>
654
- <value>circulated</value>
659
+ <ref name="BibliographicDateType"/>
655
660
  <text/>
656
661
  </choice>
657
662
  </attribute>
@@ -9,11 +9,6 @@
9
9
  <start>
10
10
  <ref name="csand-standard"/>
11
11
  </start>
12
- <define name="language">
13
- <element name="language">
14
- <value>en</value>
15
- </element>
16
- </define>
17
12
  <define name="docidentifier">
18
13
  <element name="docidentifier">
19
14
  <optional>
@@ -735,6 +735,20 @@
735
735
  <ref name="bookmark"/>
736
736
  </choice>
737
737
  </define>
738
+ <define name="PureTextElement">
739
+ <choice>
740
+ <text/>
741
+ <ref name="em"/>
742
+ <ref name="strong"/>
743
+ <ref name="sub"/>
744
+ <ref name="sup"/>
745
+ <ref name="tt"/>
746
+ <ref name="keyword"/>
747
+ <ref name="strike"/>
748
+ <ref name="smallcap"/>
749
+ <ref name="br"/>
750
+ </choice>
751
+ </define>
738
752
  <define name="source">
739
753
  <element name="source">
740
754
  <ref name="TypedUri"/>
@@ -742,42 +756,58 @@
742
756
  </define>
743
757
  <define name="em">
744
758
  <element name="em">
745
- <text/>
759
+ <zeroOrMore>
760
+ <ref name="PureTextElement"/>
761
+ </zeroOrMore>
746
762
  </element>
747
763
  </define>
748
764
  <define name="strong">
749
765
  <element name="strong">
750
- <text/>
766
+ <zeroOrMore>
767
+ <ref name="PureTextElement"/>
768
+ </zeroOrMore>
751
769
  </element>
752
770
  </define>
753
771
  <define name="tt">
754
772
  <element name="tt">
755
- <text/>
773
+ <zeroOrMore>
774
+ <ref name="PureTextElement"/>
775
+ </zeroOrMore>
756
776
  </element>
757
777
  </define>
758
778
  <define name="keyword">
759
779
  <element name="keyword">
760
- <text/>
780
+ <zeroOrMore>
781
+ <ref name="PureTextElement"/>
782
+ </zeroOrMore>
761
783
  </element>
762
784
  </define>
763
785
  <define name="sub">
764
786
  <element name="sub">
765
- <text/>
787
+ <zeroOrMore>
788
+ <ref name="PureTextElement"/>
789
+ </zeroOrMore>
766
790
  </element>
767
791
  </define>
768
792
  <define name="sup">
769
793
  <element name="sup">
770
- <text/>
794
+ <zeroOrMore>
795
+ <ref name="PureTextElement"/>
796
+ </zeroOrMore>
771
797
  </element>
772
798
  </define>
773
799
  <define name="strike">
774
800
  <element name="strike">
775
- <text/>
801
+ <zeroOrMore>
802
+ <ref name="PureTextElement"/>
803
+ </zeroOrMore>
776
804
  </element>
777
805
  </define>
778
806
  <define name="smallcap">
779
807
  <element name="smallcap">
780
- <text/>
808
+ <zeroOrMore>
809
+ <ref name="PureTextElement"/>
810
+ </zeroOrMore>
781
811
  </element>
782
812
  </define>
783
813
  <define name="br">
@@ -4,14 +4,6 @@
4
4
  <start>
5
5
  <ref name="iso-standard"/>
6
6
  </start>
7
- <define name="language">
8
- <element name="language">
9
- <choice>
10
- <value>en</value>
11
- <value>fr</value>
12
- </choice>
13
- </element>
14
- </define>
15
7
  <define name="script">
16
8
  <element name="script">
17
9
  <value>Latn</value>
@@ -0,0 +1,49 @@
1
+ require "isodoc"
2
+ require_relative "metadata"
3
+
4
+ module IsoDoc
5
+ module Csand
6
+ module BaseConvert
7
+ def metadata_init(lang, script, labels)
8
+ @meta = Metadata.new(lang, script, labels)
9
+ end
10
+
11
+ def annex_name(annex, name, div)
12
+ div.h1 **{ class: "Annex" } do |t|
13
+ t << "#{get_anchors[annex['id']][:label]} "
14
+ t.br
15
+ t.b do |b|
16
+ name&.children&.each { |c2| parse(c2, b) }
17
+ end
18
+ end
19
+ end
20
+
21
+ def term_defs_boilerplate(div, source, term, preface)
22
+ if source.empty? && term.nil?
23
+ div << @no_terms_boilerplate
24
+ else
25
+ div << term_defs_boilerplate_cont(source, term)
26
+ end
27
+ end
28
+
29
+ def i18n_init(lang, script)
30
+ super
31
+ @annex_lbl = "Appendix"
32
+ end
33
+
34
+ def cleanup(docxml)
35
+ super
36
+ term_cleanup(docxml)
37
+ end
38
+
39
+ def term_cleanup(docxml)
40
+ docxml.xpath("//p[@class = 'Terms']").each do |d|
41
+ h2 = d.at("./preceding-sibling::*[@class = 'TermNum'][1]")
42
+ h2.add_child("&nbsp;")
43
+ h2.add_child(d.remove)
44
+ end
45
+ docxml
46
+ end
47
+ end
48
+ end
49
+ end
@@ -1,5 +1,5 @@
1
+ require_relative "base_convert"
1
2
  require "isodoc"
2
- require_relative "metadata"
3
3
 
4
4
  module IsoDoc
5
5
  module Csand
@@ -28,33 +28,6 @@ module IsoDoc
28
28
  }
29
29
  end
30
30
 
31
- def metadata_init(lang, script, labels)
32
- @meta = Metadata.new(lang, script, labels)
33
- end
34
-
35
- def annex_name(annex, name, div)
36
- div.h1 **{ class: "Annex" } do |t|
37
- t << "#{get_anchors[annex['id']][:label]} "
38
- t.br
39
- t.b do |b|
40
- name&.children&.each { |c2| parse(c2, b) }
41
- end
42
- end
43
- end
44
-
45
- def term_defs_boilerplate(div, source, term, preface)
46
- if source.empty? && term.nil?
47
- div << @no_terms_boilerplate
48
- else
49
- div << term_defs_boilerplate_cont(source, term)
50
- end
51
- end
52
-
53
- def i18n_init(lang, script)
54
- super
55
- @annex_lbl = "Appendix"
56
- end
57
-
58
31
  def googlefonts()
59
32
  <<~HEAD.freeze
60
33
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i|Space+Mono:400,700" rel="stylesheet">
@@ -77,19 +50,7 @@ module IsoDoc
77
50
  docxml
78
51
  end
79
52
 
80
- def cleanup(docxml)
81
- super
82
- term_cleanup(docxml)
83
- end
84
-
85
- def term_cleanup(docxml)
86
- docxml.xpath("//p[@class = 'Terms']").each do |d|
87
- h2 = d.at("./preceding-sibling::*[@class = 'TermNum'][1]")
88
- h2.add_child("&nbsp;")
89
- h2.add_child(d.remove)
90
- end
91
- docxml
92
- end
53
+ include BaseConvert
93
54
  end
94
55
  end
95
56
  end
@@ -1,5 +1,5 @@
1
+ require_relative "base_convert"
1
2
  require "isodoc"
2
- require_relative "metadata"
3
3
 
4
4
  module IsoDoc
5
5
  module Csand
@@ -28,33 +28,6 @@ module IsoDoc
28
28
  }
29
29
  end
30
30
 
31
- def metadata_init(lang, script, labels)
32
- @meta = Metadata.new(lang, script, labels)
33
- end
34
-
35
- def annex_name(annex, name, div)
36
- div.h1 **{ class: "Annex" } do |t|
37
- t << "#{get_anchors[annex['id']][:label]} "
38
- t.br
39
- t.b do |b|
40
- name&.children&.each { |c2| parse(c2, b) }
41
- end
42
- end
43
- end
44
-
45
- def term_defs_boilerplate(div, source, term, preface)
46
- if source.empty? && term.nil?
47
- div << @no_terms_boilerplate
48
- else
49
- div << term_defs_boilerplate_cont(source, term)
50
- end
51
- end
52
-
53
- def i18n_init(lang, script)
54
- super
55
- @annex_lbl = "Appendix"
56
- end
57
-
58
31
  def googlefonts()
59
32
  <<~HEAD.freeze
60
33
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i|Space+Mono:400,700" rel="stylesheet">
@@ -77,19 +50,7 @@ module IsoDoc
77
50
  docxml
78
51
  end
79
52
 
80
- def cleanup(docxml)
81
- super
82
- term_cleanup(docxml)
83
- end
84
-
85
- def term_cleanup(docxml)
86
- docxml.xpath("//p[@class = 'Terms']").each do |d|
87
- h2 = d.at("./preceding-sibling::*[@class = 'TermNum'][1]")
88
- h2.add_child("&nbsp;")
89
- h2.add_child(d.remove)
90
- end
91
- docxml
92
- end
53
+ include BaseConvert
93
54
  end
94
55
  end
95
56
  end
@@ -1,5 +1,5 @@
1
+ require_relative "base_convert"
1
2
  require "isodoc"
2
- require_relative "metadata"
3
3
 
4
4
  module IsoDoc
5
5
  module Csand
@@ -31,46 +31,7 @@ module IsoDoc
31
31
  }
32
32
  end
33
33
 
34
- def metadata_init(lang, script, labels)
35
- @meta = Metadata.new(lang, script, labels)
36
- end
37
-
38
- def annex_name(annex, name, div)
39
- div.h1 **{ class: "Annex" } do |t|
40
- t << "#{get_anchors[annex['id']][:label]} "
41
- t.br
42
- t.b do |b|
43
- name&.children&.each { |c2| parse(c2, b) }
44
- end
45
- end
46
- end
47
-
48
- def term_defs_boilerplate(div, source, term, preface)
49
- if source.empty? && term.nil?
50
- div << @no_terms_boilerplate
51
- else
52
- div << term_defs_boilerplate_cont(source, term)
53
- end
54
- end
55
-
56
- def i18n_init(lang, script)
57
- super
58
- @annex_lbl = "Appendix"
59
- end
60
-
61
- def cleanup(docxml)
62
- super
63
- term_cleanup(docxml)
64
- end
65
-
66
- def term_cleanup(docxml)
67
- docxml.xpath("//p[@class = 'Terms']").each do |d|
68
- h2 = d.at("./preceding-sibling::*[@class = 'TermNum'][1]")
69
- h2.add_child("&nbsp;")
70
- h2.add_child(d.remove)
71
- end
72
- docxml
73
- end
34
+ include BaseConvert
74
35
  end
75
36
  end
76
37
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Csand
3
- VERSION = "1.1.4"
3
+ VERSION = "1.1.5"
4
4
  end
5
5
  end
@@ -34,7 +34,6 @@ Gem::Specification.new do |spec|
34
34
  spec.add_dependency "mime-types"
35
35
  spec.add_dependency "nokogiri"
36
36
  spec.add_dependency "ruby-jing"
37
- spec.add_dependency "ruby-xslt"
38
37
  spec.add_dependency "thread_safe"
39
38
  spec.add_dependency "uuidtools"
40
39
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-csand
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-04 00:00:00.000000000 Z
11
+ date: 2019-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -108,20 +108,6 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: ruby-xslt
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :runtime
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: thread_safe
127
113
  requirement: !ruby/object:Gem::Requirement
@@ -354,7 +340,6 @@ files:
354
340
  - README.adoc
355
341
  - Rakefile
356
342
  - appveyor.yml
357
- - asciidoctor-csand.gemspec.old
358
343
  - bin/console
359
344
  - bin/rspec
360
345
  - bin/setup
@@ -365,6 +350,7 @@ files:
365
350
  - lib/asciidoctor/csand/isodoc.rng
366
351
  - lib/asciidoctor/csand/isostandard.rng
367
352
  - lib/asciidoctor/csand/reqt.rng
353
+ - lib/isodoc/csand/base_convert.rb
368
354
  - lib/isodoc/csand/html/csa-logo-white.png
369
355
  - lib/isodoc/csand/html/csa.png
370
356
  - lib/isodoc/csand/html/csand.scss
@@ -1,54 +0,0 @@
1
- lib = File.expand_path("../lib", __FILE__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "asciidoctor/csand/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "asciidoctor-csand"
7
- spec.version = Asciidoctor::Csand::VERSION
8
- spec.authors = ["Ribose Inc."]
9
- spec.email = ["open.source@ribose.com"]
10
-
11
- spec.summary = "asciidoctor-csand lets you write CSA Normal Documents (CSAND) in AsciiDoc."
12
- spec.description = <<~DESCRIPTION
13
- asciidoctor-csand lets you write CSA Normal Documents (CSAND) in AsciiDoc syntax.
14
-
15
- This gem is in active development.
16
- DESCRIPTION
17
-
18
- spec.homepage = "https://github.com/riboseinc/asciidoctor-csand"
19
- spec.license = "BSD-2-Clause"
20
- spec.post_install_message = "The asciidoctor-csand gem has been deprecated and has been replaced by metanorma-csand"
21
-
22
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
23
- f.match(%r{^(test|spec|features)/})
24
- end
25
- spec.bindir = "exe"
26
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
- spec.require_paths = ["lib"]
28
-
29
- spec.add_dependency "asciidoctor", "~> 1.5.7"
30
- spec.add_dependency "asciimath"
31
- spec.add_dependency "htmlentities", "~> 4.3.4"
32
- spec.add_dependency "image_size"
33
- spec.add_dependency "mime-types"
34
- spec.add_dependency "nokogiri"
35
- spec.add_dependency "ruby-jing"
36
- spec.add_dependency "ruby-xslt"
37
- spec.add_dependency "thread_safe"
38
- spec.add_dependency "uuidtools"
39
-
40
- spec.add_dependency "asciidoctor-iso", ">= 0.9.0"
41
- spec.add_dependency "isodoc", "~> 0.8.8"
42
-
43
- spec.add_development_dependency "bundler", "~> 1.15"
44
- spec.add_development_dependency "byebug", "~> 9.1"
45
- spec.add_development_dependency "equivalent-xml", "~> 0.6"
46
- spec.add_development_dependency "guard", "~> 2.14"
47
- spec.add_development_dependency "guard-rspec", "~> 4.7"
48
- spec.add_development_dependency "rake", "~> 12.0"
49
- spec.add_development_dependency "rspec", "~> 3.6"
50
- spec.add_development_dependency "rubocop", "~> 0.50"
51
- spec.add_development_dependency "simplecov", "~> 0.15"
52
- spec.add_development_dependency "timecop", "~> 0.9"
53
- spec.add_development_dependency "metanorma"
54
- end