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

sgerrand / ex_teya / 36604948051
100%

Build:
DEFAULT BRANCH: main
Ran 29 Sep 2026 05:26PM UTC
Jobs 1
Files 25
Run time 1min
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

29 Sep 2026 05:26PM UTC coverage: 100.0%. Remained the same
36604948051

push

github

web-flow
refactor: simplify request building, SSE streams and test helpers (#60)

* refactor(http): build every request with HTTP.new_request/3

Client, SSE and Auth each built their Req request by hand: user agent,
defaults, configured options, forced options, then decode_body: false.
One builder in Teya.HTTP now does that, so a new rule for every request
lives in one place. Client also stops reading :req_options directly.

* refactor(sse): let streams pick their credentials and run their tasks

SSE.subscribe/5 and SSE.first/4 now take opts, pick the :poslink set and
check the path in the caller, so Payment and Receipt no longer do it
themselves. SSE.first/4 also runs the read in its own task with the
timeout and exit handling that Payment.get/2 used to carry.

open/3 holds the response handling that stream and read_first repeated,
and guard/4 is gone: the subscribe task sends guard/1's error instead.
guard/1 is now private.

* perf(json): copy decoded strings out of the received body

Jason keeps each decoded string as a reference into the input, so a
single status or id a caller kept held the whole response body, or the
whole SSE chunk, in memory. Decode with strings: :copy instead.

* refactor(auth): drop an unreachable error clause and share one error

Every failure the auth process hands out is a %Teya.Error{}, so the
session/1 clause for any other error could only be reached by a test
that put one into the state by hand. Remove both. Build the "token
request failed" error in one private function, as timed_out/0 does.

* refactor(start_record): record the start in Teya.StartRecord

Application.record_start/2 was only called by Teya.StartRecord, which
called back up into Application to write its own record. It is now
StartRecord.record/2.

* refactor(token): return :ok from Token.delete/3 with a with

* test: share one reset of the auth process's state

Teya.APICase, Teya.POSLink.SubscribeCase (twice) and auth_test.exs each
reset the auth state with their... (continued)

56 of 56 new or added lines in 8 files covered. (100.0%)

500 of 500 relevant lines covered (100.0%)

55.39 hits per line

Jobs
ID Job ID Ran Files Coverage
1 36604948051.1 29 Sep 2026 05:26PM UTC 25
100.0
GitHub Action Run
Source Files on build 36604948051
  • Tree
  • List 25
  • Changed 9
  • Source Changed 9
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #36604948051
  • 6c098e93 on github
  • Prev Build on main (#36459061202)
  • Next Build on main (#36894931046)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc