cgminer_api_client 0.4.0 → 0.4.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 +9 -0
- data/lib/cgminer_api_client/miner.rb +4 -1
- data/lib/cgminer_api_client/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: d045472d7098443d965f6bb948ad45aef2698f84e188f6b41769905dcccf6ce4
|
|
4
|
+
data.tar.gz: a3ac02b6c4b94d9a797a3fd501cb43f7f35ee421b4234af49b92a3fcc48c7832
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e75c9159055d5a5a0507b11e93f0f0a25512f83e2bebb0de9a9495aa7829b018b4c9a2da555d795f8a6d6372ea99b75ebc363bf84f5c9a3fd7d085a63e34b3d2
|
|
7
|
+
data.tar.gz: d112135f844f48772daac286dbf6f3d81224820a6cf91cc7039b9e56ef3164dc38e2357c0f48c9a4d484a40dd2cb9346f0ba8522a5094cbb027cf6356863d4b9
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.4.1] - 2026-09-22
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- `Miner` keeps parsing responses that repeat a key under json 3.0,
|
|
14
|
+
which rejects duplicate keys by default. The client now passes
|
|
15
|
+
`allow_duplicate_key: true`, preserving json 2.x's last-one-wins
|
|
16
|
+
behavior, so a miner whose firmware repeats a key no longer raises
|
|
17
|
+
`JSON::ParserError` mid-poll.
|
|
18
|
+
|
|
10
19
|
## [0.4.0] - 2026-04-25
|
|
11
20
|
|
|
12
21
|
### Added
|
|
@@ -129,7 +129,10 @@ module CgminerApiClient
|
|
|
129
129
|
response = repaired
|
|
130
130
|
end
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
# json 3.0 rejects duplicate keys by default; keep json 2.x's
|
|
133
|
+
# last-one-wins behavior since some cgminer forks repeat keys.
|
|
134
|
+
# Older json versions ignore the option.
|
|
135
|
+
data = JSON.parse(response, allow_duplicate_key: true)
|
|
133
136
|
|
|
134
137
|
if request[:command].to_s.match?('\+')
|
|
135
138
|
data.each_pair do |_command, response|
|