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 +4 -4
- data/CHANGELOG.md +16 -1
- data/lib/digiwin_dsp/configuration.rb +5 -5
- data/lib/digiwin_dsp/serializers/base.rb +3 -1
- data/lib/digiwin_dsp/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c0fd438c3029652103006f9fbb4b69c21abb7d699fb9e77234822e939660d710
|
|
4
|
+
data.tar.gz: 2b823c5afdb2452d18e2c22f9ad2111f1f0df5ab84862a400ba63a80b6c30bd2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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
|
|
20
|
-
@api_secret = ENV
|
|
21
|
-
@platform_id = ENV
|
|
22
|
-
@environment = ENV.fetch("DIGIWIN_DSP_ENV"
|
|
23
|
-
@base_url = ENV
|
|
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 =
|
|
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(", ")}"
|
data/lib/digiwin_dsp/version.rb
CHANGED