markdown_helper 2.5.1 → 2.5.2

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: 3a03aca6d8626d52b3ac599739a247fbb454b298ee0fb02187a451982526c8f6
4
- data.tar.gz: 4ba9dcaf4796e01953debbb350f308484912b6dd850a50727fba32cd15b13bd4
3
+ metadata.gz: aa03a64373ee4630aad5ec0a3ce8d42597b53c23179ecfb05c159382cdca125a
4
+ data.tar.gz: f84f08d3021da11b6f2d0757794eb46198b8a40243671b34b2f13ce931013526
5
5
  SHA512:
6
- metadata.gz: 6e569e86f5512efeb7cc345388bebcfc0524b08d304b0be154095c9728315fec6b804b58685707b87a6dfd7e6974a5bcc63b6162a31f18be25c288beb86a6bc7
7
- data.tar.gz: 130a4b48f210cc5622ccd327273aa1f868ac567f5562662363b0c30cd582a16fbdc3c633a3283f4a03e7a9ecd8350a9f904a848f4dca34ce66e4c203a8d78b7f
6
+ metadata.gz: d73cc10c181eebabe05a20cf935f5063304b2b6fc66afe31e48975e05366494141a159455cf159c97a91326b773f417ce80af408057798fc34cfe7fe4116f1a6
7
+ data.tar.gz: 173d97ed8df7fc42cab0706e002a2a7f39c5637fdb9f25c5516eb89599148a7923285decdabb4d9f38e38888e568aa28d39b31d30ed61d603055971b3827533a
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- markdown_helper (2.5.1)
4
+ markdown_helper (2.5.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -25,8 +25,10 @@ class MarkdownIncluder < MarkdownHelper
25
25
  end
26
26
 
27
27
  def gather_markdown(template_file_path)
28
- check_template(template_file_path)
29
- Dir.chdir(File.dirname(template_file_path)) do
28
+ template_dir_path = File.dirname(template_file_path)
29
+ template_file_name = File.basename(template_file_path)
30
+ Dir.chdir(template_dir_path) do
31
+ check_template(template_file_name)
30
32
  markdown_lines = []
31
33
  template_lines = File.readlines(template_file_path)
32
34
  template_lines.each_with_index do |template_line, i|
@@ -100,8 +102,9 @@ class MarkdownIncluder < MarkdownHelper
100
102
  def include_all(includer_file_path, page_toc_lines, is_nested, output_lines)
101
103
  includer_dir_path = File.dirname(includer_file_path)
102
104
  includer_file_name = File.basename(includer_file_path)
105
+ absolute_includer_file_path = File.absolute_path(includer_file_path)
103
106
  Dir.chdir(includer_dir_path) do
104
- check_template(includer_file_path)
107
+ check_template(includer_file_name)
105
108
  template_lines = File.readlines(includer_file_name)
106
109
  if is_nested
107
110
  add_inclusion_comments(':markdown', includer_file_path, template_lines)
@@ -117,7 +120,7 @@ class MarkdownIncluder < MarkdownHelper
117
120
  next
118
121
  end
119
122
  inclusion = Inclusion.new(
120
- includer_file_path: includer_file_path,
123
+ includer_file_path: absolute_includer_file_path,
121
124
  include_pragma: template_line,
122
125
  includer_line_number: i,
123
126
  treatment: treatment,
@@ -176,7 +179,7 @@ class MarkdownIncluder < MarkdownHelper
176
179
 
177
180
  def check_template(template_file_path)
178
181
  unless File.readable?(template_file_path)
179
- path_in_project = MarkdownHelper.path_in_project(template_file_path )
182
+ path_in_project = MarkdownHelper.path_in_project(template_file_path)
180
183
  message = [
181
184
  "Could not read template file: #{path_in_project}",
182
185
  MarkdownIncluder.backtrace_inclusions(@inclusions),
@@ -1,3 +1,3 @@
1
1
  class MarkdownHelper
2
- VERSION = '2.5.1'
2
+ VERSION = '2.5.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdown_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
4
+ version: 2.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - burdettelamar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-13 00:00:00.000000000 Z
11
+ date: 2019-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler