paru 0.4.2 → 0.4.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/paru.rb +1 -1
  3. data/lib/paru/pandoc.rb +16 -19
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a9b46dce7962abd98b1fc68f3d47fdb3cb9043ed2b739a65089909985382bc5
4
- data.tar.gz: 54b67bdf000ef4334c00fa4a784a3d380b86622b0aead7eb5d44e10b66df1465
3
+ metadata.gz: bb6538ba8de79257a57e2aff34112539047dbd5ca38b8af3be616b13f64a04e9
4
+ data.tar.gz: 695e2c1dd798b6798e47f587b1486859fdf7126abaa0d80c7969746e5e4d2a27
5
5
  SHA512:
6
- metadata.gz: 5bd0c91bc0ca5b8bb5557d9c5ef318bb0406a5d29c6f23bb99d4ff8b381b3068649ed129ea1e2da148dcde12261966af6e83cfc7fc26d74c686ab305c439033a
7
- data.tar.gz: 278cad1486d341cdba097051ee325e28f21b447fa005cb883d5acd3ed44a6509f8715e308a3f671d189d423568f0e81eafe2d38624ccbe2550657ed7ed920207
6
+ metadata.gz: 0bc28fcd607fb9e156fd53ede490af56bc6bc03b4e47d70e8da62bbf66890dafce2c0bd9b94ac2aff6d1c6fa1d0d9f9bbac1b102a892d65e198826e2c0ebad71
7
+ data.tar.gz: a2118e8d7635eb6f363da4b63e107912c49a429e62b814575ffae45c8f0efcd892722ca32b408dfa87eb5b7169b7f9aafb6303c55f7d97445ae08ccb4766365d
@@ -18,5 +18,5 @@
18
18
  #++
19
19
  module Paru
20
20
  # Paru's current version
21
- VERSION = [0, 4, 2, 0]
21
+ VERSION = [0, 4, 2, 1]
22
22
  end
@@ -230,26 +230,23 @@ module Paru
230
230
  .match(/pandoc.* (\d+\.\d+.*)$/)[1]
231
231
  .split(".")
232
232
  .map {|s| s.to_i}
233
- major_version, minor_version = version
234
-
235
- if major_version >= 2 and minor_version >= 7 then
236
- # Pandoc version 2.7 introduced a new default data dir to comply
237
- # with XDG Base Directory Specification
238
- xdg_data_dir, old_data_dir = version_string.match(/Default user data directory: (.+)$/)[1].split(" or ")
239
-
240
- if File.directory? xdg_data_dir then
241
- data_dir = xdg_data_dir
242
- elsif not old_data_dir.nil? and File.directory? old_data_dir then
243
- # The new-style data directory does not exist, but the
244
- # old-style does, so use the old-style data directory for
245
- # backwards compatibility
246
- data_dir = old_data_dir
247
- else
248
- # Neither data directory exists, default to the new default
249
- data_dir = xdg_data_dir
250
- end
233
+ major_version = version[0]
234
+
235
+ # Pandoc version 2.7 introduced a new default data dir to comply
236
+ # with XDG Base Directory Specification
237
+
238
+ xdg_data_dir, old_data_dir = version_string.match(/User data directory: (.+)$/)[1].split(" or ")
239
+
240
+ if File.directory? xdg_data_dir then
241
+ data_dir = xdg_data_dir
242
+ elsif not old_data_dir.nil? and File.directory? old_data_dir then
243
+ # The new-style data directory does not exist, but the
244
+ # old-style does, so use the old-style data directory for
245
+ # backwards compatibility
246
+ data_dir = old_data_dir
251
247
  else
252
- data_dir = version_string.match(/Default user data directory: (.+)$/)[1]
248
+ # Neither data directory exists, default to the new default
249
+ data_dir = xdg_data_dir
253
250
  end
254
251
 
255
252
  @@info = {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.2.1
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: 2020-10-12 00:00:00.000000000 Z
11
+ date: 2020-11-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Control pandoc with Ruby and write pandoc filters in Ruby
14
14
  email: Huub@heerdebeer.org