my_api_client 1.3.1 → 2.0.0

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 (248) hide show
  1. checksums.yaml +4 -4
  2. data/.dockerignore +8 -0
  3. data/.envrc.skeleton +0 -1
  4. data/.github/dependabot.yml +82 -7
  5. data/.github/workflows/ci.yml +334 -0
  6. data/.github/workflows/dependabot-auto-merge.yml +96 -0
  7. data/.github/workflows/release.yml +33 -0
  8. data/.github/workflows/rubocop_challenge.yml +33 -0
  9. data/.gitignore +1 -0
  10. data/.rubocop.yml +1 -1
  11. data/.ruby-version +1 -1
  12. data/AGENTS.md +128 -0
  13. data/CHANGELOG.md +54 -2
  14. data/CLAUDE.md +6 -0
  15. data/Dockerfile +22 -0
  16. data/Gemfile +1 -1
  17. data/Gemfile.lock +67 -59
  18. data/README.md +398 -62
  19. data/docker-compose.yml +29 -0
  20. data/docs/runbooks/dependabot_pr_auto_merge.md +113 -0
  21. data/gemfiles/rails_7.2.gemfile +1 -1
  22. data/gemfiles/{rails_7.1.gemfile → rails_8.0.gemfile} +2 -2
  23. data/gemfiles/{rails_6.1.gemfile → rails_8.1.gemfile} +2 -2
  24. data/lib/my_api_client/default_error_handlers.rb +1 -1
  25. data/lib/my_api_client/errors/client_error.rb +5 -1
  26. data/lib/my_api_client/integrations/bugsnag.rb +1 -1
  27. data/lib/my_api_client/version.rb +1 -1
  28. data/lib/my_api_client.rb +1 -1
  29. data/my_api/.ruby-version +1 -1
  30. data/my_api/AGENTS.md +35 -0
  31. data/my_api/Dockerfile +25 -0
  32. data/my_api/Gemfile +5 -16
  33. data/my_api/Gemfile.lock +263 -228
  34. data/my_api/README.md +36 -25
  35. data/my_api/Rakefile +3 -2
  36. data/my_api/app/controllers/application_controller.rb +1 -2
  37. data/my_api/app/controllers/error_controller.rb +2 -2
  38. data/my_api/app/controllers/header_controller.rb +6 -3
  39. data/my_api/app/controllers/pagination_controller.rb +5 -15
  40. data/my_api/app/controllers/rest_controller.rb +12 -16
  41. data/my_api/app/controllers/status_controller.rb +3 -4
  42. data/my_api/config/application.rb +12 -67
  43. data/{rails_app/rails_6.1 → my_api}/config/boot.rb +1 -1
  44. data/{rails_app/rails_7.1 → my_api}/config/environment.rb +0 -2
  45. data/my_api/config/environments/development.rb +6 -6
  46. data/my_api/config/environments/production.rb +5 -8
  47. data/my_api/config/environments/test.rb +5 -6
  48. data/my_api/config/routes.rb +2 -10
  49. data/my_api/config.ru +2 -4
  50. data/my_api/public/index.html +10 -90
  51. data/{rails_app/rails_7.0 → my_api}/spec/rails_helper.rb +3 -4
  52. data/my_api/spec/requests/error_controller_spec.rb +18 -0
  53. data/my_api/spec/requests/pagination_controller_spec.rb +22 -0
  54. data/my_api/spec/requests/rest_controller_spec.rb +22 -0
  55. data/my_api/spec/requests/status_controller_spec.rb +20 -0
  56. data/my_api/spec/spec_helper.rb +15 -23
  57. data/my_api_client.gemspec +2 -2
  58. data/rails_app/AGENTS.md +13 -0
  59. data/rails_app/rails_7.2/Dockerfile +1 -1
  60. data/rails_app/rails_7.2/Gemfile +2 -0
  61. data/rails_app/rails_7.2/Gemfile.lock +143 -122
  62. data/rails_app/{rails_7.1 → rails_8.0}/.dockerignore +16 -2
  63. data/rails_app/{rails_6.1 → rails_8.0}/.gitattributes +2 -1
  64. data/rails_app/rails_8.0/.github/workflows/ci.yml +39 -0
  65. data/rails_app/{rails_6.1 → rails_8.0}/.gitignore +11 -7
  66. data/rails_app/rails_8.0/.rubocop.yml +8 -0
  67. data/rails_app/rails_8.0/.ruby-version +1 -0
  68. data/rails_app/{rails_7.1 → rails_8.0}/Dockerfile +28 -18
  69. data/rails_app/rails_8.0/Gemfile +15 -0
  70. data/rails_app/rails_8.0/Gemfile.lock +286 -0
  71. data/rails_app/{rails_6.1 → rails_8.0}/Rakefile +1 -3
  72. data/rails_app/{rails_7.1 → rails_8.0}/app/controllers/application_controller.rb +0 -2
  73. data/rails_app/rails_8.0/app/jobs/application_job.rb +7 -0
  74. data/rails_app/rails_8.0/app/mailers/application_mailer.rb +4 -0
  75. data/rails_app/{rails_7.0 → rails_8.0}/app/models/application_record.rb +0 -2
  76. data/rails_app/rails_8.0/app/views/layouts/mailer.html.erb +13 -0
  77. data/rails_app/rails_8.0/app/views/layouts/mailer.text.erb +1 -0
  78. data/rails_app/rails_8.0/bin/brakeman +7 -0
  79. data/rails_app/rails_8.0/bin/dev +2 -0
  80. data/rails_app/rails_8.0/bin/docker-entrypoint +14 -0
  81. data/rails_app/rails_8.0/bin/rails +4 -0
  82. data/rails_app/rails_8.0/bin/rake +4 -0
  83. data/rails_app/rails_8.0/bin/rubocop +8 -0
  84. data/rails_app/{rails_7.1 → rails_8.0}/bin/setup +11 -12
  85. data/rails_app/rails_8.0/bin/thrust +5 -0
  86. data/rails_app/{rails_7.1 → rails_8.0}/config/application.rb +14 -16
  87. data/rails_app/rails_8.0/config/boot.rb +3 -0
  88. data/rails_app/rails_8.0/config/cable.yml +10 -0
  89. data/rails_app/rails_8.0/config/credentials.yml.enc +1 -0
  90. data/rails_app/{rails_7.1 → rails_8.0}/config/database.yml +18 -2
  91. data/rails_app/{rails_6.1 → rails_8.0}/config/environment.rb +1 -3
  92. data/rails_app/rails_8.0/config/environments/development.rb +70 -0
  93. data/rails_app/rails_8.0/config/environments/production.rb +86 -0
  94. data/rails_app/{rails_7.1 → rails_8.0}/config/environments/test.rb +16 -19
  95. data/rails_app/{rails_7.1 → rails_8.0}/config/initializers/cors.rb +0 -1
  96. data/rails_app/{rails_7.1 → rails_8.0}/config/initializers/filter_parameter_logging.rb +2 -4
  97. data/rails_app/{rails_7.0 → rails_8.0}/config/initializers/inflections.rb +0 -1
  98. data/rails_app/rails_8.0/config/puma.rb +41 -0
  99. data/rails_app/{rails_7.1 → rails_8.0}/config/routes.rb +1 -3
  100. data/rails_app/rails_8.0/config/storage.yml +34 -0
  101. data/rails_app/{rails_7.1 → rails_8.0}/config.ru +1 -3
  102. data/rails_app/{rails_7.1 → rails_8.0}/db/seeds.rb +0 -1
  103. data/rails_app/{rails_7.1 → rails_8.0}/spec/rails_helper.rb +1 -1
  104. data/rails_app/rails_8.1/.dockerignore +45 -0
  105. data/rails_app/rails_8.1/.gitattributes +9 -0
  106. data/rails_app/rails_8.1/.github/workflows/ci.yml +52 -0
  107. data/rails_app/rails_8.1/.gitignore +33 -0
  108. data/rails_app/rails_8.1/.rspec +1 -0
  109. data/rails_app/rails_8.1/.rubocop.yml +8 -0
  110. data/rails_app/rails_8.1/.ruby-version +1 -0
  111. data/rails_app/rails_8.1/Dockerfile +68 -0
  112. data/rails_app/rails_8.1/Gemfile +15 -0
  113. data/rails_app/rails_8.1/Gemfile.lock +289 -0
  114. data/rails_app/{rails_7.0 → rails_8.1}/Rakefile +1 -3
  115. data/rails_app/{rails_6.1 → rails_8.1}/app/controllers/application_controller.rb +0 -2
  116. data/rails_app/rails_8.1/app/jobs/application_job.rb +7 -0
  117. data/rails_app/rails_8.1/app/mailers/application_mailer.rb +4 -0
  118. data/rails_app/{rails_7.1 → rails_8.1}/app/models/application_record.rb +0 -2
  119. data/rails_app/rails_8.1/app/views/layouts/mailer.html.erb +13 -0
  120. data/rails_app/rails_8.1/app/views/layouts/mailer.text.erb +1 -0
  121. data/rails_app/rails_8.1/bin/brakeman +7 -0
  122. data/rails_app/rails_8.1/bin/bundler-audit +6 -0
  123. data/rails_app/rails_8.1/bin/ci +6 -0
  124. data/rails_app/rails_8.1/bin/dev +2 -0
  125. data/rails_app/{rails_7.1 → rails_8.1}/bin/docker-entrypoint +1 -1
  126. data/rails_app/rails_8.1/bin/rails +4 -0
  127. data/rails_app/rails_8.1/bin/rake +4 -0
  128. data/rails_app/rails_8.1/bin/rubocop +8 -0
  129. data/rails_app/{rails_7.0 → rails_8.1}/bin/setup +13 -13
  130. data/rails_app/rails_8.1/bin/thrust +5 -0
  131. data/rails_app/{rails_6.1 → rails_8.1}/config/application.rb +19 -17
  132. data/rails_app/rails_8.1/config/boot.rb +3 -0
  133. data/rails_app/rails_8.1/config/bundler-audit.yml +5 -0
  134. data/rails_app/rails_8.1/config/cable.yml +10 -0
  135. data/rails_app/rails_8.1/config/ci.rb +19 -0
  136. data/rails_app/rails_8.1/config/credentials.yml.enc +1 -0
  137. data/rails_app/rails_8.1/config/database.yml +40 -0
  138. data/rails_app/{rails_7.0 → rails_8.1}/config/environment.rb +1 -3
  139. data/rails_app/rails_8.1/config/environments/development.rb +73 -0
  140. data/rails_app/rails_8.1/config/environments/production.rb +86 -0
  141. data/rails_app/rails_8.1/config/environments/test.rb +53 -0
  142. data/rails_app/{rails_7.0 → rails_8.1}/config/initializers/cors.rb +1 -2
  143. data/rails_app/rails_8.1/config/initializers/filter_parameter_logging.rb +8 -0
  144. data/rails_app/{rails_7.1 → rails_8.1}/config/initializers/inflections.rb +0 -1
  145. data/rails_app/rails_8.1/config/locales/en.yml +31 -0
  146. data/rails_app/rails_8.1/config/puma.rb +42 -0
  147. data/rails_app/rails_8.1/config/routes.rb +10 -0
  148. data/rails_app/rails_8.1/config/storage.yml +27 -0
  149. data/rails_app/{rails_7.0 → rails_8.1}/config.ru +1 -3
  150. data/rails_app/rails_8.1/db/seeds.rb +9 -0
  151. data/rails_app/{rails_6.1 → rails_8.1}/spec/rails_helper.rb +1 -2
  152. metadata +139 -136
  153. data/.circleci/config.yml +0 -344
  154. data/README.jp.md +0 -785
  155. data/gemfiles/rails_7.0.gemfile +0 -15
  156. data/my_api/.envrc.skeleton +0 -3
  157. data/my_api/.jetskeep +0 -1
  158. data/my_api/Procfile +0 -7
  159. data/my_api/app/helpers/application_helper.rb +0 -5
  160. data/my_api/app/jobs/application_job.rb +0 -7
  161. data/my_api/app/models/application_item.rb +0 -5
  162. data/my_api/config/dynamodb.yml +0 -22
  163. data/my_api/spec/controllers/error_controller_spec.rb +0 -43
  164. data/my_api/spec/controllers/header_controller_spec.rb +0 -33
  165. data/my_api/spec/controllers/pagination_controller_spec.rb +0 -73
  166. data/my_api/spec/controllers/rest_controller_spec.rb +0 -99
  167. data/my_api/spec/controllers/status_controller_spec.rb +0 -47
  168. data/my_api/spec/fixtures/payloads/posts-index.json +0 -51
  169. data/my_api/spec/fixtures/payloads/posts-show.json +0 -53
  170. data/rails_app/rails_6.1/.rspec +0 -3
  171. data/rails_app/rails_6.1/Gemfile +0 -17
  172. data/rails_app/rails_6.1/Gemfile.lock +0 -195
  173. data/rails_app/rails_6.1/app/models/application_record.rb +0 -5
  174. data/rails_app/rails_6.1/bin/bundle +0 -122
  175. data/rails_app/rails_6.1/bin/rails +0 -6
  176. data/rails_app/rails_6.1/bin/rake +0 -6
  177. data/rails_app/rails_6.1/bin/setup +0 -35
  178. data/rails_app/rails_6.1/config/credentials.yml.enc +0 -1
  179. data/rails_app/rails_6.1/config/database.yml +0 -25
  180. data/rails_app/rails_6.1/config/environments/development.rb +0 -59
  181. data/rails_app/rails_6.1/config/environments/production.rb +0 -97
  182. data/rails_app/rails_6.1/config/environments/test.rb +0 -51
  183. data/rails_app/rails_6.1/config/initializers/application_controller_renderer.rb +0 -9
  184. data/rails_app/rails_6.1/config/initializers/backtrace_silencers.rb +0 -10
  185. data/rails_app/rails_6.1/config/initializers/cors.rb +0 -17
  186. data/rails_app/rails_6.1/config/initializers/filter_parameter_logging.rb +0 -8
  187. data/rails_app/rails_6.1/config/initializers/inflections.rb +0 -17
  188. data/rails_app/rails_6.1/config/initializers/mime_types.rb +0 -5
  189. data/rails_app/rails_6.1/config/initializers/wrap_parameters.rb +0 -16
  190. data/rails_app/rails_6.1/config/locales/en.yml +0 -33
  191. data/rails_app/rails_6.1/config/routes.rb +0 -5
  192. data/rails_app/rails_6.1/config.ru +0 -8
  193. data/rails_app/rails_6.1/db/seeds.rb +0 -8
  194. data/rails_app/rails_7.0/Gemfile +0 -13
  195. data/rails_app/rails_7.0/Gemfile.lock +0 -212
  196. data/rails_app/rails_7.0/app/controllers/application_controller.rb +0 -4
  197. data/rails_app/rails_7.0/bin/bundle +0 -122
  198. data/rails_app/rails_7.0/bin/rails +0 -6
  199. data/rails_app/rails_7.0/bin/rake +0 -6
  200. data/rails_app/rails_7.0/config/application.rb +0 -41
  201. data/rails_app/rails_7.0/config/boot.rb +0 -5
  202. data/rails_app/rails_7.0/config/credentials.yml.enc +0 -1
  203. data/rails_app/rails_7.0/config/database.yml +0 -25
  204. data/rails_app/rails_7.0/config/environments/development.rb +0 -58
  205. data/rails_app/rails_7.0/config/environments/production.rb +0 -70
  206. data/rails_app/rails_7.0/config/environments/test.rb +0 -52
  207. data/rails_app/rails_7.0/config/initializers/filter_parameter_logging.rb +0 -8
  208. data/rails_app/rails_7.0/config/locales/en.yml +0 -33
  209. data/rails_app/rails_7.0/config/routes.rb +0 -8
  210. data/rails_app/rails_7.0/db/seeds.rb +0 -8
  211. data/rails_app/rails_7.1/Gemfile +0 -16
  212. data/rails_app/rails_7.1/Gemfile.lock +0 -241
  213. data/rails_app/rails_7.1/README.md +0 -24
  214. data/rails_app/rails_7.1/Rakefile +0 -8
  215. data/rails_app/rails_7.1/bin/bundle +0 -122
  216. data/rails_app/rails_7.1/bin/rails +0 -6
  217. data/rails_app/rails_7.1/bin/rake +0 -6
  218. data/rails_app/rails_7.1/config/boot.rb +0 -5
  219. data/rails_app/rails_7.1/config/credentials.yml.enc +0 -1
  220. data/rails_app/rails_7.1/config/environments/development.rb +0 -58
  221. data/rails_app/rails_7.1/config/environments/production.rb +0 -74
  222. data/rails_app/rails_7.1/config/puma.rb +0 -46
  223. data/rails_app/rails_7.1/public/robots.txt +0 -2
  224. data/rails_app/rails_7.1/spec/spec_helper.rb +0 -13
  225. data/rails_app/rails_7.1/vendor/.keep +0 -0
  226. data/rails_app/rails_7.2/.github/dependabot.yml +0 -12
  227. /data/rails_app/{rails_7.1 → rails_8.0}/.rspec +0 -0
  228. /data/rails_app/{rails_6.1 → rails_8.0}/README.md +0 -0
  229. /data/rails_app/{rails_6.1 → rails_8.0}/app/controllers/concerns/.keep +0 -0
  230. /data/rails_app/{rails_6.1/app/javascript → rails_8.0/app/models/concerns}/.keep +0 -0
  231. /data/rails_app/{rails_7.1 → rails_8.0}/config/locales/en.yml +0 -0
  232. /data/rails_app/{rails_6.1/app/models/concerns → rails_8.0/lib/tasks}/.keep +0 -0
  233. /data/rails_app/{rails_6.1/lib/tasks → rails_8.0/log}/.keep +0 -0
  234. /data/rails_app/{rails_6.1 → rails_8.0}/public/robots.txt +0 -0
  235. /data/rails_app/{rails_6.1/tmp → rails_8.0/script}/.keep +0 -0
  236. /data/rails_app/{rails_6.1 → rails_8.0}/spec/spec_helper.rb +0 -0
  237. /data/rails_app/{rails_6.1/tmp/pids → rails_8.0/storage}/.keep +0 -0
  238. /data/rails_app/{rails_6.1 → rails_8.0}/vendor/.keep +0 -0
  239. /data/rails_app/{rails_7.0 → rails_8.1}/README.md +0 -0
  240. /data/rails_app/{rails_7.1 → rails_8.1}/app/controllers/concerns/.keep +0 -0
  241. /data/rails_app/{rails_7.1 → rails_8.1}/app/models/concerns/.keep +0 -0
  242. /data/rails_app/{rails_7.1 → rails_8.1}/lib/tasks/.keep +0 -0
  243. /data/rails_app/{rails_7.1/storage → rails_8.1/log}/.keep +0 -0
  244. /data/rails_app/{rails_7.0 → rails_8.1}/public/robots.txt +0 -0
  245. /data/rails_app/{rails_7.1/tmp → rails_8.1/script}/.keep +0 -0
  246. /data/rails_app/{rails_7.0 → rails_8.1}/spec/spec_helper.rb +0 -0
  247. /data/rails_app/{rails_7.1/tmp/pids → rails_8.1/storage}/.keep +0 -0
  248. /data/rails_app/{rails_7.1/tmp/storage → rails_8.1/vendor}/.keep +0 -0
@@ -0,0 +1,29 @@
1
+ services:
2
+ my_api:
3
+ build:
4
+ context: ./my_api
5
+ dockerfile: Dockerfile
6
+ environment:
7
+ RAILS_ENV: development
8
+ volumes:
9
+ - ./my_api:/app
10
+ ports:
11
+ - "38080:3000"
12
+ healthcheck:
13
+ test: ["CMD", "curl", "-fsS", "http://localhost:3000/status/200"]
14
+ interval: 5s
15
+ timeout: 3s
16
+ retries: 20
17
+
18
+ test:
19
+ build:
20
+ context: .
21
+ dockerfile: Dockerfile
22
+ environment:
23
+ MY_API_ENDPOINT: http://my_api:3000
24
+ volumes:
25
+ - .:/app
26
+ depends_on:
27
+ my_api:
28
+ condition: service_healthy
29
+ command: bash
@@ -0,0 +1,113 @@
1
+ # Dependabot PR Review and Auto-Merge Runbook
2
+
3
+ ## Purpose
4
+ This runbook standardizes how to review Dependabot pull requests for GitHub Actions updates and safely enable auto-merge.
5
+
6
+ ## Scope
7
+ - Target: PRs created by Dependabot that update GitHub Actions versions (for example, `actions/upload-artifact`).
8
+ - Primary workflow file in this repository: `.github/workflows/ci.yml`.
9
+ - This runbook is for PR operation only, so creating a dedicated local work branch is normally unnecessary.
10
+
11
+ ## Prerequisites
12
+ - `gh` CLI is authenticated and can access `ryz310/my_api_client`.
13
+ - You have permission to comment on and merge PRs.
14
+ - Branch protection rules and required checks are configured on GitHub.
15
+ - Before starting the runbook, update local `master` and re-read `AGENTS.md`.
16
+
17
+ ```bash
18
+ git checkout master
19
+ git fetch origin
20
+ git pull --ff-only origin master
21
+ sed -n '1,260p' AGENTS.md
22
+ ```
23
+
24
+ ## Auto-merge workflow policy
25
+ - Keep `package-ecosystem` decisions separated in `.github/workflows/dependabot-auto-merge.yml`.
26
+ - Apply independent conditions for each ecosystem to avoid cross-ecosystem condition mixing.
27
+ - For `github-actions` ecosystem auto-merge, require all of the following:
28
+ - GitHub official actions only (`actions/*` or `github/*`)
29
+ - non-major updates only (patch/minor)
30
+ - no changes related to `permissions` or `pull_request_target`
31
+ - CI pass/fail gating is controlled by branch protection and required checks on GitHub.
32
+
33
+ ## Step-by-step
34
+ 1. Open PR metadata and changed files.
35
+
36
+ ```bash
37
+ gh pr view <PR_NUMBER> --json number,title,author,baseRefName,headRefName,files,body
38
+ ```
39
+
40
+ 2. Validate that the PR is in scope.
41
+ - Confirm `author.login` is `app/dependabot`.
42
+ - Confirm changed files are GitHub Actions workflow/dependabot update files and the update target is GitHub Actions.
43
+ - If either condition is not met, stop this runbook and notify the user that manual review is required.
44
+
45
+ 3. Review the exact diff and identify action version changes.
46
+
47
+ ```bash
48
+ gh pr diff <PR_NUMBER>
49
+ ```
50
+
51
+ 4. Summarize impact from the diff and release notes.
52
+ - Explain what functional changes are introduced by each action version bump.
53
+ - Explain whether existing workflows are affected (runtime requirements, minimum runner version, breaking changes, behavior changes such as credential handling).
54
+ - For major version updates, verify compatibility notes in the official release notes.
55
+ - Post this summary to the user and ask for explicit approval to proceed.
56
+
57
+ 5. Only after user approval, enable auto-merge.
58
+ - Use repository default merge method unless there is an explicit instruction to force squash merge.
59
+
60
+ ```bash
61
+ gh pr merge <PR_NUMBER> --auto
62
+ # Optional (only when squash is explicitly required):
63
+ # gh pr merge <PR_NUMBER> --auto --squash
64
+ ```
65
+
66
+ 6. Check merge state.
67
+
68
+ ```bash
69
+ gh pr view <PR_NUMBER> --json state,mergeStateStatus,autoMergeRequest
70
+ ```
71
+
72
+ 7. If `mergeStateStatus` is `BEHIND`, post a Dependabot rebase comment (also only after user approval from Step 4).
73
+
74
+ ```bash
75
+ gh pr comment <PR_NUMBER> --body "@dependabot rebase"
76
+ ```
77
+
78
+ 8. Re-check status until the branch is up to date and required checks pass.
79
+ - After posting `@dependabot rebase`, wait 1 minute before retrying.
80
+ - If rebase has not started after 1 minute (for example, `mergeStateStatus` is still `BEHIND`), post `@dependabot rebase` again.
81
+ - Retry comment posting up to 2 times in total. If it is still `BEHIND` after the second retry, stop and escalate for manual follow-up.
82
+ - Run each command step-by-step and inspect output after each `gh pr view` call before deciding the next action.
83
+
84
+ ```bash
85
+ # Check current state
86
+ gh pr view <PR_NUMBER> --json state,mergeStateStatus,statusCheckRollup,autoMergeRequest
87
+
88
+ # If mergeStateStatus is BEHIND, wait 1 minute
89
+ sleep 60
90
+
91
+ # Re-check after waiting
92
+ gh pr view <PR_NUMBER> --json state,mergeStateStatus,statusCheckRollup,autoMergeRequest
93
+
94
+ # If still BEHIND, post @dependabot rebase (up to 2 retries total)
95
+ # gh pr comment <PR_NUMBER> --body "@dependabot rebase"
96
+ ```
97
+
98
+ ## Done criteria
99
+ - `autoMergeRequest` is enabled.
100
+ - `mergeStateStatus` is not `BEHIND`.
101
+ - Required CI checks are green.
102
+ - PR is merged automatically, or clearly waiting only on pending required checks.
103
+ - The user-approved impact summary is recorded in the operation log/comment thread.
104
+
105
+ ## Failure handling
106
+ - If rebase does not start, wait 1 minute, confirm `mergeStateStatus` is still `BEHIND`, then re-run comment (up to 2 retries total):
107
+ - `@dependabot rebase`
108
+ - Execute checks and retries sequentially (check -> wait -> re-check -> comment) rather than chaining commands without inspection.
109
+ - If it is still `BEHIND` after 2 retries, stop automated retries and notify the user for manual follow-up.
110
+ - If checks fail, inspect failing jobs and decide:
111
+ - fix in a follow-up PR, or
112
+ - close/ignore that update version with Dependabot commands.
113
+ - If the update introduces breaking changes, disable auto-merge and switch to manual review with explicit test evidence.
@@ -9,7 +9,7 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
9
9
  gem 'activesupport', '~> 7.2.0'
10
10
 
11
11
  group :integrations, optional: true do
12
- gem 'bugsnag', '>= 6.11.0'
12
+ gem 'bugsnag', '>= 6.19.0'
13
13
  end
14
14
 
15
15
  gemspec
@@ -6,10 +6,10 @@ source 'https://rubygems.org'
6
6
 
7
7
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
8
8
 
9
- gem 'activesupport', '~> 7.1.0'
9
+ gem 'activesupport', '~> 8.0.0'
10
10
 
11
11
  group :integrations, optional: true do
12
- gem 'bugsnag', '>= 6.11.0'
12
+ gem 'bugsnag', '>= 6.19.0'
13
13
  end
14
14
 
15
15
  gemspec
@@ -6,10 +6,10 @@ source 'https://rubygems.org'
6
6
 
7
7
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
8
8
 
9
- gem 'activesupport', '~> 6.1.0'
9
+ gem 'activesupport', '~> 8.1.0'
10
10
 
11
11
  group :integrations, optional: true do
12
- gem 'bugsnag', '>= 6.11.0'
12
+ gem 'bugsnag', '>= 6.19.0'
13
13
  end
14
14
 
15
15
  gemspec
@@ -31,7 +31,7 @@ module MyApiClient
31
31
  error_handling status_code: 417, raise: ClientError::ExpectationFailed
32
32
  error_handling status_code: 418, raise: ClientError::IamTeapot
33
33
  error_handling status_code: 421, raise: ClientError::MisdirectedRequest
34
- error_handling status_code: 422, raise: ClientError::UnprocessableEntity
34
+ error_handling status_code: 422, raise: ClientError::UnprocessableContent
35
35
  error_handling status_code: 423, raise: ClientError::Locked
36
36
  error_handling status_code: 424, raise: ClientError::FailedDependency
37
37
  error_handling status_code: 425, raise: ClientError::TooEarly
@@ -63,9 +63,13 @@ module MyApiClient
63
63
  # 421 Misdirected Request
64
64
  class MisdirectedRequest < ClientError; end
65
65
 
66
- # 422 Unprocessable Entity
66
+ # 422 Unprocessable Entity (Deprecated)
67
67
  class UnprocessableEntity < ClientError; end
68
68
 
69
+ # 422 Unprocessable Content
70
+ class UnprocessableContent < UnprocessableEntity; end
71
+ deprecate_constant :UnprocessableEntity
72
+
69
73
  # 423 Locked
70
74
  class Locked < ClientError; end
71
75
 
@@ -11,7 +11,7 @@ module MyApiClient
11
11
 
12
12
  Bugsnag.leave_breadcrumb(
13
13
  "#{self.class.name} occurred",
14
- metadata&.transform_values(&:inspect),
14
+ metadata,
15
15
  Bugsnag::Breadcrumbs::ERROR_BREADCRUMB_TYPE
16
16
  )
17
17
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MyApiClient
4
- VERSION = '1.3.1'
4
+ VERSION = '2.0.0'
5
5
  end
data/lib/my_api_client.rb CHANGED
@@ -33,7 +33,7 @@ require 'my_api_client/sleeper'
33
33
  # Loads gems for feature of integrations
34
34
  begin
35
35
  require 'bugsnag'
36
- require 'my_api_client/integrations/bugsnag' if defined?(Bugsnag) && Bugsnag::VERSION >= '6.11.0'
36
+ require 'my_api_client/integrations/bugsnag' if defined?(Bugsnag) && Bugsnag::VERSION >= '6.19.0'
37
37
  rescue LoadError
38
38
  nil
39
39
  end
data/my_api/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.6
1
+ 4.0
data/my_api/AGENTS.md ADDED
@@ -0,0 +1,35 @@
1
+ # my_api AGENTS.md
2
+
3
+ ## Current Stack Policy
4
+
5
+ - `my_api/` is a Rails 8.1 API-only application.
6
+ - Use the latest supported Ruby version for `my_api/`.
7
+ - Keep these files aligned when Ruby or runtime settings change:
8
+ - `my_api/.ruby-version`
9
+ - `my_api/Dockerfile`
10
+ - `docker-compose.yml`
11
+ - `.github/workflows/ci.yml` (integration job)
12
+
13
+ ## API Compatibility Policy
14
+
15
+ - Keep endpoint behavior compatible with integration specs under `spec/integrations/api_clients/`.
16
+ - If endpoint behavior changes, update both:
17
+ - `my_api/app/controllers/*`
18
+ - related specs in `spec/integrations/api_clients/*_spec.rb`
19
+ - Keep an HTTP mapping comment above each controller action in this format:
20
+ - `# GET /path`
21
+ - `# POST /path`
22
+ - `# PUT/PATCH /path/:id`
23
+ - `# DELETE /path/:id`
24
+
25
+ ## Test Execution Policy
26
+
27
+ - Run real HTTP integration tests with Docker Compose:
28
+ 1. `docker compose up -d --build my_api`
29
+ 2. `docker compose run --rm test`
30
+ 3. `docker compose down --volumes --remove-orphans`
31
+
32
+ ## Implementation Scope Policy
33
+
34
+ - Do not reintroduce Ruby on Jets specific dependencies or configuration.
35
+ - Keep `my_api/` focused on fixture endpoints for `my_api_client` integration tests.
data/my_api/Dockerfile ADDED
@@ -0,0 +1,25 @@
1
+ # syntax=docker/dockerfile:1
2
+
3
+ ARG RUBY_VERSION=4.0
4
+ FROM ruby:${RUBY_VERSION}-slim
5
+
6
+ WORKDIR /app
7
+
8
+ RUN apt-get update -qq && \
9
+ apt-get install --no-install-recommends -y build-essential curl git libyaml-dev pkg-config && \
10
+ rm -rf /var/lib/apt/lists /var/cache/apt/archives
11
+
12
+ ENV BUNDLE_PATH=/usr/local/bundle \
13
+ BUNDLE_JOBS=4 \
14
+ BUNDLE_RETRY=3
15
+
16
+ RUN gem install bundler -v "~> 2.0"
17
+
18
+ COPY Gemfile Gemfile.lock /app/
19
+ RUN bundle install
20
+
21
+ COPY . /app
22
+
23
+ EXPOSE 3000
24
+
25
+ CMD ["bundle", "exec", "rackup", "-o", "0.0.0.0", "-p", "3000"]
data/my_api/Gemfile CHANGED
@@ -2,25 +2,14 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- gem 'jets', '~> 4.0.10'
5
+ gem 'puma', '>= 6.0'
6
+ gem 'rails', '~> 8.1.3'
6
7
 
7
- gem 'dynomite'
8
-
9
- # See: https://github.com/boltops-tools/jets/issues/523
10
- gem 'nokogiri', '~> 1.17.2'
11
-
12
- # development and test groups are not bundled as part of the deployment
13
8
  group :development, :test do
14
- # Call 'byebug' anywhere in the code to stop execution and get a debugger console
15
- gem 'byebug', platforms: %i[mri mingw x64_mingw]
16
- gem 'puma'
17
- gem 'rack'
18
- gem 'shotgun'
9
+ gem 'rspec-rails'
19
10
  end
20
11
 
21
12
  group :test do
22
- gem 'capybara'
23
- gem 'launchy'
24
- gem 'rspec'
25
- gem 'rspec_junit_formatter'
13
+ gem 'simplecov'
14
+ gem 'simplecov_json_formatter'
26
15
  end