iiif-presentation 1.4.1 → 1.5.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/.github/workflows/ruby.yml +8 -1
- data/.standard.yml +1 -0
- data/Gemfile +5 -5
- data/README.md +1 -1
- data/Rakefile +4 -2
- data/VERSION +1 -1
- data/bin/standardrb +16 -0
- data/iiif-presentation.gemspec +23 -23
- data/lib/iiif/hash_behaviours.rb +29 -33
- data/lib/iiif/ordered_hash.rb +33 -33
- data/lib/iiif/presentation/abstract_resource.rb +17 -22
- data/lib/iiif/presentation/annotation.rb +9 -11
- data/lib/iiif/presentation/annotation_list.rb +8 -10
- data/lib/iiif/presentation/canvas.rb +11 -13
- data/lib/iiif/presentation/collection.rb +7 -9
- data/lib/iiif/presentation/image_resource.rb +33 -35
- data/lib/iiif/presentation/layer.rb +8 -10
- data/lib/iiif/presentation/manifest.rb +9 -12
- data/lib/iiif/presentation/range.rb +8 -10
- data/lib/iiif/presentation/resource.rb +5 -7
- data/lib/iiif/presentation/sequence.rb +8 -11
- data/lib/iiif/presentation/service.rb +1 -2
- data/lib/iiif/presentation.rb +7 -7
- data/lib/iiif/service.rb +121 -102
- data/lib/iiif/v3/abstract_resource.rb +132 -144
- data/lib/iiif/v3/presentation/annotation.rb +20 -21
- data/lib/iiif/v3/presentation/annotation_collection.rb +7 -9
- data/lib/iiif/v3/presentation/annotation_page.rb +14 -15
- data/lib/iiif/v3/presentation/canvas.rb +21 -22
- data/lib/iiif/v3/presentation/choice.rb +14 -15
- data/lib/iiif/v3/presentation/collection.rb +7 -8
- data/lib/iiif/v3/presentation/image_resource.rb +21 -22
- data/lib/iiif/v3/presentation/manifest.rb +18 -19
- data/lib/iiif/v3/presentation/nav_place.rb +125 -29
- data/lib/iiif/v3/presentation/range.rb +10 -10
- data/lib/iiif/v3/presentation/resource.rb +4 -5
- data/lib/iiif/v3/presentation/sequence.rb +10 -11
- data/lib/iiif/v3/presentation/service.rb +12 -13
- data/lib/iiif/v3/presentation.rb +8 -8
- data/spec/integration/iiif/presentation/image_resource_spec.rb +54 -58
- data/spec/integration/iiif/service_spec.rb +76 -77
- data/spec/integration/iiif/v3/abstract_resource_spec.rb +73 -73
- data/spec/integration/iiif/v3/presentation/image_resource_spec.rb +53 -56
- data/spec/spec_helper.rb +56 -64
- data/spec/unit/iiif/hash_behaviours_spec.rb +384 -387
- data/spec/unit/iiif/ordered_hash_spec.rb +86 -91
- data/spec/unit/iiif/presentation/abstract_resource_spec.rb +64 -70
- data/spec/unit/iiif/presentation/annotation_list_spec.rb +1 -3
- data/spec/unit/iiif/presentation/annotation_spec.rb +1 -3
- data/spec/unit/iiif/presentation/canvas_spec.rb +11 -14
- data/spec/unit/iiif/presentation/collection_spec.rb +26 -33
- data/spec/unit/iiif/presentation/image_resource_spec.rb +4 -6
- data/spec/unit/iiif/presentation/layer_spec.rb +16 -20
- data/spec/unit/iiif/presentation/manifest_spec.rb +45 -48
- data/spec/unit/iiif/presentation/range_spec.rb +18 -22
- data/spec/unit/iiif/presentation/resource_spec.rb +3 -6
- data/spec/unit/iiif/presentation/sequence_spec.rb +58 -63
- data/spec/unit/iiif/presentation/shared_examples/abstract_resource_only_keys.rb +4 -10
- data/spec/unit/iiif/presentation/shared_examples/any_type_keys.rb +5 -9
- data/spec/unit/iiif/presentation/shared_examples/array_only_keys.rb +9 -17
- data/spec/unit/iiif/presentation/shared_examples/int_only_keys.rb +6 -14
- data/spec/unit/iiif/presentation/shared_examples/string_only_keys.rb +6 -13
- data/spec/unit/iiif/service_spec.rb +8 -13
- data/spec/unit/iiif/v3/abstract_resource_define_methods_for_spec.rb +39 -37
- data/spec/unit/iiif/v3/abstract_resource_spec.rb +128 -143
- data/spec/unit/iiif/v3/presentation/annotation_collection_spec.rb +14 -17
- data/spec/unit/iiif/v3/presentation/annotation_page_spec.rb +71 -69
- data/spec/unit/iiif/v3/presentation/annotation_spec.rb +249 -233
- data/spec/unit/iiif/v3/presentation/canvas_spec.rb +211 -193
- data/spec/unit/iiif/v3/presentation/choice_spec.rb +81 -77
- data/spec/unit/iiif/v3/presentation/collection_spec.rb +24 -29
- data/spec/unit/iiif/v3/presentation/image_resource_spec.rb +70 -71
- data/spec/unit/iiif/v3/presentation/manifest_spec.rb +248 -237
- data/spec/unit/iiif/v3/presentation/nav_place_spec.rb +249 -49
- data/spec/unit/iiif/v3/presentation/range_spec.rb +28 -29
- data/spec/unit/iiif/v3/presentation/resource_spec.rb +83 -82
- data/spec/unit/iiif/v3/presentation/sequence_spec.rb +126 -120
- data/spec/unit/iiif/v3/presentation/service_spec.rb +123 -124
- data/spec/unit/iiif/v3/presentation/shared_examples/abstract_resource_only_keys.rb +4 -8
- data/spec/unit/iiif/v3/presentation/shared_examples/any_type_keys.rb +5 -7
- data/spec/unit/iiif/v3/presentation/shared_examples/array_only_keys.rb +9 -13
- data/spec/unit/iiif/v3/presentation/shared_examples/hash_only_keys.rb +9 -13
- data/spec/unit/iiif/v3/presentation/shared_examples/int_only_keys.rb +6 -10
- data/spec/unit/iiif/v3/presentation/shared_examples/numeric_only_keys.rb +6 -10
- data/spec/unit/iiif/v3/presentation/shared_examples/string_only_keys.rb +6 -10
- data/spec/unit/iiif/v3/presentation/shared_examples/uri_only_keys.rb +9 -13
- metadata +27 -69
|
@@ -1,31 +1,27 @@
|
|
|
1
|
-
shared_examples
|
|
2
|
-
|
|
1
|
+
shared_examples "it has the appropriate methods for uri-only keys v3" do
|
|
3
2
|
described_class.new.uri_only_keys.each do |prop|
|
|
4
|
-
|
|
5
3
|
describe "#{prop}=" do
|
|
6
4
|
it "sets #{prop}" do
|
|
7
|
-
ex =
|
|
5
|
+
ex = "http://example.org/foo"
|
|
8
6
|
subject.send("#{prop}=", ex)
|
|
9
7
|
expect(subject[prop]).to eq ex
|
|
10
8
|
end
|
|
11
|
-
it
|
|
12
|
-
expect { subject.send("#{prop}=", [
|
|
9
|
+
it "raises an exception when attempting to set it to something other than a String" do
|
|
10
|
+
expect { subject.send("#{prop}=", ["Foo"]) }.to raise_error IIIF::V3::Presentation::IllegalValueError
|
|
13
11
|
expect { subject.send("#{prop}=", nil) }.to raise_error IIIF::V3::Presentation::IllegalValueError
|
|
14
12
|
end
|
|
15
|
-
it
|
|
16
|
-
expect { subject.send("#{prop}=",
|
|
17
|
-
expect { subject.send("#{prop}=",
|
|
13
|
+
it "raises an exception when attempting to set it to something other than a parseable URI" do
|
|
14
|
+
expect { subject.send("#{prop}=", "Not a URI") }.to raise_error IIIF::V3::Presentation::IllegalValueError
|
|
15
|
+
expect { subject.send("#{prop}=", "") }.to raise_error IIIF::V3::Presentation::IllegalValueError
|
|
18
16
|
end
|
|
19
17
|
end
|
|
20
18
|
|
|
21
|
-
describe
|
|
19
|
+
describe prop.to_s do
|
|
22
20
|
it "gets #{prop}" do
|
|
23
|
-
ex =
|
|
21
|
+
ex = "bar"
|
|
24
22
|
subject[prop] = ex
|
|
25
23
|
expect(subject.send(prop)).to eq ex
|
|
26
24
|
end
|
|
27
25
|
end
|
|
28
|
-
|
|
29
26
|
end
|
|
30
|
-
|
|
31
27
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: iiif-presentation
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jon Stroop
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: bundler
|
|
@@ -53,19 +52,19 @@ dependencies:
|
|
|
53
52
|
- !ruby/object:Gem::Version
|
|
54
53
|
version: '0'
|
|
55
54
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
55
|
+
name: simplecov
|
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
|
58
57
|
requirements:
|
|
59
|
-
- - "
|
|
58
|
+
- - "~>"
|
|
60
59
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '
|
|
60
|
+
version: '1.3'
|
|
62
61
|
type: :development
|
|
63
62
|
prerelease: false
|
|
64
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
64
|
requirements:
|
|
66
|
-
- - "
|
|
65
|
+
- - "~>"
|
|
67
66
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '
|
|
67
|
+
version: '1.3'
|
|
69
68
|
- !ruby/object:Gem::Dependency
|
|
70
69
|
name: webmock
|
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -100,14 +99,28 @@ dependencies:
|
|
|
100
99
|
requirements:
|
|
101
100
|
- - "~>"
|
|
102
101
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '
|
|
102
|
+
version: '6.4'
|
|
104
103
|
type: :development
|
|
105
104
|
prerelease: false
|
|
106
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
106
|
requirements:
|
|
108
107
|
- - "~>"
|
|
109
108
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: '
|
|
109
|
+
version: '6.4'
|
|
110
|
+
- !ruby/object:Gem::Dependency
|
|
111
|
+
name: standard
|
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
|
113
|
+
requirements:
|
|
114
|
+
- - ">="
|
|
115
|
+
- !ruby/object:Gem::Version
|
|
116
|
+
version: '0'
|
|
117
|
+
type: :development
|
|
118
|
+
prerelease: false
|
|
119
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
120
|
+
requirements:
|
|
121
|
+
- - ">="
|
|
122
|
+
- !ruby/object:Gem::Version
|
|
123
|
+
version: '0'
|
|
111
124
|
- !ruby/object:Gem::Dependency
|
|
112
125
|
name: json
|
|
113
126
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -174,11 +187,13 @@ files:
|
|
|
174
187
|
- ".github/workflows/ruby.yml"
|
|
175
188
|
- ".gitignore"
|
|
176
189
|
- ".rspec"
|
|
190
|
+
- ".standard.yml"
|
|
177
191
|
- Gemfile
|
|
178
192
|
- LICENSE
|
|
179
193
|
- README.md
|
|
180
194
|
- Rakefile
|
|
181
195
|
- VERSION
|
|
196
|
+
- bin/standardrb
|
|
182
197
|
- iiif-presentation.gemspec
|
|
183
198
|
- lib/iiif/hash_behaviours.rb
|
|
184
199
|
- lib/iiif/ordered_hash.rb
|
|
@@ -270,7 +285,6 @@ homepage: https://github.com/iiif/osullivan
|
|
|
270
285
|
licenses:
|
|
271
286
|
- Simplified BSD
|
|
272
287
|
metadata: {}
|
|
273
|
-
post_install_message:
|
|
274
288
|
rdoc_options: []
|
|
275
289
|
require_paths:
|
|
276
290
|
- lib
|
|
@@ -285,63 +299,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
285
299
|
- !ruby/object:Gem::Version
|
|
286
300
|
version: '0'
|
|
287
301
|
requirements: []
|
|
288
|
-
rubygems_version:
|
|
289
|
-
signing_key:
|
|
302
|
+
rubygems_version: 4.0.3
|
|
290
303
|
specification_version: 4
|
|
291
304
|
summary: API for working with IIIF Presentation manifests.
|
|
292
|
-
test_files:
|
|
293
|
-
- spec/fixtures/manifests/complete_from_spec.json
|
|
294
|
-
- spec/fixtures/manifests/minimal.json
|
|
295
|
-
- spec/fixtures/manifests/service_only.json
|
|
296
|
-
- spec/fixtures/v3/manifests/complete_from_spec.json
|
|
297
|
-
- spec/fixtures/v3/manifests/minimal.json
|
|
298
|
-
- spec/fixtures/v3/manifests/service_only.json
|
|
299
|
-
- spec/fixtures/vcr_cassettes/pul_loris_cassette.json
|
|
300
|
-
- spec/fixtures/vcr_cassettes/pul_loris_cassette_v3.json
|
|
301
|
-
- spec/integration/iiif/presentation/image_resource_spec.rb
|
|
302
|
-
- spec/integration/iiif/service_spec.rb
|
|
303
|
-
- spec/integration/iiif/v3/abstract_resource_spec.rb
|
|
304
|
-
- spec/integration/iiif/v3/presentation/image_resource_spec.rb
|
|
305
|
-
- spec/spec_helper.rb
|
|
306
|
-
- spec/unit/iiif/hash_behaviours_spec.rb
|
|
307
|
-
- spec/unit/iiif/ordered_hash_spec.rb
|
|
308
|
-
- spec/unit/iiif/presentation/abstract_resource_spec.rb
|
|
309
|
-
- spec/unit/iiif/presentation/annotation_list_spec.rb
|
|
310
|
-
- spec/unit/iiif/presentation/annotation_spec.rb
|
|
311
|
-
- spec/unit/iiif/presentation/canvas_spec.rb
|
|
312
|
-
- spec/unit/iiif/presentation/collection_spec.rb
|
|
313
|
-
- spec/unit/iiif/presentation/image_resource_spec.rb
|
|
314
|
-
- spec/unit/iiif/presentation/layer_spec.rb
|
|
315
|
-
- spec/unit/iiif/presentation/manifest_spec.rb
|
|
316
|
-
- spec/unit/iiif/presentation/range_spec.rb
|
|
317
|
-
- spec/unit/iiif/presentation/resource_spec.rb
|
|
318
|
-
- spec/unit/iiif/presentation/sequence_spec.rb
|
|
319
|
-
- spec/unit/iiif/presentation/shared_examples/abstract_resource_only_keys.rb
|
|
320
|
-
- spec/unit/iiif/presentation/shared_examples/any_type_keys.rb
|
|
321
|
-
- spec/unit/iiif/presentation/shared_examples/array_only_keys.rb
|
|
322
|
-
- spec/unit/iiif/presentation/shared_examples/int_only_keys.rb
|
|
323
|
-
- spec/unit/iiif/presentation/shared_examples/string_only_keys.rb
|
|
324
|
-
- spec/unit/iiif/service_spec.rb
|
|
325
|
-
- spec/unit/iiif/v3/abstract_resource_define_methods_for_spec.rb
|
|
326
|
-
- spec/unit/iiif/v3/abstract_resource_spec.rb
|
|
327
|
-
- spec/unit/iiif/v3/presentation/annotation_collection_spec.rb
|
|
328
|
-
- spec/unit/iiif/v3/presentation/annotation_page_spec.rb
|
|
329
|
-
- spec/unit/iiif/v3/presentation/annotation_spec.rb
|
|
330
|
-
- spec/unit/iiif/v3/presentation/canvas_spec.rb
|
|
331
|
-
- spec/unit/iiif/v3/presentation/choice_spec.rb
|
|
332
|
-
- spec/unit/iiif/v3/presentation/collection_spec.rb
|
|
333
|
-
- spec/unit/iiif/v3/presentation/image_resource_spec.rb
|
|
334
|
-
- spec/unit/iiif/v3/presentation/manifest_spec.rb
|
|
335
|
-
- spec/unit/iiif/v3/presentation/nav_place_spec.rb
|
|
336
|
-
- spec/unit/iiif/v3/presentation/range_spec.rb
|
|
337
|
-
- spec/unit/iiif/v3/presentation/resource_spec.rb
|
|
338
|
-
- spec/unit/iiif/v3/presentation/sequence_spec.rb
|
|
339
|
-
- spec/unit/iiif/v3/presentation/service_spec.rb
|
|
340
|
-
- spec/unit/iiif/v3/presentation/shared_examples/abstract_resource_only_keys.rb
|
|
341
|
-
- spec/unit/iiif/v3/presentation/shared_examples/any_type_keys.rb
|
|
342
|
-
- spec/unit/iiif/v3/presentation/shared_examples/array_only_keys.rb
|
|
343
|
-
- spec/unit/iiif/v3/presentation/shared_examples/hash_only_keys.rb
|
|
344
|
-
- spec/unit/iiif/v3/presentation/shared_examples/int_only_keys.rb
|
|
345
|
-
- spec/unit/iiif/v3/presentation/shared_examples/numeric_only_keys.rb
|
|
346
|
-
- spec/unit/iiif/v3/presentation/shared_examples/string_only_keys.rb
|
|
347
|
-
- spec/unit/iiif/v3/presentation/shared_examples/uri_only_keys.rb
|
|
305
|
+
test_files: []
|