atlas_rb 1.19.0 → 1.20.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 +4 -4
- data/.version +1 -1
- data/CHANGELOG.md +19 -0
- data/Gemfile.lock +1 -1
- data/lib/atlas_rb/system.rb +22 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1ec8ebfc7fd51516a1d73d28bc426153f99a1d7d91c6b1b1bf80ffc965396b8f
|
|
4
|
+
data.tar.gz: 284df1abb1bef59118f44483e3ba2b3680daacd03717795417395ee095950f55
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e3fc55be0dde3a6d5ff4603284de7e7b2ed4e29c628afbab32d2026befbfc2cc93d4304e4a294043319c60d79a5f51f2e06cf0957a4ffd9e28af8ffc56f64e36
|
|
7
|
+
data.tar.gz: a8dced08d932a266c77d70cfaa90cf7d81c957efce818ce42c5a000508b48d6501ca449a1863f3a73017b2131692c6930bdcd53e282823f7957a43e5e30e38a9
|
data/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.20.0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.20.0
|
|
4
|
+
|
|
5
|
+
### Added — `System.release_embargoes`, recording lapsed embargoes
|
|
6
|
+
|
|
7
|
+
```ruby
|
|
8
|
+
AtlasRb::System.release_embargoes # => ["abc123"]
|
|
9
|
+
AtlasRb::System.release_embargoes(since: Date.new(2026, 9, 1))
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Binds `POST /embargoes/release`, which needs Atlas 0.6.208 or later. An embargo
|
|
13
|
+
lapsing is not a write, so nothing records it unless someone asks. Atlas writes
|
|
14
|
+
one `release_embargo` audit row per lapsed Work, dated to the start of the
|
|
15
|
+
release day in Eastern time, and returns the NOIDs that gained one.
|
|
16
|
+
|
|
17
|
+
Atlas runs no scheduler, so the consumer supplies the schedule; Cerberus calls
|
|
18
|
+
this nightly. A repeat call writes nothing, and Atlas looks back seven days by
|
|
19
|
+
default, so a missed night catches up on the next call. `since` widens that.
|
|
20
|
+
It is a write, so it raises `ReadOnlyModeError` during a maintenance window.
|
|
21
|
+
|
|
3
22
|
## 1.19.0
|
|
4
23
|
|
|
5
24
|
### Added — `Resource.search`, the catalog keyword search
|
data/Gemfile.lock
CHANGED
data/lib/atlas_rb/system.rb
CHANGED
|
@@ -54,5 +54,27 @@ module AtlasRb
|
|
|
54
54
|
response = system_connection.post("/resources/#{id}/reindex_subtree")
|
|
55
55
|
JSON.parse(response.body)["reindexed"]
|
|
56
56
|
end
|
|
57
|
+
|
|
58
|
+
# Record the embargoes that have lapsed. Atlas writes one `release_embargo`
|
|
59
|
+
# audit row per lapsed Work, dated to the start of the release day in
|
|
60
|
+
# Eastern time rather than to the call. Atlas runs no scheduler, so the
|
|
61
|
+
# consumer calls this on its own schedule — Cerberus nightly.
|
|
62
|
+
#
|
|
63
|
+
# Idempotent: a repeat call writes nothing. Atlas looks back seven days by
|
|
64
|
+
# default, so a missed night catches up on the next call.
|
|
65
|
+
#
|
|
66
|
+
# @param since [Date, nil] the earliest release date to consider, to widen
|
|
67
|
+
# the default seven-day window.
|
|
68
|
+
# @return [Array<String>] NOIDs of the Works that gained a row on this call.
|
|
69
|
+
# @raise [AtlasRb::ReadOnlyModeError] while a maintenance window is open.
|
|
70
|
+
#
|
|
71
|
+
# @example The nightly call
|
|
72
|
+
# AtlasRb::System.release_embargoes # => ["abc123"]
|
|
73
|
+
# @example Catch up after a long outage
|
|
74
|
+
# AtlasRb::System.release_embargoes(since: Date.new(2026, 9, 1))
|
|
75
|
+
def self.release_embargoes(since: nil)
|
|
76
|
+
path = since ? "/embargoes/release?since=#{since.iso8601}" : "/embargoes/release"
|
|
77
|
+
JSON.parse(system_connection.post(path).body)["released"]
|
|
78
|
+
end
|
|
57
79
|
end
|
|
58
80
|
end
|
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.
|
|
4
|
+
version: 1.20.0
|
|
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-09-
|
|
11
|
+
date: 2026-09-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|