asciidoctor-gb 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -76,6 +76,18 @@ module IsoDoc
76
76
  "95": "(Withdrawal)",
77
77
  }.freeze
78
78
 
79
+ STATUS_CSS = {
80
+ "00": "working-draft",
81
+ "10": "working-draft",
82
+ "20": "working-draft",
83
+ "30": "committee-draft",
84
+ "40": "draft-standard",
85
+ "50": "draft-standard",
86
+ "60": "standard",
87
+ "90": "standard",
88
+ "95": "obsolete",
89
+ }
90
+
79
91
  def stage_abbrev_cn(stage, iter, draft)
80
92
  return stage_abbrev(stage, iter, draft) if @lang != "zh"
81
93
  stage = STAGE_ABBRS_CN[stage.to_sym] || "??"
@@ -91,6 +103,7 @@ module IsoDoc
91
103
  abbr = stage_abbrev_cn(docstatus.text, isoxml.at(ns("//status/iteration")),
92
104
  isoxml.at(ns("//version/draft")))
93
105
  set(:stageabbr, abbr)
106
+ set(:status, STATUS_CSS[docstatus.text.to_sym])
94
107
  end
95
108
  end
96
109
 
@@ -135,12 +148,18 @@ module IsoDoc
135
148
  docyear = isoxml&.at(ns("//copyright/from"))&.text
136
149
  issuer = isoxml&.at(ns("//bibdata/contributor[role/@type = 'issuer']/"\
137
150
  "organization/name"))&.text || "GB"
138
- @agencies = Agencies.new(@lang, @labels, issuer)
139
- set(:docidentifier, @agencies.docidentifier(scope, prefix, mandate, docyear, get[:docnumber]))
151
+ @agencies = GbAgencies::Agencies.new(@lang, @labels, issuer)
152
+ #set(:docidentifier, @agencies.docidentifier(scope, prefix, mandate, docyear, get[:docnumber]))
153
+ set(:docidentifier, @agencies.docidentifier(nil, nil, nil, docyear, get[:docnumber]))
140
154
  set(:issuer, issuer)
141
155
  set(:standard_class, @agencies.standard_class(scope, prefix, mandate))
142
156
  set(:standard_agency, @agencies.standard_agency(scope, prefix, mandate))
143
- set(:gbprefix, scope == "local" ? "DB" : prefix)
157
+ if scope == "local"
158
+ set(:gbprefix, "DB")
159
+ set(:gblocalcode, prefix)
160
+ else
161
+ set(:gbprefix, prefix)
162
+ end
144
163
  set(:gbscope, scope)
145
164
  end
146
165
 
@@ -179,15 +198,15 @@ module IsoDoc
179
198
  m = get
180
199
  if @lang == "zh"
181
200
  set(:labelled_publisheddate, m[:publisheddate] + " " +
182
- @labels["publicationdate_lbl"])
201
+ @labels["publicationdate_lbl"])
183
202
  set(:labelled_implementeddate, m[:implementeddate] + " " +
184
- @labels["implementationdate_lbl"])
203
+ @labels["implementationdate_lbl"])
185
204
  else
186
205
  set(:labelled_publisheddate, @labels["publicationdate_lbl"] +
187
- ": " + m[:publisheddate])
206
+ ": " + m[:publisheddate])
188
207
  set(:labelled_implementeddate,
189
- @labels["implementationdate_lbl"] + ": " +
190
- m[:implementeddate])
208
+ @labels["implementationdate_lbl"] + ": " +
209
+ m[:implementeddate])
191
210
  end
192
211
  end
193
212
  end
@@ -13,6 +13,7 @@ module Metanorma
13
13
  def output_formats
14
14
  super.merge(
15
15
  html: "html",
16
+ compliant_html: "compliant.html",
16
17
  doc: "doc"
17
18
  )
18
19
  end
@@ -29,6 +30,8 @@ module Metanorma
29
30
  case format
30
31
  when :html
31
32
  IsoDoc::Gb::HtmlConvert.new(options).convert(outname, isodoc_node)
33
+ when :compliant_html
34
+ IsoDoc::Gb::HtmlConvert.new(options.merge(compliant: true)).convert(outname, isodoc_node)
32
35
  when :doc
33
36
  IsoDoc::Gb::WordConvert.new(options).convert(outname, isodoc_node)
34
37
  else
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-gb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
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-07-06 00:00:00.000000000 Z
11
+ date: 2018-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor-iso
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: gbbib
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 0.2.2
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: '0'
40
+ version: 0.2.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: isodoc
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: gb-agencies
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.0.1
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.0.1
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: bundler
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -240,7 +254,6 @@ files:
240
254
  - ".travis.yml"
241
255
  - CODE_OF_CONDUCT.md
242
256
  - Gemfile
243
- - Gemfile.lock
244
257
  - LICENSE
245
258
  - README.adoc
246
259
  - Rakefile
@@ -291,7 +304,6 @@ files:
291
304
  - lib/asciidoctor/gb/section_input.rb
292
305
  - lib/asciidoctor/gb/validate.rb
293
306
  - lib/asciidoctor/gb/version.rb
294
- - lib/isodoc/gb/agencies.rb
295
307
  - lib/isodoc/gb/gbcleanup.rb
296
308
  - lib/isodoc/gb/gbconvert.rb
297
309
  - lib/isodoc/gb/gbhtmlconvert.rb
@@ -323,8 +335,10 @@ files:
323
335
  - lib/isodoc/gb/html/gb-logos/gb-standard-zb.svg
324
336
  - lib/isodoc/gb/html/gb.scss
325
337
  - lib/isodoc/gb/html/header.html
338
+ - lib/isodoc/gb/html/html_compliant_gb_titlepage.html
326
339
  - lib/isodoc/gb/html/html_gb_intro.html
327
340
  - lib/isodoc/gb/html/html_gb_titlepage.html
341
+ - lib/isodoc/gb/html/htmlcompliantstyle.scss
328
342
  - lib/isodoc/gb/html/htmlstyle.scss
329
343
  - lib/isodoc/gb/html/logo.png
330
344
  - lib/isodoc/gb/html/scripts.html
@@ -338,7 +352,7 @@ files:
338
352
  - lib/metanorma/gb/processor.rb
339
353
  homepage: https://github.com/riboseinc/asciidoctor-gb
340
354
  licenses:
341
- - MIT
355
+ - BSD-2-Clause
342
356
  metadata: {}
343
357
  post_install_message:
344
358
  rdoc_options: []
data/Gemfile.lock DELETED
@@ -1,244 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- asciidoctor-gb (0.3.1)
5
- asciidoctor-iso (>= 0.9.0)
6
- gbbib
7
- isodoc (>= 0.8.0)
8
- twitter_cldr
9
-
10
- GEM
11
- remote: https://rubygems.org/
12
- specs:
13
- algoliasearch (1.23.2)
14
- httpclient (~> 2.8, >= 2.8.3)
15
- json (>= 1.5.1)
16
- asciidoctor (1.5.7.1)
17
- asciidoctor-csand (0.3.1)
18
- asciidoctor (~> 1.5.7)
19
- asciidoctor-iso (>= 0.9.0)
20
- asciimath
21
- htmlentities (~> 4.3.4)
22
- image_size
23
- isodoc (>= 0.8.0)
24
- mime-types
25
- nokogiri
26
- ruby-jing
27
- ruby-xslt
28
- thread_safe
29
- uuidtools
30
- asciidoctor-csd (0.4.1)
31
- asciidoctor-iso (>= 0.9.0)
32
- isodoc (>= 0.8.0)
33
- asciidoctor-iso (0.9.3)
34
- asciidoctor (~> 1.5.7)
35
- iso-bib-item (~> 0.1.6)
36
- isobib (~> 0.1.8)
37
- isodoc (>= 0.8)
38
- ruby-jing
39
- asciidoctor-m3d (0.3.2)
40
- asciidoctor (~> 1.5.7)
41
- asciidoctor-iso (>= 0.9.0)
42
- asciimath
43
- htmlentities (~> 4.3.4)
44
- image_size
45
- isodoc (>= 0.8.0)
46
- mime-types
47
- nokogiri
48
- ruby-jing
49
- ruby-xslt
50
- thread_safe
51
- uuidtools
52
- asciidoctor-rfc (0.9.0)
53
- asciidoctor (~> 1.5.7)
54
- htmlentities (~> 4.3.4)
55
- nokogiri
56
- ruby-jing
57
- thread_safe
58
- asciidoctor-rsd (0.3.1)
59
- asciidoctor (~> 1.5.7)
60
- asciidoctor-iso (>= 0.8.0)
61
- asciimath
62
- htmlentities (~> 4.3.4)
63
- image_size
64
- isodoc (>= 0.7.0)
65
- mime-types
66
- nokogiri
67
- ruby-jing
68
- ruby-xslt
69
- thread_safe
70
- uuidtools
71
- asciimath (1.0.4)
72
- ast (2.4.0)
73
- byebug (9.1.0)
74
- camertron-eprun (1.1.1)
75
- cldr-plurals-runtime-rb (1.0.1)
76
- cnccs (0.1.1)
77
- coderay (1.1.2)
78
- diff-lcs (1.3)
79
- docile (1.3.1)
80
- duplicate (1.1.1)
81
- equivalent-xml (0.6.0)
82
- nokogiri (>= 1.4.3)
83
- ffi (1.9.25)
84
- formatador (0.2.5)
85
- gbbib (0.1.2)
86
- cnccs
87
- iso-bib-item
88
- guard (2.14.2)
89
- formatador (>= 0.2.4)
90
- listen (>= 2.7, < 4.0)
91
- lumberjack (>= 1.0.12, < 2.0)
92
- nenv (~> 0.1)
93
- notiffany (~> 0.0)
94
- pry (>= 0.9.12)
95
- shellany (~> 0.0)
96
- thor (>= 0.18.1)
97
- guard-compat (1.2.1)
98
- guard-rspec (4.7.3)
99
- guard (~> 2.1)
100
- guard-compat (~> 1.1)
101
- rspec (>= 2.99.0, < 4.0)
102
- html2doc (0.8.0)
103
- asciimath
104
- htmlentities (~> 4.3.4)
105
- image_size
106
- mime-types
107
- nokogiri
108
- ruby-xslt
109
- thread_safe
110
- uuidtools
111
- htmlentities (4.3.4)
112
- httpclient (2.8.3)
113
- image_size (2.0.0)
114
- iso-bib-item (0.1.10)
115
- duplicate
116
- isoics (~> 0.1.6)
117
- nokogiri
118
- isobib (0.1.9)
119
- algoliasearch
120
- iso-bib-item (~> 0.1.10)
121
- isodoc (0.8.1)
122
- asciimath
123
- html2doc (>= 0.7.1)
124
- htmlentities (~> 4.3.4)
125
- image_size
126
- liquid
127
- mime-types
128
- nokogiri
129
- roman-numerals
130
- ruby-xslt
131
- sass
132
- thread_safe
133
- uuidtools
134
- isoics (0.1.6)
135
- jaro_winkler (1.5.1)
136
- json (2.1.0)
137
- liquid (4.0.0)
138
- listen (3.1.5)
139
- rb-fsevent (~> 0.9, >= 0.9.4)
140
- rb-inotify (~> 0.9, >= 0.9.7)
141
- ruby_dep (~> 1.2)
142
- lumberjack (1.0.13)
143
- metanorma (0.2.4)
144
- asciidoctor-csand (>= 0.3.0)
145
- asciidoctor-csd (>= 0.4.0)
146
- asciidoctor-gb (>= 0.3.0)
147
- asciidoctor-iso (>= 0.9.1)
148
- asciidoctor-m3d (>= 0.3.1)
149
- asciidoctor-rfc (>= 0.9.0)
150
- asciidoctor-rsd (>= 0.3.0)
151
- isodoc (>= 0.8.0)
152
- method_source (0.9.0)
153
- mime-types (3.1)
154
- mime-types-data (~> 3.2015)
155
- mime-types-data (3.2016.0521)
156
- mini_portile2 (2.3.0)
157
- nenv (0.3.0)
158
- nokogiri (1.8.3)
159
- mini_portile2 (~> 2.3.0)
160
- notiffany (0.1.1)
161
- nenv (~> 0.1)
162
- shellany (~> 0.0)
163
- optout (0.0.2)
164
- parallel (1.12.1)
165
- parser (2.5.1.0)
166
- ast (~> 2.4.0)
167
- powerpack (0.1.2)
168
- pry (0.11.3)
169
- coderay (~> 1.1.0)
170
- method_source (~> 0.9.0)
171
- rainbow (3.0.0)
172
- rake (12.3.1)
173
- rb-fsevent (0.10.3)
174
- rb-inotify (0.9.10)
175
- ffi (>= 0.5.0, < 2)
176
- roman-numerals (0.3.0)
177
- rspec (3.7.0)
178
- rspec-core (~> 3.7.0)
179
- rspec-expectations (~> 3.7.0)
180
- rspec-mocks (~> 3.7.0)
181
- rspec-core (3.7.1)
182
- rspec-support (~> 3.7.0)
183
- rspec-expectations (3.7.0)
184
- diff-lcs (>= 1.2.0, < 2.0)
185
- rspec-support (~> 3.7.0)
186
- rspec-mocks (3.7.0)
187
- diff-lcs (>= 1.2.0, < 2.0)
188
- rspec-support (~> 3.7.0)
189
- rspec-support (3.7.1)
190
- rubocop (0.57.2)
191
- jaro_winkler (~> 1.5.1)
192
- parallel (~> 1.10)
193
- parser (>= 2.5)
194
- powerpack (~> 0.1)
195
- rainbow (>= 2.2.2, < 4.0)
196
- ruby-progressbar (~> 1.7)
197
- unicode-display_width (~> 1.0, >= 1.0.1)
198
- ruby-jing (0.0.1)
199
- optout (>= 0.0.2)
200
- ruby-progressbar (1.9.0)
201
- ruby-xslt (0.9.10)
202
- ruby_dep (1.5.0)
203
- sass (3.5.6)
204
- sass-listen (~> 4.0.0)
205
- sass-listen (4.0.0)
206
- rb-fsevent (~> 0.9, >= 0.9.4)
207
- rb-inotify (~> 0.9, >= 0.9.7)
208
- shellany (0.0.1)
209
- simplecov (0.16.1)
210
- docile (~> 1.1)
211
- json (>= 1.8, < 3)
212
- simplecov-html (~> 0.10.0)
213
- simplecov-html (0.10.2)
214
- thor (0.20.0)
215
- thread_safe (0.3.6)
216
- timecop (0.9.1)
217
- twitter_cldr (4.4.3)
218
- camertron-eprun
219
- cldr-plurals-runtime-rb (~> 1.0)
220
- tzinfo
221
- tzinfo (1.2.5)
222
- thread_safe (~> 0.1)
223
- unicode-display_width (1.4.0)
224
- uuidtools (2.1.5)
225
-
226
- PLATFORMS
227
- ruby
228
-
229
- DEPENDENCIES
230
- asciidoctor-gb!
231
- bundler (~> 1.15)
232
- byebug (~> 9.1)
233
- equivalent-xml (~> 0.6)
234
- guard (~> 2.14)
235
- guard-rspec (~> 4.7)
236
- metanorma
237
- rake (~> 12.0)
238
- rspec (~> 3.6)
239
- rubocop (~> 0.50)
240
- simplecov (~> 0.15)
241
- timecop (~> 0.9)
242
-
243
- BUNDLED WITH
244
- 1.16.2