Repository navigation
Add Ruby + PostgreSQL quickstart guide - #773
Nsanjayboruds wants to merge 53 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new Ruby (Sinatra) + PostgreSQL quickstart and wires it into the Quickstarts UI and sidebar so users can discover and follow the guide.
Changes:
- Added a new Ruby (Sinatra) + PostgreSQL Books CRUD quickstart doc (Docker + Local flows).
- Added “Ruby” to the Quickstart language filter UI and registered Ruby quickstart entries in the list.
- Added a Ruby category under QuickStarts in the v4.0.0 sidebar.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| versioned_sidebars/version-4.0.0-sidebars.json | Adds Ruby category + doc entry under QuickStarts for v4.0.0 navigation. |
| versioned_docs/version-4.0.0/quickstart/ruby-sinatra-postgres.md | New Ruby+Postgres quickstart guide content (Docker + Local). |
| src/components/QuickStartList.js | Registers Ruby quickstarts (Docker + Local) in the Quickstarts catalog. |
| src/components/QuickStartFilter.js | Adds Ruby as a selectable language with icon/color in the filter UI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d1b6200 to
4f2b408
Compare
|
@copilot open a new pull request to apply changes based on the comments in this thread |
1 similar comment
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Achanandhi-M
left a comment
There was a problem hiding this comment.
Hey @Nsanjayboruds , thanks a lot for adding the changes—really appreciate the effort. There are a few small things that still need to be added; you can use this guide as a reference: https://github.com/keploy/docs/blob/main/ADDING_A_QUICKSTART.md
Also, if possible, could you please include a short video showcasing your changes? That would be very helpful
8d671ce to
eadbf29
Compare
hey @Achanandhi-M i added a video showcasing my change |
Signed-off-by: Nsanjayboruds <[email protected]>
7219218 to
ba4b880
Compare
Signed-off-by: Nsanjayboruds <[email protected]>
23f225c to
0718d0a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 8 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
amaan-bhati
left a comment
There was a problem hiding this comment.
Thank you for adding the Ruby Sinatra and PostgreSQL quickstart and for providing the demo video. The guide structure and content are a good start.
A few things need to be addressed before this is ready to merge:
Issues Found
1. Image filenames with spaces
The committed image files have problematic names:
ruby quickstartdocker_Compose.png- contains a spaceruby_keploy .png- has a trailing space before the extension
These cause URL encoding issues and are inconsistent with the repo's image naming conventions. Please rename them using only underscores or hyphens with no spaces or trailing characters.
2. QuickStartFilter.js over-reformatted
The diff shows 149 additions and 30 deletions in QuickStartFilter.js, which is far more than what adding a single Ruby entry requires. The extra formatting-only changes create unnecessary merge conflicts for other open PRs. Please revert those and keep the diff scoped to only the Ruby entry addition.
3. Outstanding items from contributing guide
Please confirm all items from ADDING_A_QUICKSTART.md have been addressed and request a re-review from the maintainer.
Please also rebase against main before resubmitting as there are merge conflicts with other open PRs touching the same files.
Signed-off-by: Nsanjayboruds <[email protected]>
96145ca to
e68ccf8
Compare
|
Sidebar duplicate comment Frontmatter keyword vs keywords Local flow running keploy record twice QuickStartFilter over-formatted / large diff Image filenames with spaces / trailing characters Outstanding ADDING_A_QUICKSTART checklist + rebase request |
|
Hey @Nsanjayboruds Thank you for the updates - the image filename fixes, frontmatter correction, revert of the formatting-only changes in QuickStartFilter.js, and the rebased branch are all appreciated. The demo videos are a good addition as well. There are still a couple of things worth considering before this moves forward: Issues to be Considered
This has been flagged twice and has not been structurally resolved.
The diff for
The guide currently references a personal GitHub repository for the sample app. For long-term maintainability it would be better to have this hosted under the official Keploy org so the link remains stable regardless of what happens to the your personal account. Once the review is done and we are good to go, we can push these changes to a repo in the Keploy org once we have discussed this internally with the team. |
Signed-off-by: Nsanjayboruds <[email protected]>
|
Hi @Nsanjayboruds, please raise a PR for your quickstart here and update the docs accordingly. Repository: https://github.com/keploy/samples-ruby |
Hi @dhananjay6561, Done! I have created the new Pull Request in the official samples-ruby repository for the expanded quickstart application (you can see it linked above). I've also updated the markdown files in this current PR to point users to the new official repository location instead of my personal one. Let me know if there's anything else you need me to adjust! |
Signed-off-by: nishant sanjay borude <[email protected]>
ca28d4e to
2f2c8a1
Compare
dhananjay6561
left a comment
There was a problem hiding this comment.
Reviewed the Ruby + PostgreSQL quickstart. The wizard rewrite (version-gated Ruby entries), the doc's slug/anchors, the QuickStartList links, and the sidebar id all line up correctly, and the local-run commands/ports match the sample app. Two things to address: a Docker replay command that drops --cmd-type docker-compose, and two committed-but-unreferenced screenshots. Details inline.
|
Hey @dhananjay6561 , thanks for the detailed review! Here's what I've fixed: Docker replay command — Added the missing --cid-type docker-compose flag to the keploy test command in the Docker section. Delay flags (--buildDelay 50 --delay 10) are already consistent and unchanged. |
dhananjay6561
left a comment
There was a problem hiding this comment.
A couple of notes on the local setup steps, inline.
dhananjay6561
left a comment
There was a problem hiding this comment.
One more on the language picker, inline.
- Replace broken cp .env.example .env step with explicit export instructions; app has no dotenv gem so .env would never be loaded - Fix createdb to use postgres role and add step to create the role if missing, preventing 503 on fresh local PostgreSQL installs - Add type="button" to wizard option buttons to prevent accidental form submission in QuickStartFilter.js - Add role="radio" and aria-checked to language and environment picker buttons for screen-reader accessibility
|
Hey @dhananjay6561, addressed the two new rounds of feedback:
Language picker accessibility:
|
dhananjay6561
left a comment
There was a problem hiding this comment.
Went through this again end to end, together with keploy/samples-ruby#1, which it depends on. Earlier rounds fixed a lot, but the guide still has blockers:
- The Docker replay command is broken.
--cid-typeisn't a Keploy flag (should be--cmd-type), so the main Docker path fails at the last step. - The recorded-testcase screenshot isn't a real Keploy recording. It shows a hand-made
keploy/testsdir with 4 files and a flatmocks.yml. The "setup" screenshot is adocker compose down -vone-liner from a personal path. - The Linux/WSL local setup doesn't work on Linux/WSL. The Postgres role steps assume a macOS/Homebrew install and fail on Ubuntu with
|| truehiding the error. - The Docker section never shows
keploy record; it's all inside a script that prompts for sudo and wipes the DB volume without warning. - The
QuickStartFilter.jsdiff is mostly unrelated reformatting, and the version gate is a Ruby-specific special case.
Also, the expected error bodies in this guide will never show up as written until the error-handler bug in the sample app is fixed (see the sample PR).
Please run every command in this doc exactly as written, on a fresh Ubuntu/WSL machine, before the next push. The --cid-type typo is the kind of thing a single run catches.
- Fix PostgreSQL setup for Ubuntu/WSL: use sudo -u postgres and -h localhost flags; remove broken CREATE ROLE and || true - Fix /health expected response to include database:connected field - Fix negative test: add author field so published_year type check is actually reached; add expected error response - Remove redundant copy-paste intro in local record section - Fix aria: replace role=radio+aria-checked with aria-pressed on wizard option buttons (no radiogroup/tabIndex scaffolding needed) - Fix mocks.yml/test-x.yml to mocks.yaml/test-N.yaml in local section
Hey @dhananjay6561, addressed all the new feedback: PostgreSQL setup on Ubuntu/WSL — Replaced the broken psql -U $(whoami) CREATE ROLE ... || true approach with the correct Ubuntu/WSL flow: sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'postgres';" followed by createdb -h localhost and psql -h localhost (peer auth workaround). Dropped the || true that was hiding the error. /health expected response — Updated to include the actual "database":"connected" field that app.rb returns Negative test — Added "author": "Test Author" so validation actually reaches the published_year type check. Added the expected response {"error":"Published year must be an integer"} Redundant copy-paste intro — Collapsed the "Lights, Camera, Record!" + "Make some API calls" double paragraph into a single line before "Generate Testcases" role="radio" / aria-checked — Replaced with aria-pressed on the wizard option buttons. role="radio" needs a role="radiogroup" parent and roving tabIndex keyboard handling; aria-pressed on a plain type="button" works standalone with no extra scaffolding |
Add Ruby + PostgreSQL Quickstart Guide
📝 Description
This PR adds a comprehensive quickstart guide for Ruby (Sinatra) with PostgreSQL integration, demonstrating how to use Keploy for automated API testing with Ruby applications.
🎯 Changes Made
✅ Created new quickstart documentation:
ruby-sinatra-postgres.md✅ Added Ruby language support to
QuickStartFilter.js✅ Registered quickstart in
QuickStartList.js✅ Updated sidebar navigation in
version-4.0.0-sidebars.json🔗 Related Repository
Sample application repository: https://github.com/Nsanjayboruds/keploy-ruby-postgresql-quickstart
✅ Pre-submission Checklist
npm run buildsuccessful)📸 Preview
The quickstart covers:
🙏 Additional Notes
This is my first contribution to Keploy docs. Looking forward to feedback and happy to make any requested changes!