Unified · Split
| @@ -22,7 +22,7 @@ module Docs · 21 unmodified lines | |||
| 22 | private | 22 | private |
| 23 | 23 | ||
| 24 | def assert_source_directory_exists | 24 | def assert_source_directory_exists |
| 25 | unless Dir.exists?(source_directory) | 25 | unless Dir.exist?(source_directory) |
| 26 | raise SetupError, "The #{self.class.name} scraper requires the original documentation files to be stored in the \"#{source_directory}\" directory." | 26 | raise SetupError, "The #{self.class.name} scraper requires the original documentation files to be stored in the \"#{source_directory}\" directory." |
| 27 | end | 27 | end |
| 28 | end | 28 | end |
| @@ -30,7 +30,7 @@ module Docs · 29 unmodified lines | |||
| 30 | end | 30 | end |
| 31 | 31 | ||
| 32 | def file_exist?(path) | 32 | def file_exist?(path) |
| 33 | File.exists?(path) | 33 | File.exist?(path) |
| 34 | end | 34 | end |
| 35 | 35 | ||
| 36 | def file_mtime(path) | 36 | def file_mtime(path) |
| @@ -46,7 +46,7 @@ module Docs · 9 unmodified lines | |||
| 46 | next if file == path | 46 | next if file == path |
| 47 | Find.prune if File.basename(file)[0] == '.' | 47 | Find.prune if File.basename(file)[0] == '.' |
| 48 | yield file | 48 | yield file |
| 49 | Find.prune unless File.exists?(file) | 49 | Find.prune unless File.exist?(file) |
| 50 | end | 50 | end |
| 51 | end | 51 | end |
| 52 | end | 52 | end |
| @@ -175,12 +175,12 @@ class DocsCLI < Thor · 174 unmodified lines | |||
| 175 | 175 | ||
| 176 | # Verify files are present | 176 | # Verify files are present |
| 177 | docs.each do |doc| | 177 | docs.each do |doc| |
| 178 | unless Dir.exists?(File.join(Docs.store_path, doc.path)) | 178 | unless Dir.exist?(File.join(Docs.store_path, doc.path)) |
| 179 | puts "ERROR: directory #{File.join(Docs.store_path, doc.path)} not found." | 179 | puts "ERROR: directory #{File.join(Docs.store_path, doc.path)} not found." |
| 180 | return | 180 | return |
| 181 | end | 181 | end |
| 182 | 182 | ||
| 183 | unless File.exists?(File.join(Docs.store_path, "#{doc.path}.tar.gz")) | 183 | unless File.exist?(File.join(Docs.store_path, "#{doc.path}.tar.gz")) |
| 184 | puts "ERROR: package for '#{doc.slug}' documentation not found. Run 'thor docs:package #{doc.slug}' to create it." | 184 | puts "ERROR: package for '#{doc.slug}' documentation not found. Run 'thor docs:package #{doc.slug}' to create it." |
| 185 | return | 185 | return |
| 186 | end | 186 | end |