mirror of
https://github.com/inspec/inspec
synced 2024-11-10 07:04:15 +00:00
Another chefstyle snafu.
Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
parent
ad0e9abd33
commit
c8fb6c9d6f
1 changed files with 3 additions and 2 deletions
|
@ -295,8 +295,7 @@ namespace :docs do # rubocop:disable Metrics/BlockLength
|
|||
|
||||
docs = ResourceDocs.new(src)
|
||||
resources =
|
||||
Dir.chdir(src) { Dir["resources/*.md{.erb,}"] }
|
||||
.sort
|
||||
Dir.chdir(src) { Dir["resources/*.md{.erb,}"] }.sort
|
||||
puts "Found #{resources.length} resource docs"
|
||||
puts "Rendering docs to #{dst}/"
|
||||
|
||||
|
@ -304,7 +303,9 @@ namespace :docs do # rubocop:disable Metrics/BlockLength
|
|||
seen = {}
|
||||
resources.reverse_each do |file| # bias towards .erb files?
|
||||
dst_name = File.basename(file).sub(/\.md(\.erb)?$/, ".html.md")
|
||||
|
||||
next if seen[dst_name]
|
||||
|
||||
seen[dst_name] = true
|
||||
res = docs.render(file)
|
||||
File.write(File.join(dst, dst_name), res)
|
||||
|
|
Loading…
Reference in a new issue