asciidoctor-dita-map 0.9.13 → 0.9.14

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
2
  SHA256:
3
- metadata.gz: 98bea8d9cbc76880ed050644d87dba51910d7e7ac722fdf04449d4b53743e7fd
4
- data.tar.gz: e96e393535d5212e2f786b77baa6a182eb81874bc64e11d3e9c8d63ac823fdfe
3
+ metadata.gz: e88ed0e53a52ea190b7e6c9a019f6beec53e56b4c2cbe697e8ccbdb30ec8a054
4
+ data.tar.gz: 6472d8d180c56526fbc53baef936e0f67c38b918a1bf01b7eec6eb272a0eba9a
5
5
  SHA512:
6
- metadata.gz: 217aa01cb9a704bc51e7bef39f6e36b263d9f0a7e7d7678f084feabebb2e2c8db84af43b1e0d97009fe4c9944da9d939fc9b35f6aa49a4a3c777b0bbb6f63cb7
7
- data.tar.gz: 9646161ae41f05054b8ff31474128464299d5c948150927a5b550223593302bf8163571dc8323c46e51424de37c61fa5010be54f3ef97437a94b2e51038523b2
6
+ metadata.gz: 55e181b3063be81b310dfa4d3cf80eb65ee4ca257c660244f184fed9db58c69cc37b45b4fef38e3b18db29afbbd6d17687a1654397ab66962c38d717954665be
7
+ data.tar.gz: 2e8578bc05678448fa76ca9feaaa514d0c7bf54bcaa69659c61c31c799b1385e62e707c5a821bd03f1d49d884e586ba2a461510775eb7aef34cbecb2eaf9bc87
data/bin/dita-type CHANGED
@@ -73,11 +73,6 @@ class Cli
73
73
  topic = AsciidoctorDitaMap::Topic.new File.read(@file)
74
74
  end
75
75
 
76
- if not topic.type
77
- puts 'undef'
78
- abort
79
- end
80
-
81
76
  puts topic.type
82
77
  end
83
78
  end
@@ -30,7 +30,7 @@ module AsciidoctorDitaMap
30
30
  def initialize input, attributes = []
31
31
  if input.empty?
32
32
  @title = nil
33
- @type = nil
33
+ @type = 'undef'
34
34
  else
35
35
  doc = Asciidoctor.load input, safe: :secure, logger: false, attributes: attributes
36
36
 
@@ -46,12 +46,14 @@ module AsciidoctorDitaMap
46
46
  type = attributes['_content-type'] ? attributes['_content-type'].downcase : nil unless type
47
47
  type = attributes['_module-type'] ? attributes['_module-type'].downcase : nil unless type
48
48
 
49
- if type
50
- type.sub!(/^procedure$/, 'task')
49
+ if not type
50
+ return 'undef'
51
51
  end
52
52
 
53
+ type.sub!(/^procedure$/, 'task')
54
+
53
55
  unless ['assembly', 'concept', 'reference', 'task', 'map', 'attributes', 'snippet', 'ignore'].include? type
54
- return nil
56
+ return 'invalid'
55
57
  end
56
58
 
57
59
  return type
@@ -25,5 +25,5 @@
25
25
 
26
26
  module AsciidoctorDitaMap
27
27
  NAME = 'dita-map'
28
- VERSION = '0.9.13'
28
+ VERSION = '0.9.14'
29
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-dita-map
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.13
4
+ version: 0.9.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaromir Hradilek
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  requirements: []
147
- rubygems_version: 4.0.18
147
+ rubygems_version: 4.0.19
148
148
  specification_version: 4
149
149
  summary: Convert an AsciiDoc file to a DITA map
150
150
  test_files: []