From 55fb0f5a5abc85128ac462d3c145dd187d14d7b8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 13 Nov 2025 03:18:26 +0000 Subject: [PATCH 1/3] Initial plan From 2557d59a3fd2ff1255dd9937ca41c2aee589af79 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 13 Nov 2025 03:22:46 +0000 Subject: [PATCH 2/3] Fix RuboCop offenses (autocorrected) Co-authored-by: tuanle03 <66480375+tuanle03@users.noreply.github.com> --- config/application.rb | 2 +- config/boot.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/application.rb b/config/application.rb index 60130c3..25cc033 100644 --- a/config/application.rb +++ b/config/application.rb @@ -10,7 +10,7 @@ module CodeLearnApi class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 7.0 - + # Disable freezing of autoload_paths and eager_load_paths for Rails 8.1 compatibility # with older gems that try to modify these arrays config.autoloader = :zeitwerk diff --git a/config/boot.rb b/config/boot.rb index 4b2050d..95eda66 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -6,7 +6,7 @@ # Monkey patch Array to prevent freezing errors in Rails 8.1 # This allows older gems to modify frozen autoload_paths arrays class Array - alias_method :original_freeze, :freeze + alias original_freeze freeze def freeze # Check if this array is being set as autoload_paths or eager_load_paths From 5180a795e289efde5b16b2e628ee2e94bd6053b9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 13 Nov 2025 03:34:00 +0000 Subject: [PATCH 3/3] Update RuboCop workflow to run on pull requests Co-authored-by: tuanle03 <66480375+tuanle03@users.noreply.github.com> --- .github/workflows/rubocop.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index dc34639..f0aa093 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -4,6 +4,9 @@ on: push: branches: - main + pull_request: + branches: + - main jobs: rubocop: