Skip to content

Commit

Permalink
Documentor clears gem caches.
Browse files Browse the repository at this point in the history
  • Loading branch information
castwide committed May 2, 2020
1 parent 818d92b commit edb8c62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/solargraph/documentor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
require 'open3'
require 'shellwords'
require 'yard'
require 'fileutils'

module Solargraph
class Documentor
Expand All @@ -25,6 +26,7 @@ def document
Documentor.specs_from_bundle(@directory).each_pair do |name, version|
yd = YARD::Registry.yardoc_file_for_gem(name, "= #{version}")
if !yd || @rebuild
FileUtils.safe_unlink File.join(YardMap::CoreDocs.cache_dir, 'gems', "#{name}-#{version}.ser")
@out.puts "Documenting #{name} #{version}"
`yard gems #{name} #{version} #{@rebuild ? '--rebuild' : ''}`
yd = YARD::Registry.yardoc_file_for_gem(name, "= #{version}")
Expand Down

0 comments on commit edb8c62

Please sign in to comment.