pandocomatic 0.2.2.1 → 0.2.3.0

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
  SHA1:
3
- metadata.gz: 855c75e46b4727ccd6acf84d9ba735ffd800d8b5
4
- data.tar.gz: a9f5e62d4e9fb6e857e6aea6ff5b8c7d9f8bf740
3
+ metadata.gz: 2404350331ff44bd5be259f0f1144f50c16142c8
4
+ data.tar.gz: fae1d00979bca480cdf077a933b866458432f0b7
5
5
  SHA512:
6
- metadata.gz: da17a2290744567aadb6327a6cf20c88ed700366e653ce73ea17f8fb422347a418c7747d81d47fe12e5e00dc493d5f4ed4343cbe45e8be06f96646dd6aea6419
7
- data.tar.gz: 736633dc32721b84a7c62743cd11c77f944b12ced0f8b9378f4b2b11401ebef494aab32df5afb3a115cca642c780dc4cc9021b5d2a5c757042b05ddfb51b86df
6
+ metadata.gz: cbeeae2d004e5410b498b2d85abd9cf0071c03a35604249090c44c87eaf6d6ecfa145c6daeb703340ca6e4b53f400505bb65e9cdeacf64133a1daba366fe8f27
7
+ data.tar.gz: 9f9bc474a5a22c4f7afa18c5fcc1bda0e665adcff77bb2117d6a9fd09272e0a47ce115ea92b364528209d69ee22c75bc228c361224847c9dca843b22ab7bad9f
@@ -395,13 +395,13 @@ module Pandocomatic
395
395
  # @return [String] the updated path.
396
396
  def update_path(path, src_dir, check_executable = false, output = false)
397
397
  updated_path = path
398
- if path.start_with? './'
398
+
399
+ if is_local_path path
399
400
  # refers to a local dir; strip the './' before appending it to
400
401
  # the source directory as to prevent /some/path/./to/path
401
- #updated_path = File.join src_dir, path[2..-1]
402
402
  updated_path = path[2..-1]
403
403
  else
404
- if path.start_with? '/'
404
+ if is_absolute_path path
405
405
  updated_path = path
406
406
  else
407
407
  if check_executable
@@ -670,5 +670,21 @@ module Pandocomatic
670
670
  @data_dir, @settings, @templates, @convert_patterns = array
671
671
  end
672
672
 
673
+ def is_local_path(path)
674
+ if Gem.win_platform? then
675
+ path.match("^\\.\\\\\.*$")
676
+ else
677
+ path.start_with? "./"
678
+ end
679
+ end
680
+
681
+ def is_absolute_path(path)
682
+ if Gem.win_platform? then
683
+ path.match("^[a-zA-Z]:\\\\\.*$")
684
+ else
685
+ path.start_with? "/"
686
+ end
687
+ end
688
+
673
689
  end
674
690
  end
@@ -50,7 +50,7 @@ module Pandocomatic
50
50
  ERROR_STATUS = 1266 # This is the sum of the ascii values of the characters in 'pandocomatic'
51
51
 
52
52
  # Pandocomatic's current version
53
- VERSION = [0, 2, 2, 1]
53
+ VERSION = [0, 2, 3, 0]
54
54
 
55
55
  # Pandocomatic's default configuration file
56
56
  CONFIG_FILE = 'pandocomatic.yaml'
@@ -1,5 +1,5 @@
1
1
  Pandocomatic version <%=@version.join('.')%>
2
- © 2014, 2015, 2016, 2017 Huub de Beer <Huub@heerdebeer.org>
2
+ © 2014, 2015, 2016, 2017, 2018 Huub de Beer <Huub@heerdebeer.org>
3
3
 
4
4
  Pandocomatic is free software; pandocomatic is released under the GPLv3.
5
5
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pandocomatic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2.1
4
+ version: 0.2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Huub de Beer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-17 00:00:00.000000000 Z
11
+ date: 2018-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paru
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  requirements:
155
155
  - pandoc, a universal document converer <http://pandoc.org>
156
156
  rubyforge_project:
157
- rubygems_version: 2.5.2
157
+ rubygems_version: 2.5.2.1
158
158
  signing_key:
159
159
  specification_version: 4
160
160
  summary: Automating the use of pandoc