asciidoctor-gb 0.3.3 → 0.3.4

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: 3d575dd90564cdf6559599921fab8a71bdb584e441f5cd24484a847a793aad9a
4
- data.tar.gz: 260c7cb9bbefbf93619ca52688b77298767fb31fd05f736fe6a467c90a696a56
3
+ metadata.gz: a27bbb1d084ffa183532aa1bca44b2e8b0e749821f0b10af1805820cb3704d0a
4
+ data.tar.gz: 2bd6177218a0ba3968d6ef53d55d0caca3bf114f33cc782f0208586d37f30e99
5
5
  SHA512:
6
- metadata.gz: ceb9ef6b5fd1f879271b60d9dc3bc21a9a55003d19e4f493f436116a9f8124e2ae06b761a1564d834e06684c47216d354fe7727ef7304c9bb7811efd91effd74
7
- data.tar.gz: e62aca0454d2fee75bd2922588af111d75fe11dcb989f5658fc407a67810d209006e82b6300e9f4949418bc8ec5e09fe3fd957027380c8f84cca1a52344b44c5
6
+ metadata.gz: 1a30114bd166879703086331bfc2e255e783cef6298a70dec943f8b796694e319a53c0dacfabbeb5c1f2b2dd4cd1eb3aa373d748acd5e34acaa58f702677fe30
7
+ data.tar.gz: bc416feab8820719d17216872cd9152b6cf80bc748532e6a14369149ceb39e21a791884b8f1bd95e3a676966b45cf5be075a2383cc97882c8e20bffa2214a491
@@ -4,6 +4,7 @@ language: ruby
4
4
  rvm:
5
5
  - 2.5
6
6
  - 2.4
7
+ - 2.3
7
8
  - ruby-head
8
9
  before_install:
9
10
  - gem install bundler -v 1.16.1
@@ -26,9 +26,9 @@ Gem::Specification.new do |spec|
26
26
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
27
  spec.require_paths = ["lib"]
28
28
 
29
- spec.add_dependency "asciidoctor-iso", ">= 0.9.0"
29
+ spec.add_dependency "asciidoctor-iso", "~> 0.10.0"
30
30
  spec.add_dependency "gbbib", "~> 0.2.2"
31
- spec.add_dependency "isodoc", ">= 0.8.0"
31
+ spec.add_dependency "isodoc", "~> 0.8.7"
32
32
  spec.add_dependency "twitter_cldr"
33
33
  spec.add_dependency "gb-agencies", "~> 0.0.1"
34
34
 
@@ -1,5 +1,5 @@
1
1
  module Asciidoctor
2
2
  module Gb
3
- VERSION = "0.3.3"
3
+ VERSION = "0.3.4"
4
4
  end
5
5
  end
@@ -161,7 +161,7 @@ module IsoDoc
161
161
  header_class = {} if header_class.nil?
162
162
  div.h1 **attr_code(header_class) do |h1|
163
163
  if num
164
- h1 << num
164
+ h1 << "#{num}."
165
165
  h1 << "&#x3000;"
166
166
  end
167
167
  h1 << title
@@ -161,7 +161,7 @@ module IsoDoc
161
161
  header_class = {} if header_class.nil?
162
162
  div.h1 **attr_code(header_class) do |h1|
163
163
  if num
164
- h1 << num
164
+ h1 << "#{num}."
165
165
  h1 << "&#x3000;"
166
166
  end
167
167
  h1 << title
@@ -37,12 +37,10 @@ module IsoDoc
37
37
  def set_doctitle
38
38
  if @lang == "zh"
39
39
  set(:doctitle, get[:docmaintitlezh] +
40
- get[:docsubtitlezh] +
41
- get[:docparttitlezh])
40
+ get[:docsubtitlezh] + get[:docparttitlezh])
42
41
  else
43
42
  set(:doctitle, get[:docmaintitleen] +
44
- get[:docsubtitleen] +
45
- get[:docparttitleen])
43
+ get[:docsubtitleen] + get[:docparttitleen])
46
44
  end
47
45
  end
48
46
 
@@ -64,6 +62,19 @@ module IsoDoc
64
62
  set(:committee, gbcommittee&.text)
65
63
  end
66
64
 
65
+ # from ISO
66
+ STAGE_ABBRS = {
67
+ "00": "PWI",
68
+ "10": "NWIP",
69
+ "20": "WD",
70
+ "30": "CD",
71
+ "40": "DIS",
72
+ "50": "FDIS",
73
+ "60": "IS",
74
+ "90": "(Review)",
75
+ "95": "(Withdrawal)",
76
+ }.freeze
77
+
67
78
  STAGE_ABBRS_CN = {
68
79
  "00": "新工作项目建议",
69
80
  "10": "新工作项目",
@@ -88,6 +99,13 @@ module IsoDoc
88
99
  "95": "obsolete",
89
100
  }
90
101
 
102
+ def stage_abbrev(stage, iter, draft)
103
+ stage = STAGE_ABBRS[stage.to_sym] || "??"
104
+ stage += iter.text if iter
105
+ stage = "Pre" + stage if draft&.text =~ /^0\./
106
+ stage
107
+ end
108
+
91
109
  def stage_abbrev_cn(stage, iter, draft)
92
110
  return stage_abbrev(stage, iter, draft) if @lang != "zh"
93
111
  stage = STAGE_ABBRS_CN[stage.to_sym] || "??"
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-gb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
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-08-03 00:00:00.000000000 Z
11
+ date: 2018-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor-iso
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.9.0
19
+ version: 0.10.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.9.0
26
+ version: 0.10.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: gbbib
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: isodoc
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.8.0
47
+ version: 0.8.7
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: 0.8.0
54
+ version: 0.8.7
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: twitter_cldr
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -370,7 +370,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
370
370
  version: '0'
371
371
  requirements: []
372
372
  rubyforge_project:
373
- rubygems_version: 2.7.7
373
+ rubygems_version: 2.7.6
374
374
  signing_key:
375
375
  specification_version: 4
376
376
  summary: asciidoctor-gb lets you write GB standards in AsciiDoc.