cin7_core_api 0.3.0 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bebb9103f8de0eff128f3225cb97eeacca8137b6501f09051858053e79443cf6
4
- data.tar.gz: 27a765beb403a6279b6d74d25952688b304252e3308b22b47ada21f46c920401
3
+ metadata.gz: f21c5a07972b89e6cd344f6db539ce6dee6cdd5734dc69bff3a9c1f410f0ec4a
4
+ data.tar.gz: 5ab77af8749ea07602cbe26bc0fee753f20e2f7145f83e9c6ff009399f9c79f3
5
5
  SHA512:
6
- metadata.gz: d007332b45d5a02e5810eabd256b24c77156e34fd737c3d68cf671608a9a149978380b21c9398be56d72430fa0ad3beaf28d56015c404b564a3bb838d98f1cb1
7
- data.tar.gz: 3be8c44fc59d964e1fea08eede44326e6a38eff0885f7426c11986f23a383901c6215181b1fcca04f17306c667e2ce300336661e24e72e4d3a55d3f93529d5aa
6
+ metadata.gz: c7a38afa25859861feb348204718c98a8711a196461f73f9f7e9e14208dddac1a5b66f786b6bfdd8a1f77dd9b7e15bdc5c03a7d2a00f76ca03e74cc33c0951a7
7
+ data.tar.gz: ce282fe173d4d3c43e0be08ad1efd497d19b0115c9420a4f9289a12e0093566c0bb34209888335493b69b149f2e10b127840d77b7476de5301844a6f9fb07eab
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.1] - 2026-10-20
4
+
5
+ - Name the error Faraday wraps in transport failure messages, such as `Faraday::ConnectionFailed caused by Zlib::DataError` for a corrupt gzip response under faraday-net_http 3.5 and `Faraday::TimeoutError caused by Net::ReadTimeout` for a read timeout on any adapter version.
6
+
3
7
  ## [0.3.0] - 2026-10-02
4
8
 
5
9
  - Add explicit credit-note creation/undo and Advanced Sale fulfilment, pick, pack and shipment resources with readback and distinct POST/PUT semantics.
data/README.md CHANGED
@@ -289,15 +289,15 @@ Stage intended new source/spec files before using the tracked-file lint command.
289
289
 
290
290
  ## Releasing
291
291
 
292
- Publishing a GitHub release triggers `.github/workflows/release.yml`. It requires the tagged commit to be part of `main`, verifies the tag matches `v<VERSION>`, runs tests and lint, builds the gem, and publishes that exact version to RubyGems. Draft releases and ordinary branch pushes do not publish gems.
292
+ Publishing a GitHub release triggers `.github/workflows/release.yml`. Its `test` job runs tests and lint without publishing rights. The `publish` job then requires the tagged commit to be part of `main`, verifies the tag matches `v<VERSION>`, builds the gem with plain `gem build`, and publishes that exact version to RubyGems. `publish` holds the RubyGems token, so it never installs gems or runs Bundler; keep it that way. It waits for a required reviewer to approve the `release` environment, which accepts only `v*` tags. Draft releases and ordinary branch pushes do not publish gems.
293
293
 
294
- One-time setup: in the `cin7_core_api` gem's RubyGems **Trusted publishers** settings, register repository owner `PostCo`, repository `cin7_core_api`, workflow filename `release.yml`, and environment `release`. Use the same `release` environment in GitHub. [RubyGems Trusted Publishing](https://guides.rubygems.org/trusted-publishing/) uses GitHub OIDC, so no long-lived API key or interactive MFA code is needed in CI. Signing in locally does not configure this trust relationship.
294
+ One-time setup: in the `cin7_core_api` gem's RubyGems **Trusted publishers** settings, register repository owner `PostCo`, repository `cin7_core_api`, workflow filename `release.yml`, and environment `release`. Use the same `release` environment in GitHub, with a required reviewer and a `v*` tag deployment rule. [RubyGems Trusted Publishing](https://guides.rubygems.org/trusted-publishing/) uses GitHub OIDC, so no long-lived API key or interactive MFA code is needed in CI. Signing in locally does not configure this trust relationship.
295
295
 
296
296
  For each new version:
297
297
 
298
298
  1. Update `lib/cin7_core_api/version.rb` and `CHANGELOG.md`, review the PR, and merge it into `main`.
299
299
  2. Create and publish a GitHub release at that merged commit, with a tag such as `v0.2.1` matching the gem version.
300
- 3. Check the **Publish gem** workflow and verify the version is available on RubyGems before updating application dependencies.
300
+ 3. Approve the **Publish gem** workflow's `release` deployment once `test` passes, then verify the version is available on RubyGems before updating application dependencies.
301
301
 
302
302
  The manually published `0.2.0` already exists. Do not republish it; this workflow is for subsequent versions. A failed attempt to publish an existing version does not replace that version. If a workflow is rerun after a partial success, check RubyGems first.
303
303
 
@@ -81,8 +81,10 @@ module Cin7CoreAPI
81
81
  request.params.update(params)
82
82
  end
83
83
  rescue Faraday::Error, Zlib::Error => error
84
+ wrapped = error.wrapped_exception if error.is_a?(Faraday::Error)
85
+ failure = [error.class, wrapped&.class].compact.join(" caused by ")
84
86
  # Faraday exceptions can retain the entire authenticated request in their cause.
85
- raise TransportError.new("CIN7 Core transport failed (#{error.class})", ambiguous: write, **context), cause: nil
87
+ raise TransportError.new("CIN7 Core transport failed (#{failure})", ambiguous: write, **context), cause: nil
86
88
  end
87
89
 
88
90
  def normalized_headers(headers)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cin7CoreAPI
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cin7_core_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - PostCo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-01 00:00:00.000000000 Z
11
+ date: 2026-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday