Repository navigation
Add Claude Code configuration files - #3505
Merged
Merged
Conversation
Contributor
Author
|
Oh, and Is an env that tells selenium manager (which downloads chromedriver when needed?) NOT to try contacting https://plausible.io/ for analytics. Analytics pings there were also getting stopped by Claude Code sandbox, and causing abort of things sometimes; we could have let it through the sandbox, alternately we told selenium to stop doing it. |
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.
Getting Claude Code set up to be able to run
rspeceffectively was a bit challenging for me. It is important it can run rspec to a) check on it's work and make sure tests pass, and b) I was actually working on optimizing specs themselves, and wanted it to be able to run test-prof profiling tools and such too.We needed it to be able to run
rspecand other tools withchruby(@eddierubeiz you do use chruby too right?) , which it was having trouble doing. It appears to run not in a normal shell, so adding chrubysourceing to bash or zsh config files did not seem to work reliably.After some investigation and community help, it seemed telling it to prefix ever command with
chruby-execwas the way to go, and telling it to do so in CLAUDE.md.Running capybara with chromedriver was however being defeated by the sandbox (Claude's, MacOS's, not sure). Tried switching to cuprite instead of chromedriver for our capybara browser tests -- no difference. Excluding from sandbox seems to be what people actually do -- to be careful we weren't exempting anything extra accidentally, i wanted to be sure to allow-list only commands starting with
rspec-- but our chruby-exec prefix messed with that!Wound up with a 'wrapper' script at
./bin/chruby-exec-rspec' which wraps the chruby, and ALSO wraps supplying inline ENV (like FPROF=1 for test-prof) supplied in a non-initial location, so we can allow-list strictly./bin/chruby-exec-rspec`.Even when exempted from the sandbox, we were still getting prompts "Do you want to let Claude execute this" for every possible different
rspeccommand arguments, of which there are constnat new ones. So in addition to exempting from sandbox, we exempt all executions prefixed./bin/chruby-exec-rspecfrom that prompt too, withpermissions/allowkey.Claude is now succesfully executing whatever rspec it wants to it's heart's content, which was helpful for the rspec optmiization work for #214