• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sgerrand / ex_humaans / 25328040242 / 1
99%
main: 99%

Build:
DEFAULT BRANCH: main
Ran 04 May 2026 03:33PM UTC
Files 20
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 May 2026 03:32PM UTC coverage: 100.0%. Remained the same
25328040242.1

push

github

web-flow
feat(client): convert snake_case body keys to camelCase (#94)

* feat(client): convert snake_case body keys to camelCase before sending

Responses come back camelCase and are converted to snake_case via
ExConstructor on the resource structs. The request side was
asymmetric — callers had to remember to write camelCase keys, and
unknown keys silently dropped server-side, which was a foot-gun for
typos.

Humaans.Client.post/3 and patch/3 now route request bodies through
Humaans.CaseConvert.to_camel_case_keys/1. Atom keys produce atom keys,
string keys produce string keys. Already-camelCase keys pass through
unchanged, so existing call sites keep working.

Only top-level keys are converted to keep the rule predictable —
nested objects (e.g. address structures) are left to the caller.

* test(case_convert): cover capitalize_first fallback branches

Add cases for keys with uppercase segments (foo_BAR) and consecutive
underscores (foo__bar) to exercise the non-lowercase fallback in
capitalize_first/1.

* refactor(case_convert): drop unreachable empty-list branch in camelize

String.split/2 always returns at least one element, so the [] -> string
clause was dead code. Replace the case with a head/tail match.

* test(case_convert): use standard Mox setup pattern

Replace the misuse of Mox.verify_on_exit!/1 (which expects an ExUnit
test context, not a client struct) with the import-based pattern used
elsewhere in the suite: import expect/3 and verify_on_exit!/1, then
register setup :verify_on_exit! at the top level. The previous form
silently failed to verify Mox expectations on test exit.

* refactor(case_convert)!: emit string keys to avoid runtime atom creation

The conversion path used Atom.to_string |> camelize |> String.to_atom,
which creates a new atom for every camelCase derivative of an atom-keyed
input. Atoms are not garbage-collected, so untrusted or high-cardinality
request bodies could exhaust the atom table (DoS). This contradicts the
existing gui... (continued)

212 of 212 relevant lines covered (100.0%)

20.86 hits per line

Source Files on job 25328040242.1
  • Tree
  • List 20
  • Changed 1
  • Source Changed 1
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 25328040242
  • ac6b5559 on github
  • Prev Job for on main (#25323253278.1)
  • Next Job for on main (#25328097979.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc