atlas_rb 1.13.0 → 1.13.2

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: c55fceb9d85a211c8e28903ae67f1b8b98a9114c8ab403c63af68721bef76df4
4
- data.tar.gz: 2b0684c399abf35c57bb6aac6def417f6996126b5afec576295d5d57cd5f72d2
3
+ metadata.gz: ee82f1db7ce18ffe409251ea5a22e0d8692d06d27feb2563ffaeeb8ebb3ac808
4
+ data.tar.gz: 448a08729406f6565e33fb42d317f3a52f4ccbe252381cea05717b473022aa69
5
5
  SHA512:
6
- metadata.gz: 46728839d509e41136a4a87f774c8f343055b0fd219d45e04732c6ef95ba635c5f13715e52b7f6dfd700ffe149e59debce03b77bf748e2c03b94f837540d24ff
7
- data.tar.gz: 3bcd0432f0eab0d5bba7d0f7e8da7d1f29b50a083631cfe357c00eaf1d6403ac526dcb9c3ca6ecd68d26b4459d64d7407aa3a2b926bf9585f433e316369cdcbc
6
+ metadata.gz: 709a6b7987e43637465f30345224a52792e936383f146c0a70311dce3484d3b4bd129c54bc84051c3047778871d8692bdd26e132557cffef1e87af609de14b65
7
+ data.tar.gz: 409ee2cfd24bae4d5b2bb89b9cdfd1eafc50c011f6f9c0842151d7c36ff09f53f19a61f9ffcab19c53e1beffe62bf179be21e106b3f813efee2af7dbca521a8d
data/.version CHANGED
@@ -1 +1 @@
1
- 1.13.0
1
+ 1.13.2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.13.2
4
+
5
+ ### Documentation — point `children` callers at the batch resolver
6
+
7
+ `Collection.children` and `Community.children` answer noids only, and nothing
8
+ on either method said how to turn those noids into something renderable. The
9
+ obvious reading — `find` per noid — costs a round-trip per child. Both now
10
+ point at {AtlasRb::Resource.find_many} for one-call resolution, and at
11
+ {AtlasRb::Resource.descendant_works} for a whole subtree.
12
+
13
+ No behaviour change.
14
+
15
+ ## 1.13.1
16
+
17
+ ### Fixed — `Maintenance.read` could not name an acting principal
18
+
19
+ `AtlasRb::Maintenance.read` took no `nuid:`, unlike every other read binding,
20
+ so on the relay-signing path it had no NUID to sign into the assertion `sub`
21
+ and raised `ConfigurationError`. It worked only in BYO-JWT mode or when the
22
+ host configured `AtlasRb.config.default_nuid`. It now takes `nuid:` and
23
+ `on_behalf_of:` like its neighbours.
24
+
25
+ ```ruby
26
+ AtlasRb::Maintenance.read(nuid: current_user.nuid)
27
+ ```
28
+
29
+ `.write` is unchanged — it runs on the system connection, which deliberately
30
+ never consults ambient identity.
31
+
3
32
  ## 1.13.0
4
33
 
5
34
  ### Added — maintenance mode no longer passes through silently
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- atlas_rb (1.13.0)
4
+ atlas_rb (1.13.2)
5
5
  faraday (~> 2.7)
6
6
  faraday-follow_redirects (~> 0.3.0)
7
7
  faraday-multipart (~> 1)
data/README.md CHANGED
@@ -523,7 +523,7 @@ Read the flag to render a banner before a caller trips it. The read is answered
523
523
  even while the window is open, so a client can always see the flag it honours:
524
524
 
525
525
  ```ruby
526
- window = AtlasRb::Maintenance.read
526
+ window = AtlasRb::Maintenance.read(nuid: current_user.nuid)
527
527
  window["read_only"] # => true
528
528
  window["source"] # => "deploy" / "operator"
529
529
  window["message"] # => "Scheduled maintenance until 10:00"
@@ -190,6 +190,12 @@ module AtlasRb
190
190
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
191
191
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
192
192
  # omitted.
193
+ # `children` answers noids only. To render them, resolve the whole list in
194
+ # one call with {AtlasRb::Resource.find_many}, which returns a
195
+ # title/thumbnail digest per id — calling `find` per noid costs a
196
+ # round-trip per child. For a whole subtree flattened to Works, use
197
+ # {AtlasRb::Resource.descendant_works}.
198
+ #
193
199
  # @return [Array<String>] child noids from `GET /collections/<id>/children`.
194
200
  #
195
201
  # @example
@@ -169,6 +169,12 @@ module AtlasRb
169
169
  # @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
170
170
  # header. Falls through to {AtlasRb.config}.default_on_behalf_of when
171
171
  # omitted.
172
+ # `children` answers noids only. To render them, resolve the whole list in
173
+ # one call with {AtlasRb::Resource.find_many}, which returns a
174
+ # title/thumbnail digest per id — calling `find` per noid costs a
175
+ # round-trip per child. For a whole subtree flattened to Works, use
176
+ # {AtlasRb::Resource.descendant_works}.
177
+ #
172
178
  # @return [Array<String>] child noids from `GET /communities/<id>/children`.
173
179
  #
174
180
  # @example
@@ -33,11 +33,18 @@ module AtlasRb
33
33
  # Cheap and safe to poll behind a short-TTL cache; Cerberus renders its
34
34
  # banner and its client-side write gate from this.
35
35
  #
36
+ # @param nuid [String, nil] the acting NUID, signed into the assertion `sub`
37
+ # on the relay path. Optional only in BYO-JWT mode or when the host
38
+ # configures {AtlasRb.config#default_nuid}; the read sits behind Atlas's
39
+ # authenticated read floor, so it needs a principal like any other read.
40
+ # @param on_behalf_of [String, nil] optional NUID carried as a signed `obo`
41
+ # claim.
36
42
  # @return [AtlasRb::Mash] `read_only` (Boolean), `source`
37
43
  # (`"operator"` / `"deploy"` / nil), `since` (ISO-8601 or nil), `message`
38
44
  # (String or nil), and `retry_after` (Integer seconds).
39
- def self.read
40
- AtlasRb::Mash.new(JSON.parse(connection({}).get("/maintenance").body))
45
+ def self.read(nuid: nil, on_behalf_of: nil)
46
+ response = connection({}, nuid, on_behalf_of: on_behalf_of).get("/maintenance")
47
+ AtlasRb::Mash.new(JSON.parse(response.body))
41
48
  end
42
49
 
43
50
  # Open or close the window (`PUT /maintenance`). System-gated in Atlas.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atlas_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 1.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cliff
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-08-25 00:00:00.000000000 Z
11
+ date: 2026-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday