atlas_rb 0.0.89 → 0.0.91
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/Gemfile.lock +1 -1
- data/lib/atlas_rb/collection.rb +35 -0
- data/lib/atlas_rb/community.rb +35 -0
- data/lib/atlas_rb/work.rb +35 -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: aa8cb5bbcea60e8d4d85a3a8f3f71ec7e798a811221a53292f9481ab844f6047
|
|
4
|
+
data.tar.gz: 9d72d547fe715ba4c9cf168652b61606b3354ab1a7d929e221d9d7691be01db9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 951c36792f8fa9c3f767da1bea737df2165211402ca8c22577925c96c0af81bdaa24cdf77343d6d515625627550a5cebb4e02267e59e0e54ce2cb391e9000e52
|
|
7
|
+
data.tar.gz: 19e89a98c99c0819bcd3558ef27131c75a2510c57f318c9fe596a82b18abe866f24b1b69610a417f7d47b456de4dd275c88338bbacd43be8d3114e8993237582
|
data/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.91
|
data/Gemfile.lock
CHANGED
data/lib/atlas_rb/collection.rb
CHANGED
|
@@ -60,6 +60,41 @@ module AtlasRb
|
|
|
60
60
|
connection({}).delete(ROUTE + id)
|
|
61
61
|
end
|
|
62
62
|
|
|
63
|
+
# Tombstone (withdraw) a Collection.
|
|
64
|
+
#
|
|
65
|
+
# The Collection remains in Atlas storage but is marked as withdrawn:
|
|
66
|
+
# search and show pages return a withdrawn stub for every user. Atlas
|
|
67
|
+
# rejects the request with `422 has_live_children` if the Collection
|
|
68
|
+
# still has live (non-tombstoned) Works.
|
|
69
|
+
#
|
|
70
|
+
# @param id [String] the Collection ID.
|
|
71
|
+
# @param nuid [String] the acting user's NUID, stamped on the resource
|
|
72
|
+
# as `tombstoned_by` for audit purposes.
|
|
73
|
+
# @return [Faraday::Response] the raw response. `200`/`204` on success;
|
|
74
|
+
# `422` with `{"code":"has_live_children"}` if the Collection is not empty.
|
|
75
|
+
#
|
|
76
|
+
# @example
|
|
77
|
+
# AtlasRb::Collection.tombstone("col-456", nuid: "000000002")
|
|
78
|
+
def self.tombstone(id, nuid:)
|
|
79
|
+
connection({}, nuid).post(ROUTE + id + '/tombstone')
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Restore a previously tombstoned Collection.
|
|
83
|
+
#
|
|
84
|
+
# **Operator-only.** Restoration is intentionally not exposed in any
|
|
85
|
+
# end-user UI; call this from a Rails console session (or a future
|
|
86
|
+
# admin panel) when the library has decided an object should come back.
|
|
87
|
+
#
|
|
88
|
+
# @param id [String] the Collection ID.
|
|
89
|
+
# @param nuid [String] the acting user's NUID.
|
|
90
|
+
# @return [Faraday::Response] the raw response.
|
|
91
|
+
#
|
|
92
|
+
# @example Operator restoring from `bundle exec rails console`
|
|
93
|
+
# AtlasRb::Collection.restore("col-456", nuid: "000000002")
|
|
94
|
+
def self.restore(id, nuid:)
|
|
95
|
+
connection({}, nuid).post(ROUTE + id + '/restore')
|
|
96
|
+
end
|
|
97
|
+
|
|
63
98
|
# List the Works in a Collection.
|
|
64
99
|
#
|
|
65
100
|
# The endpoint returns just the noids; resolve each through
|
data/lib/atlas_rb/community.rb
CHANGED
|
@@ -64,6 +64,41 @@ module AtlasRb
|
|
|
64
64
|
connection({}).delete(ROUTE + id)
|
|
65
65
|
end
|
|
66
66
|
|
|
67
|
+
# Tombstone (withdraw) a Community.
|
|
68
|
+
#
|
|
69
|
+
# The Community remains in Atlas storage but is marked as withdrawn:
|
|
70
|
+
# search and show pages return a withdrawn stub for every user. Atlas
|
|
71
|
+
# rejects the request with `422 has_live_children` if the Community
|
|
72
|
+
# still has live (non-tombstoned) members.
|
|
73
|
+
#
|
|
74
|
+
# @param id [String] the Community ID.
|
|
75
|
+
# @param nuid [String] the acting user's NUID, stamped on the resource
|
|
76
|
+
# as `tombstoned_by` for audit purposes.
|
|
77
|
+
# @return [Faraday::Response] the raw response. `200`/`204` on success;
|
|
78
|
+
# `422` with `{"code":"has_live_children"}` if the Community is not empty.
|
|
79
|
+
#
|
|
80
|
+
# @example
|
|
81
|
+
# AtlasRb::Community.tombstone("c-123", nuid: "000000002")
|
|
82
|
+
def self.tombstone(id, nuid:)
|
|
83
|
+
connection({}, nuid).post(ROUTE + id + '/tombstone')
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Restore a previously tombstoned Community.
|
|
87
|
+
#
|
|
88
|
+
# **Operator-only.** Restoration is intentionally not exposed in any
|
|
89
|
+
# end-user UI; call this from a Rails console session (or a future
|
|
90
|
+
# admin panel) when the library has decided an object should come back.
|
|
91
|
+
#
|
|
92
|
+
# @param id [String] the Community ID.
|
|
93
|
+
# @param nuid [String] the acting user's NUID.
|
|
94
|
+
# @return [Faraday::Response] the raw response.
|
|
95
|
+
#
|
|
96
|
+
# @example Operator restoring from `bundle exec rails console`
|
|
97
|
+
# AtlasRb::Community.restore("c-123", nuid: "000000002")
|
|
98
|
+
def self.restore(id, nuid:)
|
|
99
|
+
connection({}, nuid).post(ROUTE + id + '/restore')
|
|
100
|
+
end
|
|
101
|
+
|
|
67
102
|
# List the immediate children (sub-Communities and Collections) of a Community.
|
|
68
103
|
#
|
|
69
104
|
# The endpoint returns just the noids; resolve each through
|
data/lib/atlas_rb/work.rb
CHANGED
|
@@ -63,6 +63,41 @@ module AtlasRb
|
|
|
63
63
|
connection({}).delete(ROUTE + id)
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
+
# Tombstone (withdraw) a Work.
|
|
67
|
+
#
|
|
68
|
+
# The Work remains in Atlas storage along with its FileSets and Blobs,
|
|
69
|
+
# but is marked as withdrawn: search and show pages return a withdrawn
|
|
70
|
+
# stub for every user. Unlike Communities and Collections, Works are
|
|
71
|
+
# always tombstoneable regardless of how many files they hold — the
|
|
72
|
+
# FileSets and Blobs ride along.
|
|
73
|
+
#
|
|
74
|
+
# @param id [String] the Work ID.
|
|
75
|
+
# @param nuid [String] the acting user's NUID, stamped on the resource
|
|
76
|
+
# as `tombstoned_by` for audit purposes.
|
|
77
|
+
# @return [Faraday::Response] the raw response.
|
|
78
|
+
#
|
|
79
|
+
# @example
|
|
80
|
+
# AtlasRb::Work.tombstone("w-789", nuid: "000000002")
|
|
81
|
+
def self.tombstone(id, nuid:)
|
|
82
|
+
connection({}, nuid).post(ROUTE + id + '/tombstone')
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Restore a previously tombstoned Work.
|
|
86
|
+
#
|
|
87
|
+
# **Operator-only.** Restoration is intentionally not exposed in any
|
|
88
|
+
# end-user UI; call this from a Rails console session (or a future
|
|
89
|
+
# admin panel) when the library has decided an object should come back.
|
|
90
|
+
#
|
|
91
|
+
# @param id [String] the Work ID.
|
|
92
|
+
# @param nuid [String] the acting user's NUID.
|
|
93
|
+
# @return [Faraday::Response] the raw response.
|
|
94
|
+
#
|
|
95
|
+
# @example Operator restoring from `bundle exec rails console`
|
|
96
|
+
# AtlasRb::Work.restore("w-789", nuid: "000000002")
|
|
97
|
+
def self.restore(id, nuid:)
|
|
98
|
+
connection({}, nuid).post(ROUTE + id + '/restore')
|
|
99
|
+
end
|
|
100
|
+
|
|
66
101
|
# Replace a Work's metadata by uploading a MODS XML document.
|
|
67
102
|
#
|
|
68
103
|
# @param id [String] the Work ID.
|
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: 0.0.
|
|
4
|
+
version: 0.0.91
|
|
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-05-
|
|
11
|
+
date: 2026-05-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|