v2/rails: Terminalwire::V2::Rails::Thor mixin + browser/file/dir/env helpers#31
Merged
Conversation
…y/env helpers Make the v2 Thor CLI a drop-in for v1's Rails terminal: - Terminalwire::V2::Rails::Thor — include it to get v2 I/O + the client session + Rails route URL helpers (root_url, *_url) in no_commands. The v2 equivalent of v1's Terminalwire::Thor. The per-connection host is already set by the handler. - Expose the client resources on the CLI instance via the v2 Thor Helpers: browser, file, directory, env, client (alias for context) — so unchanged Thor commands like `browser.launch(terminal_authorization_url)` work over v2. Verified: v2-only ogplus login now reaches 'Waiting for authorization' (URL helper + browser resolve); whoami stays graceful. Full suite 96/0.
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.
Makes the v2 Thor CLI a drop-in for v1's Rails terminal:
Terminalwire::V2::Rails::Thor(v2 I/O + session + Rails URL helpers in no_commands), and exposesbrowser/file/directory/env/clienton the CLI instance via the v2 Thor Helpers. So unchanged Thor commands (browser.launch(terminal_authorization_url), etc.) work over v2. Verified: v2-only ogplus login reaches 'Waiting for authorization'. Suite 96/0.