Browse Source

fix: replace calls to `Dir.exists?` with `Dir.exist?`

Simon Legner 3 years ago
parent
commit
961bbeb92b
2 changed files with 2 additions and 2 deletions
  1. 1 1
      lib/docs/core/scrapers/file_scraper.rb
  2. 1 1
      lib/tasks/docs.thor

+ 1 - 1
lib/docs/core/scrapers/file_scraper.rb

@@ -22,7 +22,7 @@ module Docs
     private
 
     def assert_source_directory_exists
-      unless Dir.exists?(source_directory)
+      unless Dir.exist?(source_directory)
         raise SetupError, "The #{self.class.name} scraper requires the original documentation files to be stored in the \"#{source_directory}\" directory."
       end
     end

+ 1 - 1
lib/tasks/docs.thor

@@ -175,7 +175,7 @@ class DocsCLI < Thor
 
     # Verify files are present
     docs.each do |doc|
-      unless Dir.exists?(File.join(Docs.store_path, doc.path))
+      unless Dir.exist?(File.join(Docs.store_path, doc.path))
         puts "ERROR: directory #{File.join(Docs.store_path, doc.path)} not found."
         return
       end