digiwin_dsp 0.1.0 → 0.1.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: dfd6bd54cc74a0a92198baf85f66c940882a9ef23e9f8c957fcf1ce10e137725
4
- data.tar.gz: 07f3727ce554845d88f989a89206ec814ce83e8ddbf3c3f9587f4ca60c3b6131
3
+ metadata.gz: c0fd438c3029652103006f9fbb4b69c21abb7d699fb9e77234822e939660d710
4
+ data.tar.gz: 2b823c5afdb2452d18e2c22f9ad2111f1f0df5ab84862a400ba63a80b6c30bd2
5
5
  SHA512:
6
- metadata.gz: 21846a4c401f66c10df4f2fee23af8291c8c9819b64393285333762ddee19541fecc799dcc446f7e7d6b30d7529046ddbe221979dc043e3455aef141878d539e
7
- data.tar.gz: dcd9694dd636c648a5e973980542a99eb476f421bb18d082934370749ca7d61a2473146183a54eda64d3d37d2e587f7f4147371eeccecb39e839c0125ddc6543
6
+ metadata.gz: 9695c0dea30adeced40a3b118ce95162dbd6cbcf0498ce30e82cd1d663107ae96a0dc0b57b54008eb7815d008a403efa1b73a915652d7d7ef488382982890ad5
7
+ data.tar.gz: 982922896540b5f6e5b2f7cbf2cdda02529bb4bbf89ee53005ea5030f0522b74407da2115547054b024a5dfae7caf175c46fc141e8006506e4f965ffdf8824fb
data/CHANGELOG.md CHANGED
@@ -6,9 +6,23 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.1.1] - 2026-05-21
10
+
9
11
  ### Added
10
12
 
11
13
  - Release workflow (`.github/workflows/release.yml`): tag push (`v*`) triggers RubyGems publish via OIDC Trusted Publishing, runs the full spec suite as a guard, and updates the GitHub Release with the built `.gem` artifact.
14
+ - Release workflow also dual-publishes to GitHub Packages (`https://rubygems.pkg.github.com/7a6163`) using the auto-provided `GITHUB_TOKEN` — no extra secret required.
15
+
16
+ ### Changed
17
+
18
+ - `actions/checkout` bumped v4 → v6 (Node 24 runtime)
19
+ - `codecov/codecov-action` bumped v4 → v6 (Node 24 runtime)
20
+ - Rubyfast perf hints applied: `ENV["KEY"]` over `ENV.fetch("KEY", nil)` for nil-default lookups, explicit `times` loop over `each_with_index.flat_map` in `Serializers::Base#validate!`
21
+ - Disabled rubocop `Style/FetchEnvVar` and `Style/RedundantFetchBlock` (conflict with rubyfast's perf-grounded preferences)
22
+
23
+ ### Fixed
24
+
25
+ - Pin `parallel < 2.0` in dev deps so the Ruby 3.2 CI row can still resolve rubocop (`parallel 2.x` requires Ruby ≥ 3.3)
12
26
 
13
27
  ## [0.1.0] - 2026-05-21
14
28
 
@@ -47,5 +61,6 @@ Initial release. Covers the four 自有官網模組 endpoints under `/v1/SalesOr
47
61
  - The gem is **synchronous on purpose**. Callers wrap requests in their own background job runner (e.g. ActiveJob) when needed.
48
62
  - Idempotency: clients can send `X-Idempotency-Key` via the `idempotency_key:` kwarg. DSP also dedupes server-side by `form_no + platform_id`.
49
63
 
50
- [Unreleased]: https://github.com/7a6163/digiwin_dsp/compare/v0.1.0...HEAD
64
+ [Unreleased]: https://github.com/7a6163/digiwin_dsp/compare/v0.1.1...HEAD
65
+ [0.1.1]: https://github.com/7a6163/digiwin_dsp/compare/v0.1.0...v0.1.1
51
66
  [0.1.0]: https://github.com/7a6163/digiwin_dsp/releases/tag/v0.1.0
@@ -16,11 +16,11 @@ module DigiwinDsp
16
16
  attr_writer :base_url
17
17
 
18
18
  def initialize
19
- @api_key = ENV.fetch("DIGIWIN_DSP_API_KEY", nil)
20
- @api_secret = ENV.fetch("DIGIWIN_DSP_API_SECRET", nil)
21
- @platform_id = ENV.fetch("DIGIWIN_DSP_PLATFORM_ID", nil)
22
- @environment = ENV.fetch("DIGIWIN_DSP_ENV", "sandbox").to_sym
23
- @base_url = ENV.fetch("DIGIWIN_DSP_BASE_URL", nil)
19
+ @api_key = ENV["DIGIWIN_DSP_API_KEY"]
20
+ @api_secret = ENV["DIGIWIN_DSP_API_SECRET"]
21
+ @platform_id = ENV["DIGIWIN_DSP_PLATFORM_ID"]
22
+ @environment = ENV.fetch("DIGIWIN_DSP_ENV") { "sandbox" }.to_sym
23
+ @base_url = ENV["DIGIWIN_DSP_BASE_URL"]
24
24
  @timeout = DEFAULT_TIMEOUT
25
25
  @open_timeout = DEFAULT_OPEN_TIMEOUT
26
26
  @logger = Logger.new(IO::NULL)
@@ -19,7 +19,9 @@ module DigiwinDsp
19
19
  end
20
20
 
21
21
  def validate!(records)
22
- problems = records.each_with_index.flat_map { |record, index| missing_fields(record, index, records.size) }
22
+ problems = []
23
+ total = records.size
24
+ total.times { |i| problems.concat(missing_fields(records[i], i, total)) }
23
25
  return if problems.empty?
24
26
 
25
27
  raise ValidationError, "missing or empty required fields: #{problems.join(", ")}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DigiwinDsp
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: digiwin_dsp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zac