paru 0.4.2.1 → 0.4.2.5

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: bb6538ba8de79257a57e2aff34112539047dbd5ca38b8af3be616b13f64a04e9
4
- data.tar.gz: 695e2c1dd798b6798e47f587b1486859fdf7126abaa0d80c7969746e5e4d2a27
3
+ metadata.gz: ff5d895bd1675d8630dac44d11b034a596d07b05c78950799a06a88433ae4755
4
+ data.tar.gz: e16144eff9fb437f2544a10ce6e82064ce7fb90b91c6b81cf56f359a8d8f6bcf
5
5
  SHA512:
6
- metadata.gz: 0bc28fcd607fb9e156fd53ede490af56bc6bc03b4e47d70e8da62bbf66890dafce2c0bd9b94ac2aff6d1c6fa1d0d9f9bbac1b102a892d65e198826e2c0ebad71
7
- data.tar.gz: a2118e8d7635eb6f363da4b63e107912c49a429e62b814575ffae45c8f0efcd892722ca32b408dfa87eb5b7169b7f9aafb6303c55f7d97445ae08ccb4766365d
6
+ metadata.gz: 79d274d0f02d4643bc1c1338f5abd61f2e4e4b59811aa9a7db2dd439087d76d52848f436958039820b9d28f21649f631cc97d46e413eac4ee8afe9bdcc465116
7
+ data.tar.gz: 3662dc9fda69dd2795f468050b0c932c03a66f39b456e44dc35e15f6c0c159a15abccb192cfcc0eeb47872852f4dbcc8af44a64dcd720796108bcba657d27dd4
@@ -49,7 +49,7 @@ module Paru
49
49
  if yaml_string.empty?
50
50
  contents = {}
51
51
  else
52
- contents = YAML.load yaml_string
52
+ contents = YAML.safe_load yaml_string, permitted_classes: [Date]
53
53
  end
54
54
 
55
55
  if not contents
@@ -86,7 +86,7 @@ module Paru
86
86
  #
87
87
  # @return [String[][]] This Table as a 2D array of cells
88
88
  # represented by their markdown strings.
89
- def to_array(**config)
89
+ def to_array(config = {})
90
90
  headers = if config.has_key? :headers then config[:headers] else false end
91
91
  footers = if config.has_key? :footers then config[:footers] else false end
92
92
 
@@ -111,9 +111,9 @@ module Paru
111
111
  #
112
112
  # @param filename [String] filename to write to
113
113
  # @param config [Hash] See #to_array for config options
114
- def to_file(filename, **config)
114
+ def to_file(filename, config = {})
115
115
  CSV.open(filename, "wb") do |csv|
116
- to_array(config).each {|row| csv << row}
116
+ to_array(**config).each {|row| csv << row}
117
117
  end
118
118
  end
119
119
 
@@ -130,7 +130,7 @@ module Paru
130
130
  # default to false.
131
131
  #
132
132
  # @return [Table]
133
- def self.from_array(data, **config)
133
+ def self.from_array(data, config = {})
134
134
  # With the updated Table definition, it has become complicated
135
135
  # to construct a table manually. It has gotten easier to just
136
136
  # construct a string containing a table in Pandoc's markdown and
@@ -180,7 +180,7 @@ module Paru
180
180
  # @param config [Hash] See #from_file for details
181
181
  #
182
182
  # @return [Table]
183
- def self.from_file(filename, **config)
183
+ def self.from_file(filename, config = {})
184
184
  data = []
185
185
  CSV.foreach(filename) do |row|
186
186
  data << row
@@ -44,8 +44,10 @@ help: true
44
44
  # General reader options:
45
45
  #####
46
46
  shift_heading_level_by: 1
47
+ base_header_level: 1
48
+ strip_empty_paragraphs: true
47
49
  indented_code_classes: ""
48
- default_image_extension: ""
50
+ default_image_extension: "png"
49
51
  file_scope: true
50
52
  filter: [""]
51
53
  lua_filter: [""]
@@ -59,6 +61,7 @@ abbreviations: ""
59
61
  #####
60
62
  # General writing options:
61
63
  #####
64
+ sandbox: false
62
65
  standalone: true
63
66
  template: ""
64
67
  variable: [""]
@@ -68,7 +71,6 @@ eol: "native"
68
71
  dpi: 96
69
72
  wrap: "auto"
70
73
  columns: 78
71
- strip_comments: true
72
74
  toc: true
73
75
  table_of_contents: true
74
76
  toc_depth: 3
@@ -91,7 +93,8 @@ html_q_tags: true
91
93
  ascii: true
92
94
  reference_links: true
93
95
  reference_location: "block"
94
- atx_headers: ""
96
+ markdown_headings: "atx"
97
+ atx_headers: false
95
98
  top_level_division: "section"
96
99
  number_sections: true
97
100
  number_offset: 2
@@ -99,7 +102,6 @@ listings: true
99
102
  incremental: true
100
103
  slide_level: 1
101
104
  section_divs: true
102
- default_image_extension: "png"
103
105
  email_obfuscation: "none"
104
106
  id_prefix: ""
105
107
  title_prefix: ""
@@ -119,7 +121,7 @@ pdf_engine_opt: [""]
119
121
  citeproc: true
120
122
  bibliography: ""
121
123
  csl: ""
122
- citation_abbreviations: ""
124
+ citation_abbreviations: ""
123
125
  natbib: true
124
126
  biblatex: true
125
127
  #####
data/lib/paru.rb CHANGED
@@ -18,5 +18,5 @@
18
18
  #++
19
19
  module Paru
20
20
  # Paru's current version
21
- VERSION = [0, 4, 2, 1]
21
+ VERSION = [0, 4, 2, 5]
22
22
  end
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.1
4
+ version: 0.4.2.5
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-11-04 00:00:00.000000000 Z
11
+ date: 2021-11-11 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
@@ -110,14 +110,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
110
  requirements:
111
111
  - - ">="
112
112
  - !ruby/object:Gem::Version
113
- version: '2.5'
113
+ version: 2.6.8
114
114
  required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - ">="
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  requirements: []
120
- rubygems_version: 3.1.2
120
+ rubygems_version: 3.2.22
121
121
  signing_key:
122
122
  specification_version: 4
123
123
  summary: Paru is a ruby wrapper around pandoc