arclight 1.0.0.beta4 → 1.0.0.beta6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/arclight/oembed_controller.js +5 -2
- data/lib/arclight/version.rb +1 -1
- data/package.json +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 978d99d3c0ba2a6ffbb24b50b7d0014514c56dd2329e269d3f3cd0b0a8823b54
|
4
|
+
data.tar.gz: 8b0aaf3ae67be3690a05c19cc331b58095fbacd7d7d46a94e951c3ee1966a14e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34349c3acd58a399977b48fcfd91879111dde724fd7508792760e3e183802fcfd175e9bea8adc4ae29903895f7297b1a3090ff1e637f26b73abf638f9e11b1f9
|
7
|
+
data.tar.gz: 7afeec4ed0a5107b2abfaa5f914d48a0cc898e77cd49a2674f37a1e270e00cd89a95f329eec00f00268ce5aa0bab731c205eddc2eae12ba0a87e9a1775325287
|
@@ -18,7 +18,7 @@ export default class OembedController extends Controller {
|
|
18
18
|
throw new Error(`HTTP error, status = ${response.status}`)
|
19
19
|
})
|
20
20
|
.then((body) => {
|
21
|
-
const oEmbedEndPoint =
|
21
|
+
const oEmbedEndPoint = this.findOEmbedEndPoint(body)
|
22
22
|
if (!oEmbedEndPoint || oEmbedEndPoint.length === 0) {
|
23
23
|
console.warn(`No oEmbed endpoint found in <head> at ${this.urlValue}`)
|
24
24
|
return
|
@@ -29,7 +29,10 @@ export default class OembedController extends Controller {
|
|
29
29
|
})
|
30
30
|
}
|
31
31
|
|
32
|
-
static
|
32
|
+
// We are choosing not to make this class static so that downstream classes
|
33
|
+
// can override it and access values to populate extraParams.
|
34
|
+
// E.g. https://github.com/sul-dlss/vt-arclight/blob/main/app/javascript/controllers/sul_embed_controller.js
|
35
|
+
findOEmbedEndPoint(body, extraParams = {}) { // eslint-disable-line class-methods-use-this
|
33
36
|
// Parse out link elements so image assets are not loaded
|
34
37
|
const template = document.createElement('template')
|
35
38
|
template.innerHTML = body.match(/<link .*>/g).join('')
|
data/lib/arclight/version.rb
CHANGED
data/package.json
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arclight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.beta6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Darren Hardy
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2023-03-
|
14
|
+
date: 2023-03-24 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: blacklight
|
@@ -513,7 +513,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
513
513
|
- !ruby/object:Gem::Version
|
514
514
|
version: 1.3.1
|
515
515
|
requirements: []
|
516
|
-
rubygems_version: 3.3.
|
516
|
+
rubygems_version: 3.3.7
|
517
517
|
signing_key:
|
518
518
|
specification_version: 4
|
519
519
|
summary: A Blacklight-based environment to support discovery and delivery for archives
|