From c319a4014eb29882c07f687cd6a30da267534c49 Mon Sep 17 00:00:00 2001 From: Tristan Starck Date: Mon, 15 Dec 2025 12:34:51 -0800 Subject: [PATCH] fix File.exists? bug --- .github/workflows/main.yml | 2 +- .gitignore | 1 + CHANGELOG.md | 3 +++ Gemfile.lock | 5 +++-- lib/yard/to_mkdocs/default/fulldoc/html/setup.rb | 2 +- lib/yard/to_mkdocs/version.rb | 2 +- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 553797c..9e17355 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - ruby: [2.6, 2.7, '3.0', 3.1] + ruby: [3.1, 3.2, 3.3, 3.4] steps: - uses: actions/checkout@v2 diff --git a/.gitignore b/.gitignore index b04a8c8..a362df0 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ # rspec failure tracking .rspec_status +.idea diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f69d93..ca67416 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.1.2] - 2025-12-15 +- Fix `File.exists?` bug in Ruby 3.2+ + ## [0.1.1] - 2022-05-31 ### Added - Respect the title given for the root directory name in mkdocs navigation diff --git a/Gemfile.lock b/Gemfile.lock index 36101a7..8bdf14b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - yard-to_mkdocs (0.1.1) + yard-to_mkdocs (0.1.2) yard GEM @@ -27,6 +27,7 @@ GEM webrick (~> 1.7.0) PLATFORMS + arm64-darwin-24 x86_64-darwin-20 x86_64-linux @@ -36,4 +37,4 @@ DEPENDENCIES yard-to_mkdocs! BUNDLED WITH - 2.2.29 + 4.0.1 diff --git a/lib/yard/to_mkdocs/default/fulldoc/html/setup.rb b/lib/yard/to_mkdocs/default/fulldoc/html/setup.rb index 6ef0066..6cc6e42 100644 --- a/lib/yard/to_mkdocs/default/fulldoc/html/setup.rb +++ b/lib/yard/to_mkdocs/default/fulldoc/html/setup.rb @@ -29,7 +29,7 @@ def init mkdocs_file_path = File.expand_path('../../mkdocs.yml', options.serializer.basepath) root_path = options.serializer.basepath.split('/')[1..-1].join('/') - if File.exists?(mkdocs_file_path) + if File.exist?(mkdocs_file_path) mkdocs_yaml = YAML.load_file(mkdocs_file_path) mkdocs_nav = mkdocs_yaml['nav'].reject { |item| item["YARD Docs"] } mkdocs_yaml['nav'] = mkdocs_nav + [{ options[:title] => mkdocs_nav_tree(objects.first, root_path) }] diff --git a/lib/yard/to_mkdocs/version.rb b/lib/yard/to_mkdocs/version.rb index c0a307d..f732ef5 100644 --- a/lib/yard/to_mkdocs/version.rb +++ b/lib/yard/to_mkdocs/version.rb @@ -2,6 +2,6 @@ module YARD module ToMkdocs - VERSION = "0.1.1" + VERSION = "0.1.2" end end