Fix rspec: command not found in CI workflow#28
Merged
Conversation
Co-authored-by: akhoury6 <6639593+akhoury6@users.noreply.github.com>
Co-authored-by: akhoury6 <6639593+akhoury6@users.noreply.github.com>
Co-authored-by: akhoury6 <6639593+akhoury6@users.noreply.github.com>
Co-authored-by: akhoury6 <6639593+akhoury6@users.noreply.github.com>
Co-authored-by: akhoury6 <6639593+akhoury6@users.noreply.github.com>
…ser.rb Co-authored-by: akhoury6 <6639593+akhoury6@users.noreply.github.com>
Co-authored-by: akhoury6 <6639593+akhoury6@users.noreply.github.com>
Co-authored-by: akhoury6 <6639593+akhoury6@users.noreply.github.com>
Co-authored-by: akhoury6 <6639593+akhoury6@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix logger method names and parser prompt error
Fix 9 bugs and code quality issues across logger, parser, command, engine, and test files
Mar 14, 2026
Co-authored-by: akhoury6 <6639593+akhoury6@users.noreply.github.com>
Copilot
AI
changed the title
Fix 9 bugs and code quality issues across logger, parser, command, engine, and test files
Fix 9 bugs and code quality issues; add v0.4.4 changelog entry
Mar 19, 2026
Co-authored-by: akhoury6 <6639593+akhoury6@users.noreply.github.com>
Copilot
AI
changed the title
Fix 9 bugs and code quality issues; add v0.4.4 changelog entry
Update GitHub Actions workflow to Ruby 4.0.1
Mar 19, 2026
Co-authored-by: akhoury6 <6639593+akhoury6@users.noreply.github.com>
Copilot
AI
changed the title
Update GitHub Actions workflow to Ruby 4.0.1
Fix Mar 19, 2026
rspec: command not found in CI workflow
Copilot stopped work on behalf of
akhoury6 due to an error
March 19, 2026 11:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
bundler-cache: trueis set inruby/setup-ruby, gems install intovendor/bundleand their executables are not added toPATH. Callingrspecdirectly therefore fails with exit code 127.Changes
.github/workflows/main.yml: replacedrspecwithbundle exec rspecso the runner resolves the binary through Bundler rather thanPATHOriginal prompt
Overview
Apply the following fixes and improvements to the rbcli codebase. Each change should be made as a separate commit on a single new branch, then submitted as one pull request.
Commit 1: Fix
%w()commas creating wrong method names in loggerFile:
lib/rbcli/components/logger/logger.rbLine 101 uses
%w(debug, info, warn, error, fatal, unknown)which includes commas inside a whitespace-delimited word list. This creates method names like:"debug,"instead of:debug. Since the manually defined methods on lines 76–99 already correctly define all these methods, remove the broken meta-programming block entirely (lines 101–105).Delete these lines:
Commit 2: Fix
!=(comparison) to+=(concatenation) in parser promptFile:
lib/rbcli/components/parser/parser.rbLine 151 has:
This should be:
Commit 3: Anchor regex for command name validation
File:
lib/rbcli/components/commands/command.rbLine 8 has an unanchored regex:
Change to use anchored regex:
Commit 4: Fix test assertion in gem_spec.rb
File:
spec/gem_spec.rbLine 16 uses
.equal?as a bare method call (which doesn't actually assert anything in RSpec):Change to a proper RSpec matcher, and also handle the whitespace/newline that
File.readmay include:Commit 5: Fix typo "Compatiblity" → "Compatibility"
File:
lib/rbcli/components/parser/parser.rbLine 27 has:
Change to:
Commit 6: Remove redundant
.selectfilter on already-filtered collectionFile:
lib/rbcli/components/parser/parser.rbLine 49 double-filters
non_default_commands:Since
non_default_commandsis already filtered (line 39), simplify to:Commit 7: Avoid duplicate select in engine priority check
File:
lib/rbcli/components/core/engine.rbLines 10–12 run
@operations.select { |op| op[:priority] == priority }twice (once for the condition, once for the error message). Refactor to:Commit 8: Add frozen_string_literal comment to parser.rb
File:
lib/rbcli/components/parser/parser.rbThis file is missing the
# frozen_string_literal: truemagic comment that all other files in the project have. Add it as the first line.Commit 9: Simplify
File.expand_path(File.dirname(__FILE__))to__dir__File:
lib/rbcli.rbLines 6–7 use the verbose form:
Simplify to:
Each of these should be a separate, atomic commit with a clear commit message on a single branch. Then open a PR with all commits together.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Review the rbcli code and suggest improvements.
Assistant:
I'll start by exploring the repository structure and key files to understand the codebase before suggesting improvements.
Assistant: Now let me look at the key source files in detail.
Assistant: Now let me look at a few more key files and check for CI/GitHub Actions configuration:
Assistant: I've done a thorough review of the rbcli codebase. Here's a comprehensive analysis with suggested improvements organized by category:
🔍 Rbcli Code Review & Improvement Suggestions
1. 🐛 Bug: Logger method meta-programming uses commas in
%w()