rdoc-markdown 0.16.0 → 0.16.1

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: d3d1c4068ecf819554e104801cbf461b722e150e0472bb4215ef96a887750e58
4
- data.tar.gz: 5de0a95f8b8265b6877a43f85f14ef55f3a4ce7c5bc4bc972b22be104c91d959
3
+ metadata.gz: 2ff64065c50e370a502784e01c59e86d8dd6490a6c28f87cfec28b3a22bcd235
4
+ data.tar.gz: 9c54ac15590b858a761bafb3fd1055925f19c3a6d783beff8c8d77dba984a953
5
5
  SHA512:
6
- metadata.gz: 7a7863e3dbcf54782565a065f2997e90e3d5f4a5985e174f855dbd060c0afe6af9dd29239a08e2a6466690126370ae44d366bce012eb8b4612e3740a78704992
7
- data.tar.gz: 71251348e64ae468b1b739925635aae9f79e003d5be8fef71b769fd757d72e532d8489375a2887adf606b433142b23b50ca93756f38eb88e6aaa57b22e344258
6
+ metadata.gz: e754b47dd630557c3765a2407eee71edb7a106151436c9054dc0cab928afc35b68e65bab29ea158f847a92378251f37990487d6bdbfb0339fd824748e32bcb81
7
+ data.tar.gz: f8108d248d231e0d3c8066a687d9513570d38ddcfa47e917b330dc51ee7db8c512a85cad7acf1fced09856383e914e45d3f7c7cb5e38aa129ce5099aaa555e47
data/CHANGELOG.md CHANGED
@@ -3,6 +3,8 @@
3
3
 
4
4
  ## Unreleased
5
5
 
6
+ - Fix copying Markdown pages when RDoc receives relative input paths.
7
+
6
8
  ## 0.16.0
7
9
 
8
10
  - Don't convert markdown files from source folder. Just copy them.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rdoc-markdown (0.16.0)
4
+ rdoc-markdown (0.16.1)
5
5
  csv
6
6
  erb
7
7
  rdoc (>= 8.0)
@@ -98,6 +98,7 @@ class RDoc::Generator::Markdown
98
98
  def initialize(store, rdoc_options)
99
99
  @store = store
100
100
  @options = rdoc_options
101
+ @source_dir = File.expand_path(rdoc_options.root.to_s)
101
102
  @markdown_unknown_tags = self.class.validate_markdown_unknown_tags(rdoc_options.markdown_unknown_tags)
102
103
  end
103
104
 
@@ -223,7 +224,7 @@ class RDoc::Generator::Markdown
223
224
  out_file = Pathname.new("#{output_dir}/#{page_output_path(page)}")
224
225
  out_file.dirname.mkpath
225
226
 
226
- next FileUtils.cp(page.absolute_name, out_file) if page.relative_name.end_with?(".md", ".markdown")
227
+ next FileUtils.cp(File.expand_path(page.absolute_name, @source_dir), out_file) if page.relative_name.end_with?(".md", ".markdown")
227
228
 
228
229
  content = markdownify(render_description(page))
229
230
  File.write(out_file, finalize_markdown(
@@ -719,7 +720,7 @@ class RDoc::Generator::Markdown
719
720
  def normalize_input_path_for_output(path)
720
721
  normalized = path.tr("\\", "/").sub(%r{\A\./}, "")
721
722
 
722
- root = File.expand_path(@options.root.to_s)
723
+ root = @source_dir
723
724
  normalized = normalized.sub(%r{\A#{Regexp.escape(root)}/}, "")
724
725
  normalized = normalized.sub(%r{\A/}, "")
725
726
 
@@ -5,6 +5,6 @@ module Rdoc
5
5
  # @private
6
6
  module Markdown
7
7
  # @private
8
- VERSION = "0.16.0"
8
+ VERSION = "0.16.1"
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdoc-markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stanislav (Stas) Katkov