Releases: poli-page/sdk-ruby
Releases · poli-page/sdk-ruby
v0.9.0
Added — first release
PoliPage::Clientwithrenderanddocumentsnamespaces, sync
retry loop, hook firing, and thread-safe accessors.render.pdf,render.pdf_stream(block + Enumerator forms),
render.preview,render.document.documents.get,documents.preview,documents.thumbnails,
documents.delete.Client#render_to_file— streams the PDF straight to disk with
bounded memory.DocumentDescriptor#download_pdf— fluent helper that fetches the
PDF bytes from the descriptor's presigned URL.- Class hierarchy errors rooted at
PoliPage::Error < StandardError:
ValidationError(400),AuthenticationError(401),
PermissionDeniedError(403),NotFoundError(404),GoneError(410),
RateLimitError(429),APIError(other 4xx/5xx),
InvalidOptionsError,ConnectionError,TimeoutError,
DownloadError,InternalError. Predicate helpers
(auth_error?/rate_limit_error?/validation_error?/
network_error?/retryable?) for users who prefer a single
rescue PoliPage::Error => eclause. PoliPage::ErrorCodesmodule with the 21 known API code constants.- Auto retry on 5xx, 429, network errors, and timeouts. Exponential
backoff with jitter in[0.5, 1.5); honoursRetry-After(integer
seconds or HTTP-date), capped at 30 s. - Auto-generated
Idempotency-Key(UUID v4) on every POST; override
via per-callidempotency_key:kwarg. - Observability hooks:
on_retry:(receivesPoliPage::RetryEvent)
andon_error:(receives thePoliPage::Errordirectly). Hook
exceptions never break the request. - Frozen
Data.definevalue objects for inputs and responses:
PreviewResult,DocumentDescriptor,DocumentPreviewResult,
Thumbnail,ProjectModeInput,InlineModeInput,ThumbnailOptions,
RetryEvent. PageFormat::FORMATSandOrientation::ORIENTATIONS— frozen
Sets of valid strings with.valid?predicates.- Zero runtime dependencies — stdlib
Net::HTTP,JSON,URI,
SecureRandom,Loggeronly. - RBS signatures under
sig/for the public surface; checked via
bundle exec steep checkandbundle exec rbs validate. - YARD
@exampleblocks on every public method. - CI matrix: Ruby 3.2 / 3.3 / 3.4 on Ubuntu, plus one job each on
macOS and Windows with 3.4. RuboCop + Steep + RSpec + bundler-audit- gem build + install smoke.
Requirements
Ruby >= 3.2.