arclight 1.0.0.beta4 → 1.0.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/app/assets/javascripts/arclight/oembed_controller.js +5 -2
- data/lib/arclight/version.rb +1 -1
- data/package.json +1 -1
- 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: 8dc036f2f88f3c446ea37d4e430da4a555041c6ac63262ad062853ae91ed2fac
|
4
|
+
data.tar.gz: 1c07fab78cbc66efd7c35e2ccc6b0767350143a8e5c0a1565cbf383096763ba1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 490d571aa3e06bd5f9e65042c69abc66a5f96b3f6d48dfcd5021d88807a5b2176d3a5e1475ca69a2d52ff292c1ae4df88fdcccc6a85e002deb583b2cb29eed19
|
7
|
+
data.tar.gz: 267f8e127ed5222fbda4106444f65886f0742d664bbe3e9e3f453f1625577cec8dd139b9021ddc6c9812bb369cd4facc8cc9149a585faa34b44498ffcdc2fc49
|
@@ -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
|
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-
|
14
|
+
date: 2023-04-06 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: blacklight
|
@@ -509,9 +509,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
509
509
|
version: 3.0.0
|
510
510
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
511
511
|
requirements:
|
512
|
-
- - "
|
512
|
+
- - ">="
|
513
513
|
- !ruby/object:Gem::Version
|
514
|
-
version:
|
514
|
+
version: '0'
|
515
515
|
requirements: []
|
516
516
|
rubygems_version: 3.3.26
|
517
517
|
signing_key:
|