asciidoctor-csd 0.2.8 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 83224d4a089042a0681c82f63bb9865ab354fb08
4
- data.tar.gz: d5775bda938e59d3224131f5ebd6ac1fbf861a21
2
+ SHA256:
3
+ metadata.gz: b06c2d35d54cc92d44d34fa6296309026c2c2382cd06da0a0a873ada81b990ca
4
+ data.tar.gz: a65cfd2752777e4ae4fd017ff4133cb8448372f3450132a9d37241ec0373fd67
5
5
  SHA512:
6
- metadata.gz: f7d61eca2c9826563757e3df1285d0ccce6fa194224d1b63a1e5f9216a42686bba437b2bbf78c10262d4d48fa4df09c7f088d4b342aafa2d3795e29100b3f53e
7
- data.tar.gz: 9df37d23f913052222f571efafc8aa3e7b8d8cce6141352159a1eb4722c59df000b536493f823605993f0a7298085f9582434daeb90f326cfe0ceb8edc2da208
6
+ metadata.gz: 13a7a0feb7ea66a63482da6b3a9535425a87289060a9abc0b7d9ba6f9267892490164fd4aa7ababc7b50567293d5ddfb9fd90ae2b5259265618e6e88d52af331
7
+ data.tar.gz: 6b87c74a7a50fd2e932cf4090493ac79c1436b505b1bb6526f7768039899e84ba41e3d4bfcc9f3c1f43703dbdce3f5959fda269b64a1c9c25a9ea48cd05979c5
data/Gemfile.lock CHANGED
@@ -1,31 +1,31 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- asciidoctor-csd (0.1.0)
5
- asciidoctor (~> 1.5.6)
6
- asciimath
7
- htmlentities (~> 4.3.4)
8
- image_size
9
- mime-types
10
- nokogiri (~> 1.8.1)
11
- ruby-jing
12
- ruby-xslt
13
- thread_safe
14
- uuidtools
4
+ asciidoctor-csd (0.3.1)
5
+ asciidoctor-iso (>= 0.8.0)
6
+ isodoc (>= 0.7.0)
15
7
 
16
8
  GEM
17
9
  remote: https://rubygems.org/
18
10
  specs:
19
- asciidoctor (1.5.6.1)
11
+ algoliasearch (1.22.0)
12
+ httpclient (~> 2.8, >= 2.8.3)
13
+ json (>= 1.5.1)
14
+ asciidoctor (1.5.7.1)
15
+ asciidoctor-iso (0.8.1)
16
+ asciidoctor (~> 1.5.7)
17
+ isobib (~> 0.1.4)
18
+ isodoc (>= 0.7.0)
19
+ ruby-jing
20
20
  asciimath (1.0.4)
21
21
  ast (2.4.0)
22
22
  byebug (9.1.0)
23
23
  coderay (1.1.2)
24
24
  diff-lcs (1.3)
25
- docile (1.1.5)
25
+ docile (1.3.1)
26
26
  equivalent-xml (0.6.0)
27
27
  nokogiri (>= 1.4.3)
28
- ffi (1.9.18)
28
+ ffi (1.9.24)
29
29
  formatador (0.2.5)
30
30
  guard (2.14.2)
31
31
  formatador (>= 0.2.4)
@@ -41,14 +41,45 @@ GEM
41
41
  guard (~> 2.1)
42
42
  guard-compat (~> 1.1)
43
43
  rspec (>= 2.99.0, < 4.0)
44
+ html2doc (0.8.0)
45
+ asciimath
46
+ htmlentities (~> 4.3.4)
47
+ image_size
48
+ mime-types
49
+ nokogiri
50
+ ruby-xslt
51
+ thread_safe
52
+ uuidtools
44
53
  htmlentities (4.3.4)
45
- image_size (1.5.0)
54
+ httpclient (2.8.3)
55
+ image_size (2.0.0)
56
+ iso-bib-item (0.1.3)
57
+ isoics (~> 0.1.6)
58
+ nokogiri
59
+ isobib (0.1.4)
60
+ algoliasearch
61
+ iso-bib-item (~> 0.1.2)
62
+ isodoc (0.7.0)
63
+ asciimath
64
+ html2doc
65
+ htmlentities (~> 4.3.4)
66
+ image_size
67
+ liquid
68
+ mime-types
69
+ nokogiri
70
+ roman-numerals
71
+ ruby-xslt
72
+ sass
73
+ thread_safe
74
+ uuidtools
75
+ isoics (0.1.6)
46
76
  json (2.1.0)
77
+ liquid (4.0.0)
47
78
  listen (3.1.5)
48
79
  rb-fsevent (~> 0.9, >= 0.9.4)
49
80
  rb-inotify (~> 0.9, >= 0.9.7)
50
81
  ruby_dep (~> 1.2)
51
- lumberjack (1.0.12)
82
+ lumberjack (1.0.13)
52
83
  method_source (0.9.0)
53
84
  mime-types (3.1)
54
85
  mime-types-data (~> 3.2015)
@@ -62,17 +93,18 @@ GEM
62
93
  shellany (~> 0.0)
63
94
  optout (0.0.2)
64
95
  parallel (1.12.1)
65
- parser (2.4.0.2)
66
- ast (~> 2.3)
96
+ parser (2.5.1.0)
97
+ ast (~> 2.4.0)
67
98
  powerpack (0.1.1)
68
99
  pry (0.11.3)
69
100
  coderay (~> 1.1.0)
70
101
  method_source (~> 0.9.0)
71
102
  rainbow (3.0.0)
72
- rake (12.3.0)
73
- rb-fsevent (0.10.2)
103
+ rake (12.3.1)
104
+ rb-fsevent (0.10.3)
74
105
  rb-inotify (0.9.10)
75
106
  ffi (>= 0.5.0, < 2)
107
+ roman-numerals (0.3.0)
76
108
  rspec (3.7.0)
77
109
  rspec-core (~> 3.7.0)
78
110
  rspec-expectations (~> 3.7.0)
@@ -86,9 +118,9 @@ GEM
86
118
  diff-lcs (>= 1.2.0, < 2.0)
87
119
  rspec-support (~> 3.7.0)
88
120
  rspec-support (3.7.1)
89
- rubocop (0.52.1)
121
+ rubocop (0.56.0)
90
122
  parallel (~> 1.10)
91
- parser (>= 2.4.0.2, < 3.0)
123
+ parser (>= 2.5)
92
124
  powerpack (~> 0.1)
93
125
  rainbow (>= 2.2.2, < 4.0)
94
126
  ruby-progressbar (~> 1.7)
@@ -98,16 +130,21 @@ GEM
98
130
  ruby-progressbar (1.9.0)
99
131
  ruby-xslt (0.9.10)
100
132
  ruby_dep (1.5.0)
133
+ sass (3.5.6)
134
+ sass-listen (~> 4.0.0)
135
+ sass-listen (4.0.0)
136
+ rb-fsevent (~> 0.9, >= 0.9.4)
137
+ rb-inotify (~> 0.9, >= 0.9.7)
101
138
  shellany (0.0.1)
102
- simplecov (0.15.1)
103
- docile (~> 1.1.0)
139
+ simplecov (0.16.1)
140
+ docile (~> 1.1)
104
141
  json (>= 1.8, < 3)
105
142
  simplecov-html (~> 0.10.0)
106
143
  simplecov-html (0.10.2)
107
144
  thor (0.20.0)
108
145
  thread_safe (0.3.6)
109
146
  timecop (0.9.1)
110
- unicode-display_width (1.3.0)
147
+ unicode-display_width (1.3.3)
111
148
  uuidtools (2.1.5)
112
149
 
113
150
  PLATFORMS
@@ -127,4 +164,4 @@ DEPENDENCIES
127
164
  timecop (~> 0.9)
128
165
 
129
166
  BUNDLED WITH
130
- 1.16.1
167
+ 1.16.2
data/README.adoc CHANGED
@@ -49,6 +49,18 @@ document.
49
49
 
50
50
  The gem then converts the XML into HTML and PDF.
51
51
 
52
+ === Installation
53
+
54
+ If you are using a Mac, the https://github.com/riboseinc/metanorma-macos-setup
55
+ repository has instructions on setting up your machine to run Metanorma
56
+ scripts such as this one. You need only run the following in a Terminal console:
57
+
58
+ [source,console]
59
+ ----
60
+ $ bash <(curl -s https://raw.githubusercontent.com/riboseinc/metanorma-macos-setup/master/metanorma-setup)
61
+ $ gem install asciidoctor-csd
62
+ ----
63
+
52
64
  === PDF output
53
65
 
54
66
  PDF output is generated by printing the HTML output as PDF. This is done
@@ -63,6 +75,9 @@ https://nodejs.org/en/download/package-manager/ . (For Mac, `brew install node`)
63
75
  * Install npm: https://docs.npmjs.com/getting-started/installing-node
64
76
  * Install puppeteer: `npm install -g --save --save-exact puppeteer`
65
77
 
78
+ The https://github.com/riboseinc/metanorma-macos-setup script includes Puppeteer
79
+ installation.
80
+
66
81
  == Approach
67
82
 
68
83
  === Document model
@@ -25,7 +25,8 @@ Gem::Specification.new do |spec|
25
25
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
26
  spec.require_paths = ["lib"]
27
27
 
28
- spec.add_dependency "asciidoctor-iso", ">= 0.7.9"
28
+ spec.add_dependency "asciidoctor-iso", ">= 0.8.0"
29
+ spec.add_dependency "isodoc", ">= 0.7.0"
29
30
 
30
31
  spec.add_development_dependency "bundler", "~> 1.15"
31
32
  spec.add_development_dependency "byebug", "~> 9.1"
@@ -76,6 +76,8 @@ module Asciidoctor
76
76
  result << noko { |ixml| front node, ixml }
77
77
  result << noko { |ixml| middle node, ixml }
78
78
  result << "</csd-standard>"
79
+ save_cache_biblio(@bibliodb, true)
80
+ save_cache_biblio(@local_bibliodb, false)
79
81
  result = textcleanup(result.flatten * "\n")
80
82
  ret1 = cleanup(Nokogiri::XML(result))
81
83
  validate(ret1)
@@ -92,6 +94,11 @@ module Asciidoctor
92
94
  d
93
95
  end
94
96
 
97
+ # deactivating biblio caching for now
98
+ def open_cache_biblio(node, global)
99
+ nil
100
+ end
101
+
95
102
  def pdf_convert(filename)
96
103
  url = "#{Dir.pwd}/#{filename}.html"
97
104
  pdfjs = File.join(File.dirname(__FILE__), 'pdf.js')
@@ -1,5 +1,12 @@
1
1
  'use strict';
2
2
 
3
+ try {
4
+ require.resolve("puppeteer");
5
+ } catch(e) {
6
+ console.error("puppeteer Node library is not installed; will not generate PDF");
7
+ process.exit(e.code);
8
+ }
9
+
3
10
  const puppeteer = require('puppeteer');
4
11
 
5
12
  const createPdf = async() => {
@@ -1,5 +1,5 @@
1
1
  module Asciidoctor
2
2
  module Csd
3
- VERSION = "0.2.8"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-csd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-02 00:00:00.000000000 Z
11
+ date: 2018-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor-iso
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.7.9
19
+ version: 0.8.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: 0.7.9
26
+ version: 0.8.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: isodoc
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.7.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 0.7.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -223,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
237
  version: '0'
224
238
  requirements: []
225
239
  rubyforge_project:
226
- rubygems_version: 2.6.14
240
+ rubygems_version: 2.7.7
227
241
  signing_key:
228
242
  specification_version: 4
229
243
  summary: asciidoctor-csd lets you write CSD in AsciiDoc.