atlas_rb 1.29.6 → 1.29.8
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/.rubocop.yml +1 -1
- data/.version +1 -1
- data/CHANGELOG.md +26 -0
- data/Gemfile.lock +5 -5
- data/lib/atlas_rb/collection.rb +10 -6
- data/lib/atlas_rb/community.rb +10 -6
- data/lib/atlas_rb/compilation.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e016b99621f6333435a65b3e1b54cc6f39093c0670a2108acd3bd65dd3631802
|
|
4
|
+
data.tar.gz: d0414e258bd7585c011d47603ebf02ee130e15f475115e9f68a5c559293c87d5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 14318eb1682f816587172df5197d402bdd877c26e39c86c896f82d7bc78d46f243bf20d40aba6ea8592c26fb64c93fa7e9c05a1ed43f526b80f96ae278c4fab7
|
|
7
|
+
data.tar.gz: 0d7e9eb96b6c13b420cdfa68a15cadf0439a42386d7488ce611085b957ee6befaefbf8a531b648acd763f43276872f665223f74b4777634b8fe7fc9adb9b4fdf
|
data/.rubocop.yml
CHANGED
data/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.29.
|
|
1
|
+
1.29.8
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.29.8
|
|
4
|
+
|
|
5
|
+
### Changed — installs on Ruby 4
|
|
6
|
+
|
|
7
|
+
The `faraday-follow_redirects` dependency is now `~> 0.5`. Every release
|
|
8
|
+
before 0.5.0 declared `required_ruby_version < 4`, so no app that depended
|
|
9
|
+
on atlas_rb could bundle on Ruby 4. Release 0.5.0 drops that cap and
|
|
10
|
+
changes no behaviour. The gem's own Ruby floor stays at 3.2.
|
|
11
|
+
|
|
12
|
+
## 1.29.7
|
|
13
|
+
|
|
14
|
+
Needs Atlas 0.6.282 or later. An older Atlas still puts the rows under
|
|
15
|
+
`works`, so `results` is `nil` there.
|
|
16
|
+
|
|
17
|
+
### Changed — scoped search rows are under `results`
|
|
18
|
+
|
|
19
|
+
`Compilation.search`, `Collection.search` and `Community.search` return their
|
|
20
|
+
rows under `results`, not `works`. No code in the gem changed: it passes
|
|
21
|
+
Atlas's body through as a `Mash`, so only the documented shape moves.
|
|
22
|
+
|
|
23
|
+
`Collection.search` and `Community.search` also return the Collections
|
|
24
|
+
beneath the scope, as v1's `/api/v1/search/:id` did. Each Collection row has
|
|
25
|
+
the same shape as a Work row, and `resource_class` is `AtlasRb::Collection`.
|
|
26
|
+
The scope itself is never a row, and any `filters:` drops every Collection.
|
|
27
|
+
`Compilation.search` still returns Works only.
|
|
28
|
+
|
|
3
29
|
## 1.29.6
|
|
4
30
|
|
|
5
31
|
Needs an Atlas with the scoped search routes. An older Atlas answers `404`,
|
data/Gemfile.lock
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
atlas_rb (1.29.
|
|
4
|
+
atlas_rb (1.29.8)
|
|
5
5
|
faraday (~> 2.7)
|
|
6
|
-
faraday-follow_redirects (~> 0.
|
|
6
|
+
faraday-follow_redirects (~> 0.5)
|
|
7
7
|
faraday-multipart (~> 1)
|
|
8
8
|
faraday-net_http_persistent (~> 2.3)
|
|
9
9
|
faraday-retry (~> 2.4)
|
|
@@ -20,7 +20,7 @@ GEM
|
|
|
20
20
|
faraday-net_http (>= 2.0, < 3.6)
|
|
21
21
|
json
|
|
22
22
|
logger
|
|
23
|
-
faraday-follow_redirects (0.
|
|
23
|
+
faraday-follow_redirects (0.5.0)
|
|
24
24
|
faraday (>= 1, < 3)
|
|
25
25
|
faraday-multipart (1.2.0)
|
|
26
26
|
multipart-post (~> 2.0)
|
|
@@ -69,8 +69,8 @@ PLATFORMS
|
|
|
69
69
|
DEPENDENCIES
|
|
70
70
|
atlas_rb!
|
|
71
71
|
rake (~> 13.0)
|
|
72
|
-
rspec (~> 3.0)
|
|
72
|
+
rspec (~> 3.12, ~> 3.0)
|
|
73
73
|
yard (~> 0.9)
|
|
74
74
|
|
|
75
75
|
BUNDLED WITH
|
|
76
|
-
|
|
76
|
+
4.0.20
|
data/lib/atlas_rb/collection.rb
CHANGED
|
@@ -196,11 +196,15 @@ module AtlasRb
|
|
|
196
196
|
))
|
|
197
197
|
end
|
|
198
198
|
|
|
199
|
-
# Search the Works beneath a Collection, at any depth, with
|
|
200
|
-
# counts.
|
|
199
|
+
# Search the Works and Collections beneath a Collection, at any depth, with
|
|
200
|
+
# filters and facet counts.
|
|
201
201
|
#
|
|
202
|
-
# Wraps `GET /collections/<id>/search`. The rows are the
|
|
203
|
-
# {Resource.descendant_works} returns,
|
|
202
|
+
# Wraps `GET /collections/<id>/search`. The rows are the Work digests
|
|
203
|
+
# {Resource.descendant_works} returns, plus one row in the same shape for
|
|
204
|
+
# each Collection beneath the Collection, gated to what the caller may read.
|
|
205
|
+
# Each row's `resource_class` tells the two apart. The Collection itself is
|
|
206
|
+
# never a row. Any `filters:` drops every Collection, because a Collection
|
|
207
|
+
# carries none of the Work values the filters match.
|
|
204
208
|
#
|
|
205
209
|
# **Embargoed, in-progress and incomplete Works never appear, for any
|
|
206
210
|
# caller.** That includes an admin token: the route is a public feed. Use
|
|
@@ -228,7 +232,7 @@ module AtlasRb
|
|
|
228
232
|
# @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
|
|
229
233
|
# header. Falls through to {AtlasRb.config}.default_on_behalf_of when
|
|
230
234
|
# omitted.
|
|
231
|
-
# @return [AtlasRb::Mash, nil] `{ "
|
|
235
|
+
# @return [AtlasRb::Mash, nil] `{ "results" => [...], "pagination" => {...},
|
|
232
236
|
# "facets" => { "genre_ssim" => [{ "value", "count" }] } }`. The counts
|
|
233
237
|
# cover the whole result, not just the page. `nil` when Atlas answers `404`.
|
|
234
238
|
# @raise [AtlasRb::ResourceError] on any non-2xx other than `404` / `410`.
|
|
@@ -236,7 +240,7 @@ module AtlasRb
|
|
|
236
240
|
# unknown sort; the error's message carries Atlas's explanation.
|
|
237
241
|
# @example
|
|
238
242
|
# page = AtlasRb::Collection.search("x-123", filters: { "genre_ssim" => ["Maps"] }, sort: "title")
|
|
239
|
-
# page.
|
|
243
|
+
# page.results.map(&:noid)
|
|
240
244
|
def self.search(id, q: nil, filters: {}, facets: [], facet_limit: nil, sort: nil,
|
|
241
245
|
page: nil, per_page: nil, include_linked: nil, nuid: nil, on_behalf_of: nil)
|
|
242
246
|
params = scoped_search_params(q: q, filters: filters, facets: facets, facet_limit: facet_limit,
|
data/lib/atlas_rb/community.rb
CHANGED
|
@@ -170,11 +170,15 @@ module AtlasRb
|
|
|
170
170
|
))
|
|
171
171
|
end
|
|
172
172
|
|
|
173
|
-
# Search the Works beneath a Community, at any depth, with
|
|
174
|
-
# counts.
|
|
173
|
+
# Search the Works and Collections beneath a Community, at any depth, with
|
|
174
|
+
# filters and facet counts.
|
|
175
175
|
#
|
|
176
|
-
# Wraps `GET /communities/<id>/search`. The rows are the
|
|
177
|
-
# {Resource.descendant_works} returns,
|
|
176
|
+
# Wraps `GET /communities/<id>/search`. The rows are the Work digests
|
|
177
|
+
# {Resource.descendant_works} returns, plus one row in the same shape for
|
|
178
|
+
# each Collection beneath the Community, gated to what the caller may read.
|
|
179
|
+
# Each row's `resource_class` tells the two apart. The Community itself is
|
|
180
|
+
# never a row. Any `filters:` drops every Collection, because a Collection
|
|
181
|
+
# carries none of the Work values the filters match.
|
|
178
182
|
#
|
|
179
183
|
# **Embargoed, in-progress and incomplete Works never appear, for any
|
|
180
184
|
# caller.** That includes an admin token: the route is a public feed. Use
|
|
@@ -202,7 +206,7 @@ module AtlasRb
|
|
|
202
206
|
# @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
|
|
203
207
|
# header. Falls through to {AtlasRb.config}.default_on_behalf_of when
|
|
204
208
|
# omitted.
|
|
205
|
-
# @return [AtlasRb::Mash, nil] `{ "
|
|
209
|
+
# @return [AtlasRb::Mash, nil] `{ "results" => [...], "pagination" => {...},
|
|
206
210
|
# "facets" => { "genre_ssim" => [{ "value", "count" }] } }`. The counts
|
|
207
211
|
# cover the whole result, not just the page. `nil` when Atlas answers `404`.
|
|
208
212
|
# @raise [AtlasRb::ResourceError] on any non-2xx other than `404` / `410`.
|
|
@@ -210,7 +214,7 @@ module AtlasRb
|
|
|
210
214
|
# unknown sort; the error's message carries Atlas's explanation.
|
|
211
215
|
# @example
|
|
212
216
|
# page = AtlasRb::Community.search("x-123", filters: { "genre_ssim" => ["Maps"] }, sort: "title")
|
|
213
|
-
# page.
|
|
217
|
+
# page.results.map(&:noid)
|
|
214
218
|
def self.search(id, q: nil, filters: {}, facets: [], facet_limit: nil, sort: nil,
|
|
215
219
|
page: nil, per_page: nil, include_linked: nil, nuid: nil, on_behalf_of: nil)
|
|
216
220
|
params = scoped_search_params(q: q, filters: filters, facets: facets, facet_limit: facet_limit,
|
data/lib/atlas_rb/compilation.rb
CHANGED
|
@@ -475,7 +475,7 @@ module AtlasRb
|
|
|
475
475
|
# @param on_behalf_of [String, nil] optional NUID for the `On-Behalf-Of`
|
|
476
476
|
# header. Falls through to {AtlasRb.config}.default_on_behalf_of when
|
|
477
477
|
# omitted.
|
|
478
|
-
# @return [AtlasRb::Mash, nil] `{ "
|
|
478
|
+
# @return [AtlasRb::Mash, nil] `{ "results" => [...], "pagination" => {...},
|
|
479
479
|
# "facets" => { "genre_ssim" => [{ "value", "count" }] } }`. The counts
|
|
480
480
|
# cover the whole result, not just the page. `nil` when Atlas answers `404`.
|
|
481
481
|
# @raise [AtlasRb::ResourceError] on any non-2xx other than `404` / `410`.
|
|
@@ -483,7 +483,7 @@ module AtlasRb
|
|
|
483
483
|
# unknown sort; the error's message carries Atlas's explanation.
|
|
484
484
|
# @example
|
|
485
485
|
# page = AtlasRb::Compilation.search("c-123", q: "harbor", facets: ["genre_ssim"])
|
|
486
|
-
# page.
|
|
486
|
+
# page.results.map(&:noid)
|
|
487
487
|
# page.facets.genre_ssim.map { |row| [row.value, row.count] }
|
|
488
488
|
def self.search(id, q: nil, filters: {}, facets: [], facet_limit: nil, sort: nil,
|
|
489
489
|
page: nil, per_page: nil, nuid: nil, on_behalf_of: nil)
|
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: 1.29.
|
|
4
|
+
version: 1.29.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Cliff
|
|
@@ -57,14 +57,14 @@ dependencies:
|
|
|
57
57
|
requirements:
|
|
58
58
|
- - "~>"
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: 0.
|
|
60
|
+
version: '0.5'
|
|
61
61
|
type: :runtime
|
|
62
62
|
prerelease: false
|
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
64
64
|
requirements:
|
|
65
65
|
- - "~>"
|
|
66
66
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: 0.
|
|
67
|
+
version: '0.5'
|
|
68
68
|
- !ruby/object:Gem::Dependency
|
|
69
69
|
name: faraday-retry
|
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -208,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
208
208
|
- !ruby/object:Gem::Version
|
|
209
209
|
version: '0'
|
|
210
210
|
requirements: []
|
|
211
|
-
rubygems_version:
|
|
211
|
+
rubygems_version: 4.0.20
|
|
212
212
|
specification_version: 4
|
|
213
213
|
summary: Ruby gem for Atlas API.
|
|
214
214
|
test_files: []
|