diff --git a/agda.rb b/agda.rb index 85c06bd..48a83df 100644 --- a/agda.rb +++ b/agda.rb @@ -23,7 +23,7 @@ class AgdaContext return @file_infos[file] if @file_infos.include? file @file_infos[file] = line_infos = {} - unless File.exists?(file) + unless File.exist?(file) return line_infos end diff --git a/analyze.rb b/analyze.rb index 86a8df0..9e39779 100644 --- a/analyze.rb +++ b/analyze.rb @@ -43,7 +43,7 @@ files.each do |file| tags = [] group = 1 draft = false - next unless File.exists?(file) + next unless File.exist?(file) value = File.size(file) url = file.gsub(/^content/, "https://danilafe.com").delete_suffix("/index.md").delete_suffix(".md") File.readlines(file).each do |l| diff --git a/build-agda-html.rb b/build-agda-html.rb index b218bde..06f781d 100644 --- a/build-agda-html.rb +++ b/build-agda-html.rb @@ -26,7 +26,7 @@ files = ARGV code_paths = Dir.entries(root_path).select do |f| File.directory?(File.join(root_path, f)) and f != '.' and f != '..' end.to_set -code_paths += JSON.parse(File.read(data_file)).keys if File.exists? data_file +code_paths += JSON.parse(File.read(data_file)).keys if File.exist? data_file # Extending code_paths from submodules.json means that nested Agda modules # have their root dir correctly set.