Skip to content

Apply PR review feedback: frozen string literals and file handle fix#182

Merged
OutlawAndy merged 3 commits intoproper-rails-pluginfrom
copilot/sub-pr-181
Mar 11, 2026
Merged

Apply PR review feedback: frozen string literals and file handle fix#182
OutlawAndy merged 3 commits intoproper-rails-pluginfrom
copilot/sub-pr-181

Conversation

Copy link

Copilot AI commented Mar 11, 2026

Why?

Three issues identified in code review of the rolemodel-rails plugin rework:

  • Missing # frozen_string_literal: true in three new/modified files
  • File.open in clean_test_gemfile left a file descriptor unclosed across repeated generator specs

What Changed

  • Add # frozen_string_literal: true to lib/rolemodel-rails.rb, lib/generators/rolemodel/base_generator.rb, and spec/spec_helper.rb
  • Replace File.open with File.readlines in spec/support/helpers/example_app.rb#clean_test_gemfile to close the descriptor deterministically
# before
gemfile = File.open(gemfile_path)
File.write(gemfile_path, gemfile.grep_v(/rolemodel-rails/).join)

# after
File.write(gemfile_path, File.readlines(gemfile_path).grep_v(/rolemodel-rails/).join)

Pre-merge checklist

  • Update relevant READMEs
  • Run bin/bump_version or bin/bump_version --patch

Screenshots

N/A


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…andle fix

Co-authored-by: OutlawAndy <1504753+OutlawAndy@users.noreply.github.com>
Copilot AI changed the title [WIP] Rework to be a proper Rails plugin Apply PR review feedback: frozen string literals, Rails engine guard, file handle fix Mar 11, 2026
…ils.rb

Co-authored-by: OutlawAndy <1504753+OutlawAndy@users.noreply.github.com>
Copilot AI changed the title Apply PR review feedback: frozen string literals, Rails engine guard, file handle fix Apply PR review feedback: frozen string literals and file handle fix Mar 11, 2026
@OutlawAndy OutlawAndy marked this pull request as ready for review March 11, 2026 16:40
@OutlawAndy OutlawAndy merged commit 9e5171a into proper-rails-plugin Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants