Skip to content

Release 0.12.1: require fileutils before OpenApiImport.from#7

Merged
MarioRuiz merged 1 commit intomasterfrom
fix/fileutils-require-0-12-1
Apr 21, 2026
Merged

Release 0.12.1: require fileutils before OpenApiImport.from#7
MarioRuiz merged 1 commit intomasterfrom
fix/fileutils-require-0-12-1

Conversation

@MarioRuiz
Copy link
Copy Markdown
Owner

@MarioRuiz MarioRuiz commented Apr 21, 2026

Summary

  • Bug: OpenApiImport.from called FileUtils.rm_f without ensuring the stdlib was loaded, so bare require "open_api_import" could raise uninitialized constant OpenApiImport::FileUtils.
  • Fix: require "fileutils" in the gem entrypoint and use ::FileUtils.rm_f at the call site.
  • Release: Bump gem to 0.12.1 and document in CHANGELOG.md.
  • Test: Add a small regression spec that FileUtils is defined after requiring the gem.

Test plan

  • bundle exec rubocop (targeted files)
  • bundle exec rspec spec/open_api_import/fileutils_require_spec.rb
  • Full suite in CI after merge

Made with Cursor

Avoid uninitialized constant when the gem is required without another
stdlib dependency loading FileUtils first. Bump to 0.12.1 and add a
regression spec.

Made-with: Cursor
@MarioRuiz MarioRuiz merged commit abf8497 into master Apr 21, 2026
12 checks passed
@MarioRuiz MarioRuiz deleted the fix/fileutils-require-0-12-1 branch April 21, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant