atlas_rb 0.0.99 → 0.0.100

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: 4eca6ad0d27c37d1c2b6d367c620e981acef4c3dd39fcf7a888f05827438b8eb
4
- data.tar.gz: 4d20891f98883ffa158039515f6108f7e147c181da4adc146933b571063640c2
3
+ metadata.gz: a6446cf5f1b041885d75f8d42740e5e865b0bb6db3569ed1926c93c78893862a
4
+ data.tar.gz: dc02805c46b618cc9b2ed2c28e4679eb537ff3467e0b0a974977c1799e2c7056
5
5
  SHA512:
6
- metadata.gz: fe7aec013ecd78e381bef342e226e499a97b1c37b2120d912aec1636f64a2de4536182436407ebf920df254818054cf73f39046aa4848b93ff818af2a266d3fa
7
- data.tar.gz: 32b39e4905ea9463d9c6cce7aff994e9925fb8de1d11ce8a619ab0520a07d358657d8f23c90c4b8ae7d35aa1ad799a825457b6a1a5bdeeaad4472ad1ef6ad579
6
+ metadata.gz: df30f4678e31a4de0ca0ef7d2ea4967fe4b4c56d77aec8f133bba36399ce4838ca0b86ff715b4fa7d3e7c40fb9682feed00ff6f2e6c39aebd907605e5d1150d4
7
+ data.tar.gz: dff59d92028e8f5b15ef7b270ffd6b53771dcd20c64406706e0e4367c520bff1f7854e087b7da152247bec514aa542ba438c1848149cfd257d2085a9d637d769
data/.version CHANGED
@@ -1 +1 @@
1
- 0.0.99
1
+ 0.0.100
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- atlas_rb (0.0.99)
4
+ atlas_rb (0.0.100)
5
5
  faraday (~> 2.7)
6
6
  faraday-follow_redirects (~> 0.3.0)
7
7
  faraday-multipart (~> 1)
@@ -51,8 +51,8 @@ module AtlasRb
51
51
  result = AtlasRb::Mash.new(JSON.parse(connection({ parent_id: id }, nuid).post(ROUTE)&.body))["collection"]
52
52
  return result unless xml_path.present?
53
53
 
54
- update(result["id"], xml_path)
55
- find(result["id"])
54
+ update(result["id"], xml_path, nuid: nuid)
55
+ find(result["id"], nuid: nuid)
56
56
  end
57
57
 
58
58
  # Delete a Collection.
@@ -55,8 +55,8 @@ module AtlasRb
55
55
  result = AtlasRb::Mash.new(JSON.parse(connection({ parent_id: id }, nuid).post(ROUTE)&.body))["community"]
56
56
  return result unless xml_path.present?
57
57
 
58
- update(result["id"], xml_path)
59
- find(result["id"])
58
+ update(result["id"], xml_path, nuid: nuid)
59
+ find(result["id"], nuid: nuid)
60
60
  end
61
61
 
62
62
  # Delete a Community.
data/lib/atlas_rb/work.rb CHANGED
@@ -95,8 +95,8 @@ module AtlasRb
95
95
  ))["work"]
96
96
  return result unless xml_path.present?
97
97
 
98
- update(result["id"], xml_path)
99
- find(result["id"])
98
+ update(result["id"], xml_path, nuid: nuid)
99
+ find(result["id"], nuid: nuid)
100
100
  end
101
101
 
102
102
  # Delete a Work.
data/lib/atlas_rb.rb CHANGED
@@ -79,12 +79,17 @@ module AtlasRb
79
79
 
80
80
  # Reset the connected Atlas instance to a clean state.
81
81
  #
82
+ # @param nuid [String, nil] optional acting user's NUID, forwarded as the
83
+ # `User:` header. Required for cerberus-token requests; legacy bearer
84
+ # tokens still resolve without it. Atlas's `MaintenanceController#reset`
85
+ # runs through the standard `require_auth` filter, so under Atlas
86
+ # 0.6.12+ the header is needed for any cerberus-token caller.
82
87
  # @return [String, nil] the raw response body from `GET /reset`.
83
88
  #
84
89
  # @example
85
- # AtlasRb::Reset.clean
86
- def self.clean
87
- connection({}).get("/reset")&.body
90
+ # AtlasRb::Reset.clean(nuid: "000000000")
91
+ def self.clean(nuid: nil)
92
+ connection({}, nuid).get("/reset")&.body
88
93
  end
89
94
  end
90
95
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atlas_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.99
4
+ version: 0.0.100
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cliff