reqcord 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +8 -0
  3. data/CHANGELOG.md +77 -0
  4. data/Gemfile +5 -0
  5. data/Gemfile.lock +171 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +239 -95
  8. data/Rakefile +13 -0
  9. data/docs/configuration.md +319 -0
  10. data/examples/complex-spec-app/.rspec +1 -0
  11. data/examples/complex-spec-app/README.md +21 -0
  12. data/examples/complex-spec-app/app.rb +363 -0
  13. data/examples/complex-spec-app/docs/api/README.md +104 -0
  14. data/examples/complex-spec-app/docs/api/api/v1/admin/products/create.md +117 -0
  15. data/examples/complex-spec-app/docs/api/api/v1/admin/products/destroy.md +51 -0
  16. data/examples/complex-spec-app/docs/api/api/v1/admin/products/index.md +11 -0
  17. data/examples/complex-spec-app/docs/api/api/v1/admin/products/list.md +106 -0
  18. data/examples/complex-spec-app/docs/api/api/v1/auth/index.md +9 -0
  19. data/examples/complex-spec-app/docs/api/api/v1/auth/login.md +76 -0
  20. data/examples/complex-spec-app/docs/api/api/v1/cart-items/create.md +91 -0
  21. data/examples/complex-spec-app/docs/api/api/v1/cart-items/destroy.md +51 -0
  22. data/examples/complex-spec-app/docs/api/api/v1/cart-items/index.md +10 -0
  23. data/examples/complex-spec-app/docs/api/api/v1/carts/checkout.md +102 -0
  24. data/examples/complex-spec-app/docs/api/api/v1/carts/index.md +10 -0
  25. data/examples/complex-spec-app/docs/api/api/v1/carts/show.md +73 -0
  26. data/examples/complex-spec-app/docs/api/api/v1/home/index.md +9 -0
  27. data/examples/complex-spec-app/docs/api/api/v1/home/list.md +47 -0
  28. data/examples/complex-spec-app/docs/api/api/v1/notes/create.md +94 -0
  29. data/examples/complex-spec-app/docs/api/api/v1/notes/index.md +10 -0
  30. data/examples/complex-spec-app/docs/api/api/v1/notes/list.md +61 -0
  31. data/examples/complex-spec-app/docs/api/api/v1/orders/cancel.md +69 -0
  32. data/examples/complex-spec-app/docs/api/api/v1/orders/create.md +150 -0
  33. data/examples/complex-spec-app/docs/api/api/v1/orders/destroy.md +37 -0
  34. data/examples/complex-spec-app/docs/api/api/v1/orders/index.md +13 -0
  35. data/examples/complex-spec-app/docs/api/api/v1/orders/list.md +78 -0
  36. data/examples/complex-spec-app/docs/api/api/v1/orders/show.md +83 -0
  37. data/examples/complex-spec-app/docs/api/api/v1/products/index.md +11 -0
  38. data/examples/complex-spec-app/docs/api/api/v1/products/list.md +83 -0
  39. data/examples/complex-spec-app/docs/api/api/v1/products/search.md +88 -0
  40. data/examples/complex-spec-app/docs/api/api/v1/products/show.md +71 -0
  41. data/examples/complex-spec-app/docs/api/api/v1/profiles/index.md +10 -0
  42. data/examples/complex-spec-app/docs/api/api/v1/profiles/show.md +61 -0
  43. data/examples/complex-spec-app/docs/api/api/v1/profiles/update.md +91 -0
  44. data/examples/complex-spec-app/docs/api/api/v2/products/index.md +9 -0
  45. data/examples/complex-spec-app/docs/api/api/v2/products/list.md +77 -0
  46. data/examples/complex-spec-app/docs/api/curl/api/v1/admin/products/create.sh +18 -0
  47. data/examples/complex-spec-app/docs/api/curl/api/v1/admin/products/destroy.sh +9 -0
  48. data/examples/complex-spec-app/docs/api/curl/api/v1/admin/products/list.sh +9 -0
  49. data/examples/complex-spec-app/docs/api/curl/api/v1/auth/login.sh +9 -0
  50. data/examples/complex-spec-app/docs/api/curl/api/v1/cart-items/create.sh +16 -0
  51. data/examples/complex-spec-app/docs/api/curl/api/v1/cart-items/destroy.sh +9 -0
  52. data/examples/complex-spec-app/docs/api/curl/api/v1/carts/checkout.sh +13 -0
  53. data/examples/complex-spec-app/docs/api/curl/api/v1/carts/show.sh +9 -0
  54. data/examples/complex-spec-app/docs/api/curl/api/v1/home/list.sh +8 -0
  55. data/examples/complex-spec-app/docs/api/curl/api/v1/notes/create.sh +15 -0
  56. data/examples/complex-spec-app/docs/api/curl/api/v1/notes/list.sh +9 -0
  57. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/cancel.sh +9 -0
  58. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/create.sh +29 -0
  59. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/destroy.sh +9 -0
  60. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/list.sh +9 -0
  61. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/show.sh +9 -0
  62. data/examples/complex-spec-app/docs/api/curl/api/v1/products/list.sh +8 -0
  63. data/examples/complex-spec-app/docs/api/curl/api/v1/products/search.sh +8 -0
  64. data/examples/complex-spec-app/docs/api/curl/api/v1/products/show.sh +8 -0
  65. data/examples/complex-spec-app/docs/api/curl/api/v1/profiles/show.sh +9 -0
  66. data/examples/complex-spec-app/docs/api/curl/api/v1/profiles/update.sh +16 -0
  67. data/examples/complex-spec-app/docs/api/curl/api/v2/products/list.sh +8 -0
  68. data/examples/complex-spec-app/docs/api/dataset.json +5116 -0
  69. data/examples/complex-spec-app/docs/api/postman/collection.json +2519 -0
  70. data/examples/complex-spec-app/generate.rb +14 -0
  71. data/examples/complex-spec-app/reqcord.yml +28 -0
  72. data/examples/complex-spec-app/spec/requests/admin_spec.rb +67 -0
  73. data/examples/complex-spec-app/spec/requests/cart_spec.rb +61 -0
  74. data/examples/complex-spec-app/spec/requests/home_and_auth_spec.rb +49 -0
  75. data/examples/complex-spec-app/spec/requests/orders_spec.rb +124 -0
  76. data/examples/complex-spec-app/spec/requests/products_spec.rb +65 -0
  77. data/examples/complex-spec-app/spec/spec_helper.rb +17 -0
  78. data/examples/complex-test-app/README.md +40 -0
  79. data/examples/complex-test-app/app.rb +384 -0
  80. data/examples/complex-test-app/docs/api/README.md +104 -0
  81. data/examples/complex-test-app/docs/api/api/v1/admin/products/create.md +117 -0
  82. data/examples/complex-test-app/docs/api/api/v1/admin/products/destroy.md +51 -0
  83. data/examples/complex-test-app/docs/api/api/v1/admin/products/index.md +11 -0
  84. data/examples/complex-test-app/docs/api/api/v1/admin/products/list.md +106 -0
  85. data/examples/complex-test-app/docs/api/api/v1/auth/index.md +9 -0
  86. data/examples/complex-test-app/docs/api/api/v1/auth/login.md +76 -0
  87. data/examples/complex-test-app/docs/api/api/v1/cart-items/create.md +91 -0
  88. data/examples/complex-test-app/docs/api/api/v1/cart-items/destroy.md +51 -0
  89. data/examples/complex-test-app/docs/api/api/v1/cart-items/index.md +10 -0
  90. data/examples/complex-test-app/docs/api/api/v1/carts/checkout.md +102 -0
  91. data/examples/complex-test-app/docs/api/api/v1/carts/index.md +10 -0
  92. data/examples/complex-test-app/docs/api/api/v1/carts/show.md +73 -0
  93. data/examples/complex-test-app/docs/api/api/v1/home/index.md +9 -0
  94. data/examples/complex-test-app/docs/api/api/v1/home/list.md +47 -0
  95. data/examples/complex-test-app/docs/api/api/v1/notes/create.md +94 -0
  96. data/examples/complex-test-app/docs/api/api/v1/notes/index.md +10 -0
  97. data/examples/complex-test-app/docs/api/api/v1/notes/list.md +61 -0
  98. data/examples/complex-test-app/docs/api/api/v1/orders/cancel.md +69 -0
  99. data/examples/complex-test-app/docs/api/api/v1/orders/create.md +150 -0
  100. data/examples/complex-test-app/docs/api/api/v1/orders/destroy.md +37 -0
  101. data/examples/complex-test-app/docs/api/api/v1/orders/index.md +13 -0
  102. data/examples/complex-test-app/docs/api/api/v1/orders/list.md +71 -0
  103. data/examples/complex-test-app/docs/api/api/v1/orders/show.md +83 -0
  104. data/examples/complex-test-app/docs/api/api/v1/products/index.md +11 -0
  105. data/examples/complex-test-app/docs/api/api/v1/products/list.md +83 -0
  106. data/examples/complex-test-app/docs/api/api/v1/products/search.md +88 -0
  107. data/examples/complex-test-app/docs/api/api/v1/products/show.md +71 -0
  108. data/examples/complex-test-app/docs/api/api/v1/profiles/index.md +10 -0
  109. data/examples/complex-test-app/docs/api/api/v1/profiles/show.md +61 -0
  110. data/examples/complex-test-app/docs/api/api/v1/profiles/update.md +91 -0
  111. data/examples/complex-test-app/docs/api/api/v2/products/index.md +9 -0
  112. data/examples/complex-test-app/docs/api/api/v2/products/list.md +77 -0
  113. data/examples/complex-test-app/docs/api/curl/api/v1/admin/products/create.sh +18 -0
  114. data/examples/complex-test-app/docs/api/curl/api/v1/admin/products/destroy.sh +9 -0
  115. data/examples/complex-test-app/docs/api/curl/api/v1/admin/products/list.sh +9 -0
  116. data/examples/complex-test-app/docs/api/curl/api/v1/auth/login.sh +9 -0
  117. data/examples/complex-test-app/docs/api/curl/api/v1/cart-items/create.sh +16 -0
  118. data/examples/complex-test-app/docs/api/curl/api/v1/cart-items/destroy.sh +9 -0
  119. data/examples/complex-test-app/docs/api/curl/api/v1/carts/checkout.sh +13 -0
  120. data/examples/complex-test-app/docs/api/curl/api/v1/carts/show.sh +9 -0
  121. data/examples/complex-test-app/docs/api/curl/api/v1/home/list.sh +8 -0
  122. data/examples/complex-test-app/docs/api/curl/api/v1/notes/create.sh +15 -0
  123. data/examples/complex-test-app/docs/api/curl/api/v1/notes/list.sh +9 -0
  124. data/examples/complex-test-app/docs/api/curl/api/v1/orders/cancel.sh +9 -0
  125. data/examples/complex-test-app/docs/api/curl/api/v1/orders/create.sh +29 -0
  126. data/examples/complex-test-app/docs/api/curl/api/v1/orders/destroy.sh +9 -0
  127. data/examples/complex-test-app/docs/api/curl/api/v1/orders/list.sh +9 -0
  128. data/examples/complex-test-app/docs/api/curl/api/v1/orders/show.sh +9 -0
  129. data/examples/complex-test-app/docs/api/curl/api/v1/products/list.sh +8 -0
  130. data/examples/complex-test-app/docs/api/curl/api/v1/products/search.sh +8 -0
  131. data/examples/complex-test-app/docs/api/curl/api/v1/products/show.sh +8 -0
  132. data/examples/complex-test-app/docs/api/curl/api/v1/profiles/show.sh +9 -0
  133. data/examples/complex-test-app/docs/api/curl/api/v1/profiles/update.sh +16 -0
  134. data/examples/complex-test-app/docs/api/curl/api/v2/products/list.sh +8 -0
  135. data/examples/complex-test-app/docs/api/dataset.json +5109 -0
  136. data/examples/complex-test-app/docs/api/postman/collection.json +2568 -0
  137. data/examples/complex-test-app/generate.rb +14 -0
  138. data/examples/complex-test-app/reqcord.yml +28 -0
  139. data/examples/complex-test-app/test/integration/admin_test.rb +70 -0
  140. data/examples/complex-test-app/test/integration/cart_test.rb +64 -0
  141. data/examples/complex-test-app/test/integration/home_and_auth_test.rb +53 -0
  142. data/examples/complex-test-app/test/integration/orders_test.rb +127 -0
  143. data/examples/complex-test-app/test/integration/products_test.rb +66 -0
  144. data/examples/reqcord.yml +58 -0
  145. data/examples/spec-app/.rspec +1 -0
  146. data/examples/spec-app/README.md +36 -0
  147. data/examples/spec-app/app.rb +209 -0
  148. data/examples/spec-app/docs/api/README.md +45 -0
  149. data/examples/spec-app/docs/api/api/v1/customers/create.md +95 -0
  150. data/examples/spec-app/docs/api/api/v1/customers/index.md +11 -0
  151. data/examples/spec-app/docs/api/api/v1/customers/list.md +67 -0
  152. data/examples/spec-app/docs/api/api/v1/customers/show.md +65 -0
  153. data/examples/spec-app/docs/api/api/v1/tasks/complete.md +51 -0
  154. data/examples/spec-app/docs/api/api/v1/tasks/create.md +90 -0
  155. data/examples/spec-app/docs/api/api/v1/tasks/destroy.md +35 -0
  156. data/examples/spec-app/docs/api/api/v1/tasks/index.md +14 -0
  157. data/examples/spec-app/docs/api/api/v1/tasks/list.md +65 -0
  158. data/examples/spec-app/docs/api/api/v1/tasks/show.md +65 -0
  159. data/examples/spec-app/docs/api/api/v1/tasks/update.md +74 -0
  160. data/examples/spec-app/docs/api/api/v1/users/create.md +95 -0
  161. data/examples/spec-app/docs/api/api/v1/users/index.md +11 -0
  162. data/examples/spec-app/docs/api/api/v1/users/list.md +67 -0
  163. data/examples/spec-app/docs/api/api/v1/users/show.md +65 -0
  164. data/examples/spec-app/docs/api/curl/api/v1/customers/create.sh +17 -0
  165. data/examples/spec-app/docs/api/curl/api/v1/customers/list.sh +9 -0
  166. data/examples/spec-app/docs/api/curl/api/v1/customers/show.sh +9 -0
  167. data/examples/spec-app/docs/api/curl/api/v1/tasks/complete.sh +8 -0
  168. data/examples/spec-app/docs/api/curl/api/v1/tasks/create.sh +15 -0
  169. data/examples/spec-app/docs/api/curl/api/v1/tasks/destroy.sh +8 -0
  170. data/examples/spec-app/docs/api/curl/api/v1/tasks/list.sh +8 -0
  171. data/examples/spec-app/docs/api/curl/api/v1/tasks/show.sh +8 -0
  172. data/examples/spec-app/docs/api/curl/api/v1/tasks/update.sh +14 -0
  173. data/examples/spec-app/docs/api/curl/api/v1/users/create.sh +17 -0
  174. data/examples/spec-app/docs/api/curl/api/v1/users/list.sh +9 -0
  175. data/examples/spec-app/docs/api/curl/api/v1/users/show.sh +9 -0
  176. data/examples/spec-app/docs/api/dataset.json +2402 -0
  177. data/examples/spec-app/docs/api/postman/collection.json +1290 -0
  178. data/examples/spec-app/generate.rb +14 -0
  179. data/examples/spec-app/reqcord.yml +27 -0
  180. data/examples/spec-app/spec/requests/customers_spec.rb +71 -0
  181. data/examples/spec-app/spec/requests/tasks_spec.rb +78 -0
  182. data/examples/spec-app/spec/requests/users_spec.rb +68 -0
  183. data/examples/spec-app/spec/spec_helper.rb +17 -0
  184. data/examples/test-app/README.md +57 -0
  185. data/examples/test-app/app.rb +212 -0
  186. data/examples/test-app/docs/api/README.md +45 -0
  187. data/examples/test-app/docs/api/api/v1/customers/create.md +95 -0
  188. data/examples/test-app/docs/api/api/v1/customers/index.md +11 -0
  189. data/examples/test-app/docs/api/api/v1/customers/list.md +67 -0
  190. data/examples/test-app/docs/api/api/v1/customers/show.md +65 -0
  191. data/examples/test-app/docs/api/api/v1/tasks/complete.md +51 -0
  192. data/examples/test-app/docs/api/api/v1/tasks/create.md +90 -0
  193. data/examples/test-app/docs/api/api/v1/tasks/destroy.md +35 -0
  194. data/examples/test-app/docs/api/api/v1/tasks/index.md +14 -0
  195. data/examples/test-app/docs/api/api/v1/tasks/list.md +65 -0
  196. data/examples/test-app/docs/api/api/v1/tasks/show.md +65 -0
  197. data/examples/test-app/docs/api/api/v1/tasks/update.md +74 -0
  198. data/examples/test-app/docs/api/api/v1/users/create.md +95 -0
  199. data/examples/test-app/docs/api/api/v1/users/index.md +11 -0
  200. data/examples/test-app/docs/api/api/v1/users/list.md +67 -0
  201. data/examples/test-app/docs/api/api/v1/users/show.md +65 -0
  202. data/examples/test-app/docs/api/curl/api/v1/customers/create.sh +17 -0
  203. data/examples/test-app/docs/api/curl/api/v1/customers/list.sh +9 -0
  204. data/examples/test-app/docs/api/curl/api/v1/customers/show.sh +9 -0
  205. data/examples/test-app/docs/api/curl/api/v1/tasks/complete.sh +8 -0
  206. data/examples/test-app/docs/api/curl/api/v1/tasks/create.sh +15 -0
  207. data/examples/test-app/docs/api/curl/api/v1/tasks/destroy.sh +8 -0
  208. data/examples/test-app/docs/api/curl/api/v1/tasks/list.sh +8 -0
  209. data/examples/test-app/docs/api/curl/api/v1/tasks/show.sh +8 -0
  210. data/examples/test-app/docs/api/curl/api/v1/tasks/update.sh +14 -0
  211. data/examples/test-app/docs/api/curl/api/v1/users/create.sh +17 -0
  212. data/examples/test-app/docs/api/curl/api/v1/users/list.sh +9 -0
  213. data/examples/test-app/docs/api/curl/api/v1/users/show.sh +9 -0
  214. data/examples/test-app/docs/api/dataset.json +2402 -0
  215. data/examples/test-app/docs/api/postman/collection.json +1290 -0
  216. data/examples/test-app/generate.rb +14 -0
  217. data/examples/test-app/reqcord.yml +28 -0
  218. data/examples/test-app/test/integration/customers_test.rb +72 -0
  219. data/examples/test-app/test/integration/tasks_test.rb +80 -0
  220. data/examples/test-app/test/integration/users_test.rb +72 -0
  221. data/lib/reqcord/capture/collector.rb +31 -0
  222. data/lib/reqcord/capture/integration_patch.rb +209 -0
  223. data/lib/reqcord/capture/minitest_context.rb +34 -0
  224. data/lib/reqcord/capture/rspec_context.rb +42 -0
  225. data/lib/reqcord/capture/test_context.rb +25 -0
  226. data/lib/reqcord/capture.rb +19 -0
  227. data/lib/reqcord/configuration.rb +198 -0
  228. data/lib/reqcord/dataset.rb +176 -0
  229. data/lib/reqcord/endpoint.rb +263 -0
  230. data/lib/reqcord/errors.rb +9 -0
  231. data/lib/reqcord/exporters/curl.rb +68 -0
  232. data/lib/reqcord/exporters/markdown.rb +295 -0
  233. data/lib/reqcord/exporters/postman.rb +206 -0
  234. data/lib/reqcord/exporters.rb +32 -0
  235. data/lib/reqcord/generator.rb +364 -0
  236. data/lib/reqcord/railtie.rb +51 -0
  237. data/lib/reqcord/renderers/curl.rb +56 -0
  238. data/lib/reqcord/renderers/payload.rb +69 -0
  239. data/lib/reqcord/request_example.rb +104 -0
  240. data/lib/reqcord/response_example.rb +72 -0
  241. data/lib/reqcord/route_collector.rb +242 -0
  242. data/lib/reqcord/sanitizers/sanitizer.rb +140 -0
  243. data/lib/reqcord/schema.rb +187 -0
  244. data/lib/reqcord/support.rb +58 -0
  245. data/lib/reqcord/version.rb +5 -0
  246. data/lib/reqcord.rb +78 -0
  247. data/lib/tasks/reqcord.rake +99 -0
  248. data/reqcord.gemspec +46 -0
  249. metadata +317 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a786e42c21b820aeb729b9b401a4dc61fe61e6946e27d5f615186cbffe1b554c
4
- data.tar.gz: b6fa31a65a90c88c20b51329b34cef327436890700b43fe07f43369056a18e3b
3
+ metadata.gz: 2203f5a2f9ca4548874caf3a40a93c8fbe5a73e6f9d916f6162cbd843fec4341
4
+ data.tar.gz: 05b67df4290c1e6aeba3e5a29416df3f5e779c2d5fcf3eef6cfd76e4a8fabdb8
5
5
  SHA512:
6
- metadata.gz: 0d4bc1a375c768e8f025f555887c341a39eb980841f6f49eb7de5ca1f5f78a82dff51ad5b554d91b434da042d73d2abe446f159d41ad4e7a54e646f5b64f428d
7
- data.tar.gz: 80b569646f903b92d778af3dd00f140817b8f308213074022b8b9bc050307bf0f83ed076cfc5a2f7598c5bc9b6cde43c3f5b08c540a116c79d4cac09f83103c4
6
+ metadata.gz: 11602f1a318f214c92cec4f68723d47ba8b237fa8fb4d7a46e2fe2628168441e9ab3ec8f1f8cf73922f2b3bc5ac0954876e2904e03f9454fd8c99faa7648141f
7
+ data.tar.gz: a273eb86d0b0939215a3375054239c2361d1520c0bf2c8faa8429ae15a9db8c1d923cf005731bd8690da67529496217c807d75abb760f2d963588109273f9e9e
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /pkg/
3
+ /tmp/
4
+ *.gem
5
+ /test/dummy/tmp/
6
+ /test/dummy/docs/
7
+ /test/dummy/log/
8
+ .DS_Store
data/CHANGELOG.md ADDED
@@ -0,0 +1,77 @@
1
+ # Changelog
2
+
3
+ ## [0.1.1] - 2026-09-15
4
+
5
+ ### Added
6
+
7
+ * Postman Collection v2.1 exporter (`postman/collection.json`), on by default.
8
+ Folders follow controller namespaces, requests come from the successful
9
+ captured example, every captured status is a saved response, sanitizer
10
+ placeholders become collection variables and `Bearer {{token}}` becomes
11
+ collection-level auth. Hoppscotch imports the same file.
12
+ * Request parameters (`parameters.path/query/body`) and response fields
13
+ (`responses[].schema`) inferred per endpoint from accepted requests, written
14
+ to `dataset.json` (`schema_version: 2`) and rendered as typed tables in
15
+ Markdown, with closed value sets listed (`"active" | "passive"`).
16
+ * Full route table coverage: `match … via: [:get, :post]` becomes one endpoint
17
+ per verb, `via: :all` is documented per verb the tests used, mounted engines
18
+ are walked under their mount path, `resource :cart` and `root` are titled
19
+ sensibly, optional segments and globs are path parameters.
20
+ * PATCH/PUT twins of `update` fold into one endpoint (`also_methods`).
21
+ * Resources are grouped by full controller path, so `admin/customers` and
22
+ `api/v2/customers` get separate directories and Postman folders.
23
+ * The run reconciles the route table:
24
+ `routes = documented + uncovered + skipped`, with redirects and Rack mounts
25
+ counted as skipped instead of vanishing.
26
+ * `RESOURCE=` accepts the singular (`cart`) and the controller path.
27
+ * `route_name` (the `as:` name) is kept in the dataset.
28
+ * `Renderers::Payload`: the JSON/form and query-flattening decisions shared by
29
+ cURL and Postman.
30
+ * `test.paths`: name the directories (or files, or globs) the API tests live
31
+ in and Reqcord picks the runner — `bin/rails test`, `rspec`, or a plain Ruby
32
+ runner when the project has no `bin/rails`. `test.command` still wins when
33
+ given, and its globs now expand.
34
+ * Three-resource examples (`customers`, `users`, `tasks`) in both
35
+ `examples/test-app` and `examples/spec-app`.
36
+
37
+ ### Changed
38
+
39
+ * Canonical cURL comes only from captured 2xx requests; error-case payloads
40
+ stay as response examples.
41
+ * Endpoint Markdown/cURL files are written only when a successful request was
42
+ captured; uncovered routes are listed under `uncovered_routes` and in the
43
+ index.
44
+ * Form bodies render as `--data 'a=b'` / `urlencoded`, never re-invented as
45
+ JSON.
46
+ * `reqcord:init` defaults `test.command` to `bin/rails test`.
47
+
48
+ ### Fixed
49
+
50
+ * `Endpoint#add_exchange` records the response status on the request, so the
51
+ public API produces documented endpoints without extra setup.
52
+ * `RequestExample.from_h` / `ResponseExample.from_h` ignore keys written by a
53
+ newer Reqcord.
54
+ * A request that produced a different status is kept as its own example even
55
+ when sanitization makes it read like an earlier one (a right and a wrong
56
+ password both become `{{password}}`), so test order can no longer decide
57
+ whether a login endpoint counts as covered.
58
+ * A parameter is only `required` when every accepted request carried it; a
59
+ request accepted with no parameters at all now counts, so `?status=` on a
60
+ list endpoint is documented as optional.
61
+ * Response fields list a closed set of values only when the values look like
62
+ tokens (`"open" | "done"`); fixture names and SKUs that merely repeat across
63
+ responses are shown as one example.
64
+
65
+ ## [0.1.0]
66
+
67
+ * RSpec request spec support (`test.framework: rspec`)
68
+ * Runnable Minitest and RSpec examples under `examples/`
69
+ * Minitest integration test capture for Rails 8, written to a lockable
70
+ capture file so parallel test workers can share it
71
+ * Rails route discovery and endpoint grouping
72
+ * `reqcord.yml` configuration
73
+ * Header and body sanitization
74
+ * Canonical `dataset.json`
75
+ * Markdown documentation with generated cURL examples
76
+ * Resource and API version filtering
77
+ * Routes with no captured example are reported as documentation gaps
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,171 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ reqcord (0.1.1)
5
+ actionpack (>= 8.0, < 9.0)
6
+ railties (>= 8.0, < 9.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionpack (8.1.3.1)
12
+ actionview (= 8.1.3.1)
13
+ activesupport (= 8.1.3.1)
14
+ nokogiri (>= 1.8.5)
15
+ rack (>= 2.2.4)
16
+ rack-session (>= 1.0.1)
17
+ rack-test (>= 0.6.3)
18
+ rails-dom-testing (~> 2.2)
19
+ rails-html-sanitizer (~> 1.6)
20
+ useragent (~> 0.16)
21
+ actionview (8.1.3.1)
22
+ activesupport (= 8.1.3.1)
23
+ builder (~> 3.1)
24
+ erubi (~> 1.11)
25
+ rails-dom-testing (~> 2.2)
26
+ rails-html-sanitizer (~> 1.6)
27
+ activesupport (8.1.3.1)
28
+ base64
29
+ bigdecimal
30
+ concurrent-ruby (~> 1.0, >= 1.3.1)
31
+ connection_pool (>= 2.2.5)
32
+ drb
33
+ i18n (>= 1.6, < 2)
34
+ json
35
+ logger (>= 1.4.2)
36
+ minitest (>= 5.1)
37
+ securerandom (>= 0.3)
38
+ tzinfo (~> 2.0, >= 2.0.5)
39
+ uri (>= 0.13.1)
40
+ base64 (0.3.0)
41
+ bigdecimal (4.1.2)
42
+ builder (3.3.0)
43
+ concurrent-ruby (1.3.8)
44
+ connection_pool (3.0.2)
45
+ crass (1.0.7)
46
+ drb (2.2.3)
47
+ erb (6.0.7)
48
+ erubi (1.13.1)
49
+ i18n (1.15.2)
50
+ concurrent-ruby (~> 1.0)
51
+ io-console (0.9.2)
52
+ irb (1.18.0)
53
+ pp (>= 0.6.0)
54
+ prism (>= 1.3.0)
55
+ rdoc (>= 4.0.0)
56
+ reline (>= 0.4.2)
57
+ json (2.21.2)
58
+ logger (1.7.0)
59
+ loofah (2.25.2)
60
+ crass (~> 1.0.2)
61
+ nokogiri (>= 1.12.0)
62
+ minitest (6.0.6)
63
+ drb (~> 2.0)
64
+ prism (~> 1.5)
65
+ nokogiri (1.19.4-arm64-darwin)
66
+ racc (~> 1.4)
67
+ pp (0.6.4)
68
+ prettyprint
69
+ prettyprint (0.2.0)
70
+ prism (1.9.0)
71
+ racc (1.8.1)
72
+ rack (3.2.7)
73
+ rack-session (2.1.2)
74
+ base64 (>= 0.1.0)
75
+ rack (>= 3.0.0)
76
+ rack-test (2.2.0)
77
+ rack (>= 1.3)
78
+ rackup (2.3.1)
79
+ rack (>= 3)
80
+ rails-dom-testing (2.3.0)
81
+ activesupport (>= 5.0.0)
82
+ minitest
83
+ nokogiri (>= 1.6)
84
+ rails-html-sanitizer (1.7.1)
85
+ loofah (~> 2.25, >= 2.25.2)
86
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
87
+ railties (8.1.3.1)
88
+ actionpack (= 8.1.3.1)
89
+ activesupport (= 8.1.3.1)
90
+ irb (~> 1.13)
91
+ rackup (>= 1.0.0)
92
+ rake (>= 12.2)
93
+ thor (~> 1.0, >= 1.2.2)
94
+ tsort (>= 0.2)
95
+ zeitwerk (~> 2.6)
96
+ rake (13.4.2)
97
+ rbs (4.2.0)
98
+ logger
99
+ prism (>= 1.6.0)
100
+ tsort
101
+ rdoc (8.0.0)
102
+ erb
103
+ prism (>= 1.6.0)
104
+ rbs (>= 4.0.0)
105
+ tsort
106
+ reline (0.7.0)
107
+ io-console (~> 0.5)
108
+ securerandom (0.4.1)
109
+ thor (1.5.0)
110
+ tsort (0.2.0)
111
+ tzinfo (2.0.6)
112
+ concurrent-ruby (~> 1.0)
113
+ uri (1.1.1)
114
+ useragent (0.16.11)
115
+ zeitwerk (2.8.3)
116
+
117
+ PLATFORMS
118
+ arm64-darwin-24
119
+
120
+ DEPENDENCIES
121
+ minitest
122
+ rake
123
+ reqcord!
124
+
125
+ CHECKSUMS
126
+ actionpack (8.1.3.1)
127
+ actionview (8.1.3.1)
128
+ activesupport (8.1.3.1)
129
+ base64 (0.3.0)
130
+ bigdecimal (4.1.2)
131
+ builder (3.3.0)
132
+ concurrent-ruby (1.3.8)
133
+ connection_pool (3.0.2)
134
+ crass (1.0.7)
135
+ drb (2.2.3)
136
+ erb (6.0.7)
137
+ erubi (1.13.1)
138
+ i18n (1.15.2)
139
+ io-console (0.9.2)
140
+ irb (1.18.0)
141
+ json (2.21.2)
142
+ logger (1.7.0)
143
+ loofah (2.25.2)
144
+ minitest (6.0.6)
145
+ nokogiri (1.19.4-arm64-darwin)
146
+ pp (0.6.4)
147
+ prettyprint (0.2.0)
148
+ prism (1.9.0)
149
+ racc (1.8.1)
150
+ rack (3.2.7)
151
+ rack-session (2.1.2)
152
+ rack-test (2.2.0)
153
+ rackup (2.3.1)
154
+ rails-dom-testing (2.3.0)
155
+ rails-html-sanitizer (1.7.1)
156
+ railties (8.1.3.1)
157
+ rake (13.4.2)
158
+ rbs (4.2.0)
159
+ rdoc (8.0.0)
160
+ reline (0.7.0)
161
+ reqcord (0.1.1)
162
+ securerandom (0.4.1)
163
+ thor (1.5.0)
164
+ tsort (0.2.0)
165
+ tzinfo (2.0.6)
166
+ uri (1.1.1)
167
+ useragent (0.16.11)
168
+ zeitwerk (2.8.3)
169
+
170
+ BUNDLED WITH
171
+ 4.0.3
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 Ahmet Saridogan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.