Merged
Conversation
Extract demo code from lib/clack.rb to examples/demo.rb, add proxy method.
Use handle_cancel instead of cancel? to show cancellation messages. Include examples directory in gem files.
Greptile Overview
|
| Filename | Overview |
|---|---|
| clack.gemspec | Added examples/**/* to packaged files so examples are distributed with the gem |
| lib/clack.rb | Refactored demo method to load implementation from examples/demo.rb instead of containing inline code |
| examples/demo.rb | Moved demo implementation from lib/clack.rb and consistently uses Clack.handle_cancel instead of Clack.cancel? |
Sequence Diagram
sequenceDiagram
participant User
participant CLI as clack-demo (exe)
participant Clack as Clack Module
participant Demo as examples/demo.rb
User->>CLI: Execute clack-demo
CLI->>Clack: Clack.demo()
Clack->>Clack: Resolve path to examples/demo.rb
Clack->>Demo: load demo_path
Demo->>Demo: Define run_demo()
Clack->>Demo: Call run_demo()
Demo->>Clack: Call various prompt methods
Note over Demo,Clack: text, select, confirm, multiselect,<br/>autocomplete, select_key, path,<br/>group_multiselect, progress, tasks,<br/>spinner, log, note, outro
Demo->>Demo: Check cancel with handle_cancel()
Demo-->>User: Display interactive prompts
User-->>Demo: Provide input
Demo-->>User: Show results and summary
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
a685293 to
877eb75
Compare
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.
The demo logic is moved out of the main library into a dedicated example script, and project configuration is updated to better handle the new structure and examples.