verifiabl-issuer 1.1.0 → 1.2.0

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: 369e3ae173f2115422efb4a81d7cd32b018e8cd15e291899e699d51048eeca4e
4
- data.tar.gz: b058e79cd9791e2f17966455129d8df40e9869b3f550ff05906ad5bae98aea5f
3
+ metadata.gz: 8cf3e66351726697654b88589061b28c82e190f467547b9bd073d6a5245f5050
4
+ data.tar.gz: 6d72b35c21f986926737005d094a8b0b9478fe8fdf371a7c76f21e8d1b2b11c1
5
5
  SHA512:
6
- metadata.gz: c2996561b125072f3d8a4fd9461d9164bf5689fc3773d3242e946d844351cb14fde3c0a39893ec50b74696b59cd6c880ce1917fedbe4a1da49d0f9642e11b22b
7
- data.tar.gz: 719979e79cbc3853cc52d002d45757197d41dfc33fcd398dd1b125c25153b2c07a7e56a9558149c51c5e8c6a45c14cb9722c8a11e301695ba9fc2c7026830594
6
+ metadata.gz: 1bf0de98a23c28007861c6b4d2a2453bb7559e5f8559454d588c5acb55c77a5fffc035042d303e01d0e73c86da122c93094e732388608b627d422e8c50312c00
7
+ data.tar.gz: b342d904e02ba1aaec79bda866ecbc4061fdc2427b9c58fc20e65733b064d980ccf91c0b723e9cbb84ecbb7eb28317e667fd0bac872ba808e879d7c35085c359
data/CHANGELOG.md CHANGED
@@ -2,7 +2,29 @@
2
2
 
3
3
  All notable changes to the Verifiabl Ruby SDK will be documented in this file.
4
4
 
5
- ## Unreleased
5
+ ## [1.2.0] - 2026-11-03
6
+
7
+ ### Added
8
+
9
+ - AU2 `leave_balances`: `annual`, `personal` and `long_service`, each with its
10
+ accrual this period, as `{amount:, unit:}` with `unit` from
11
+ `PayslipCodes::Australian::LEAVE_BALANCE_UNITS` (`hours`, `days` or
12
+ `weeks`). Needs an API that accepts AU2 leave balances.
13
+
14
+ ## [1.1.1] - 2026-10-28
15
+
16
+ ### Added
17
+
18
+ - Each released gem has a GitHub build-provenance attestation, made before
19
+ publication. The README's "Verifying a release" section shows how to check
20
+ a downloaded gem with `gh attestation verify`.
21
+
22
+ ### Changed
23
+
24
+ - The README section on `token_store:` now links to the documentation for
25
+ store choice and limits. It no longer recommends Solid Cache with Redis
26
+ and Memcached, and no longer tells Memcached users to set an
27
+ `error_handler:`.
6
28
 
7
29
  ## [1.1.0] - 2026-10-23
8
30
 
data/README.md CHANGED
@@ -34,10 +34,8 @@ issuer = Verifiabl::Issuer::Client.new(configuration)
34
34
 
35
35
  ### Share tokens between processes
36
36
 
37
- Each client fetches an OAuth token and keeps it in memory, so each process fetches its own token.
38
- If you run many worker processes, for example an autoscaled job queue, set `token_store:` to a
39
- cache that the processes share. In a Rails application, use `Rails.cache` if Redis, Memcached or
40
- Solid Cache stores its data:
37
+ Each process fetches its own OAuth token. To share one token between worker processes, set
38
+ `token_store:` to a cache that the processes share:
41
39
 
42
40
  ```ruby
43
41
  configuration = Verifiabl::Issuer::Configuration.new(
@@ -47,48 +45,11 @@ configuration = Verifiabl::Issuer::Configuration.new(
47
45
  )
48
46
  ```
49
47
 
50
- You can also use a different Active Support cache store, or any object with `read(key)` and
51
- `write(key, value, expires_in:, unless_exist: false)`. With `unless_exist: true`, `write` must
52
- write only if the key is absent, and return `false` if the key exists.
53
-
54
- The client encrypts each token with a key derived from the client secret before it writes the
55
- token. It names the entry with a keyed hash. The cache never holds a usable token or the client
56
- credentials.
57
-
58
- Each process uses its in-memory token. It reads the store only when that token is due for
59
- renewal, one minute before it expires. When the stored token is missing or due, one process
60
- claims the fetch and fetches a new token. The claim is an `unless_exist: true` write that lasts
61
- for 10 seconds, the limit of the token request. While that process fetches:
62
-
63
- - A process with a valid token continues to use it until the new token is in the store.
64
- - A process with no valid token polls the store for the new token. The interval starts at 0.1
65
- seconds and doubles to a maximum of one second. If the claim expires, that process claims the
66
- fetch.
67
-
68
- A fleet that renews together, or starts together after a quiet period, therefore fetches one
69
- token. When the API rejects a token, the client fetches a new token immediately. If the client
70
- fetched the rejected token less than one minute before, it returns the 401 instead.
71
-
72
- Limits:
73
-
74
- - A store failure costs a token fetch, not a registration. `Rails.cache` catches backend errors
75
- and sends them to the Rails error reporter and logger, so `on_error` does not get them. To get
76
- them in `on_error`, as an event with `token_store:` (`:read`, `:write` or `:claim`) and
77
- `error:`, give the SDK a different store with an `error_handler:` that raises the exception
78
- again. Do not make `Rails.cache` raise.
79
- - If the process that holds the claim stops during its fetch, the processes with no token wait
80
- until the claim expires, at most 10 seconds.
81
- - The SDK cannot interrupt a store call. It checks the request's time budget after each call,
82
- and store calls run while the client holds its token lock. Keep the store timeouts short. The
83
- Rails Redis store default is one second.
84
- - The claim is best effort. If the store has no atomic `unless_exist`, such as a file store,
85
- several processes can fetch. A store that is local to each process, such as a memory store,
86
- shares nothing.
87
- - Stored expiry times are absolute. Keep worker clocks within one minute of each other.
88
-
89
- A store event has only `token_store:` and `error:`. A request failure has `method:`, `url:`,
90
- `path:` and `elapsed_ms:`. Check the kind of event before you read its fields. The SDK ignores
91
- exceptions from `on_error`, so if your handler fails on a store event, the report is lost:
48
+ Not every store stops several processes from fetching at once. Before you choose a store, read
49
+ [Share tokens between worker processes](https://docs.verifiabl.io/issuer-sdk?lang=ruby#share-tokens-between-worker-processes).
50
+
51
+ If the store raises an error, `on_error` gets an event with only `token_store:` and `error:`.
52
+ Check the kind of event before you read its fields:
92
53
 
93
54
  ```ruby
94
55
  on_error = lambda do |event|
@@ -158,6 +119,27 @@ shutdown, thread safety, and post-fork recreation.
158
119
 
159
120
  Report issues at [github.com/Verifiabl/verifiabl-ruby](https://github.com/Verifiabl/verifiabl-ruby/issues).
160
121
 
122
+ ## Verifying a release
123
+
124
+ The release workflow attests each gem's build provenance before publishing it, and RubyGems.org
125
+ serves the published bytes unchanged. Verify a gem with the [GitHub CLI](https://cli.github.com/).
126
+ Attestations are signed with Sigstore, recorded in its public transparency log, and stored with the
127
+ `Verifiabl/verifiabl-ruby` repository; they do not expire with workflow artifacts.
128
+
129
+ ```sh
130
+ VERSION='<release version, for example 0.1.0-rc.1>'
131
+ RUBYGEMS_VERSION="$(ruby -rrubygems -e 'puts Gem::Version.new(ARGV.fetch(0))' "$VERSION")"
132
+ gem fetch verifiabl-issuer --version "$RUBYGEMS_VERSION"
133
+ gh attestation verify "verifiabl-issuer-$RUBYGEMS_VERSION.gem" \
134
+ --repo Verifiabl/verifiabl-ruby \
135
+ --signer-workflow Verifiabl/verifiabl-ruby/.github/workflows/release.yml \
136
+ --source-ref "refs/tags/issuer/v$VERSION" \
137
+ --deny-self-hosted-runners
138
+ ```
139
+
140
+ Release tags use the SemVer version; RubyGems normalizes prereleases, so `0.1.0-rc.1` is published
141
+ as `0.1.0.pre.rc.1`.
142
+
161
143
  ## License
162
144
 
163
145
  MIT. See [LICENSE](https://github.com/Verifiabl/verifiabl-ruby/blob/main/gems/verifiabl-issuer/LICENSE).
@@ -58,6 +58,32 @@
58
58
  }
59
59
  ],
60
60
  "reimbursements": "decimal",
61
+ "leave_balances": {
62
+ "annual": {
63
+ "amount": "decimal",
64
+ "unit": null
65
+ },
66
+ "annual_accrued_this_period": {
67
+ "amount": "decimal",
68
+ "unit": null
69
+ },
70
+ "personal": {
71
+ "amount": "decimal",
72
+ "unit": null
73
+ },
74
+ "personal_accrued_this_period": {
75
+ "amount": "decimal",
76
+ "unit": null
77
+ },
78
+ "long_service": {
79
+ "amount": "decimal",
80
+ "unit": null
81
+ },
82
+ "long_service_accrued_this_period": {
83
+ "amount": "decimal",
84
+ "unit": null
85
+ }
86
+ },
61
87
  "ytd": {
62
88
  "taxable": "decimal",
63
89
  "super": "decimal",
@@ -44,6 +44,10 @@ module Verifiabl
44
44
  BASE_RATE_PERIODS = %w[
45
45
  hour day week fortnight month year
46
46
  ].map!(&:freeze).freeze
47
+
48
+ LEAVE_BALANCE_UNITS = %w[
49
+ hours days weeks
50
+ ].map!(&:freeze).freeze
47
51
  end
48
52
 
49
53
  module NewZealand
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Verifiabl
4
4
  module Issuer
5
- VERSION = "1.1.0"
5
+ VERSION = "1.2.0"
6
6
  end
7
7
  end
@@ -15,6 +15,7 @@ module Verifiabl
15
15
  ETP_TYPES: Array[String]
16
16
  ETP_COMPONENTS: Array[String]
17
17
  PAY_FREQUENCIES: Array[String]
18
+ LEAVE_BALANCE_UNITS: Array[String]
18
19
  end
19
20
 
20
21
  module NewZealand
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: verifiabl-issuer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Verifiabl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-23 00:00:00.000000000 Z
11
+ date: 2026-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64