asciidoctor-dita-topic 1.4.4 → 1.4.5

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: 717dd58c267369873a2fe78ec88ee18e1c8ff50c308a292374cb63cca102b14d
4
- data.tar.gz: 3d6721ed5f09341567e887b90090e98fa6598050902f6ea52b606b08a1563459
3
+ metadata.gz: 8f6ab85df9ce5321111233e1d6010ffbaff45ef483429b52f1c4f1e21b24a599
4
+ data.tar.gz: 3032b2f55d0e62d5259ab80172c0ae6e22c64d0dad22d6af3e93de9b16432429
5
5
  SHA512:
6
- metadata.gz: 4f33bcd097400cc12f089794f09b4cbef47b7177f50fe1d6e076415b90abfb70d6ba39c9b4c93fdea33ac722913497ed8dc4f3c79f20646adce45c6b7b4e0a6b
7
- data.tar.gz: ab89f66595f1724d584cbac39c07940920254b0264b275d8d026745e0824d60565bdc69f2a34aed03a047ce5f5a72af968faba956d8bc3a32b4dcd939f8199cf
6
+ metadata.gz: 3a0b76fb1014db44d1b4480ba9b3769104651ef209e74b3557e8c4834719ae44982604d7423729c3a57fdd226e275fe07bca439239cf8eb574c6b7d0f7b8a0be
7
+ data.tar.gz: c0b2aeb4ffc8bd7c21ff1cb26ea9112eb48b651e7137c696a2a2dda4789077f9e98ce754d04c2ede6523a0380d89527f1846a27549951442252e0e38b5e23bd4
@@ -198,14 +198,8 @@ module AsciidoctorDitaTopic
198
198
  end
199
199
  end
200
200
 
201
- def convert_topic file, input, output
202
- if file == $stdin
203
- base_dir = Pathname.new(Dir.pwd).expand_path
204
- else
205
- base_dir = Pathname.new(file).dirname.expand_path
206
- end
207
-
208
- Asciidoctor.convert input, backend: 'dita-topic', standalone: @opts[:standalone], safe: :unsafe, attributes: @attr, to_file: output, base_dir: base_dir
201
+ def convert_topic input, output
202
+ Asciidoctor.convert input, backend: 'dita-topic', standalone: @opts[:standalone], safe: :unsafe, attributes: @attr, to_file: output
209
203
  end
210
204
 
211
205
  def run
@@ -223,7 +217,7 @@ module AsciidoctorDitaTopic
223
217
  else
224
218
  suffix = @opts[:map] ? '.ditamap' : '.dita'
225
219
  input = File.read(file)
226
- output = @opts[:output] ? @opts[:output] : Pathname.new(file).sub_ext(suffix)
220
+ output = @opts[:output] ? @opts[:output] : Pathname.new(file).sub_ext(suffix).to_s
227
221
  end
228
222
 
229
223
  input.gsub!(Asciidoctor::IncludeDirectiveRx, '//\&') unless @opts[:includes]
@@ -231,7 +225,7 @@ module AsciidoctorDitaTopic
231
225
  if @opts[:map]
232
226
  convert_map file, prepended + input, output
233
227
  else
234
- convert_topic file, prepended + input, output
228
+ convert_topic prepended + input, output
235
229
  end
236
230
  end
237
231
  end
@@ -24,5 +24,5 @@
24
24
  # frozen_string_literal: true
25
25
 
26
26
  module AsciidoctorDitaTopic
27
- VERSION = '1.4.4'
27
+ VERSION = '1.4.5'
28
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-dita-topic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.4
4
+ version: 1.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaromir Hradilek