pandocomatic 0.2.5.0.beta → 0.2.5.0.betaa

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: 55328031107054bb5f4c803fd3991da2709faf82fed6910c018f63547bbbda33
4
- data.tar.gz: 5ee5ae08ebfd6bc3c23e5421f680924e2247034582a54b9af0e6e320f547333d
3
+ metadata.gz: 33cabeb7b49bddf1b107c44ebf448f07c1f8f33503d620c8d68eac2d23b216dd
4
+ data.tar.gz: 39f12455e1105aca31e552ec8d3fac810a4aa60a5041c11c84fb5088dde94dde
5
5
  SHA512:
6
- metadata.gz: a42e71a975cce7d4bae39f81d8fc2211c3598787283e146e66b72ed3ab106b539ce847077346b49ff04f268717495e4eb203f2e0f38c20126e0c06c7048e4c62
7
- data.tar.gz: 8b84109ff30f598fa8974d93cd6244ee32a572abb4571f2590c72e589ca01aa4e7ebfc4a23aa5ba4933e388b0c81c23b04e49895c642d59328aa71640975e51b
6
+ metadata.gz: 677152a5dde3f7359a75b44a4c678673a45d64bc917770d9bccbe9d43d70ff8fd25cb18b1a567b2fb095d52c969ef264c91eb4c49a9cf188c342da01d9dd51d2
7
+ data.tar.gz: fccd7849c1cd7de73d3310b13785228bc91df4e89372c0f0bdc8aed52ed1355133032280d61f322217e76472cc39269d5555e5d1e8cb3a3ce16dbae7799f448b
@@ -385,22 +385,13 @@ module Pandocomatic
385
385
  end
386
386
  end
387
387
 
388
- destination = nil
389
- rename_script = nil
390
-
391
- # Output option in pandoc property has precedence
392
- if metadata.has_pandocomatic?
393
- pandocomatic = metadata.pandocomatic
394
- if pandocomatic.has_key? "pandoc"
395
- pandoc = pandocomatic["pandoc"]
396
- destination = determine_output_in_pandoc.call pandoc
397
- rename_script = pandoc["rename"]
398
- end
399
- end
388
+ # Output options in pandoc property have precedence
389
+ destination = determine_output_in_pandoc.call metadata.pandoc_options
390
+ rename_script = metadata.pandoc_options["rename"]
400
391
 
401
392
  # Output option in template's pandoc property is next
402
393
  if destination.nil? and not template_name.nil? and not template_name.empty? then
403
- if @templates[template_name].has_key? "pandoc"
394
+ if @templates[template_name].has_key? "pandoc" and not @templates[template_name]["pandoc"].nil?
404
395
  pandoc = @templates[template_name]["pandoc"]
405
396
  destination = determine_output_in_pandoc.call pandoc
406
397
  rename_script ||= pandoc["rename"]
@@ -444,21 +435,14 @@ module Pandocomatic
444
435
  end
445
436
 
446
437
  if template_name.nil? or template_name.empty? then
447
- if metadata.has_pandocomatic?
448
- pandocomatic = metadata.pandocomatic
449
- if pandocomatic.has_key? "pandoc"
450
- pandoc = pandocomatic["pandoc"]
451
-
452
- ext = use_extension.call pandoc
453
- if not ext.nil?
454
- extension = ext
455
- elsif pandoc.has_key? "to"
456
- extension = strip_extensions.call(pandoc["to"])
457
- end
458
- end
459
- end
438
+ ext = use_extension.call metadata.pandoc_options
439
+ if not ext.nil?
440
+ extension = ext
441
+ elsif metadata.pandoc_options.has_key? "to"
442
+ extension = strip_extensions.call(metadata.pandoc_options["to"])
443
+ end
460
444
  else
461
- if @templates[template_name].has_key? "pandoc"
445
+ if @templates[template_name].has_key? "pandoc" and not @templates[template_name]["pandoc"].nil?
462
446
  pandoc = @templates[template_name]["pandoc"]
463
447
  ext = use_extension.call pandoc
464
448
 
@@ -884,6 +868,5 @@ module Pandocomatic
884
868
 
885
869
  path
886
870
  end
887
-
888
871
  end
889
872
  end
@@ -170,7 +170,7 @@ module Pandocomatic
170
170
  # @return [Boolean] True if there is a pandoc options property in this
171
171
  # PandocMetadata object. False otherwise.
172
172
  def has_pandoc_options?()
173
- has_pandocomatic? and pandocomatic.has_key? 'pandoc'
173
+ has_pandocomatic? and pandocomatic.has_key? 'pandoc' and not pandocomatic['pandoc'].nil?
174
174
  end
175
175
 
176
176
  end
@@ -48,7 +48,7 @@ module Pandocomatic
48
48
 
49
49
  # Pandocomatic's current version
50
50
  VERSION = [0, 2, 5, 0, "beta"]
51
-
51
+
52
52
  # Run pandocomatic given options
53
53
  #
54
54
  # @param args [String[]] list of options to configure pandocomatic
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pandocomatic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5.0.beta
4
+ version: 0.2.5.0.betaa
5
5
  platform: ruby
6
6
  authors:
7
7
  - Huub de Beer