embeddable_content 0.3.2 → 1.0.1
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/README.md +1 -0
- data/app/services/embeddable_content/images/img_tag_attributes.rb +2 -2
- data/app/services/embeddable_content/images/modal_dialog.rb +2 -2
- data/app/services/embeddable_content/images/node_processor.rb +1 -1
- data/app/services/embeddable_content/record_node_processor.rb +2 -2
- data/embeddable_content-1.0.0.gem +0 -0
- data/lib/embeddable_content/engine.rb +0 -2
- data/lib/embeddable_content/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e6a74872d75d69fe856b679579a53da713e24d3fe17c0b70cecc5d701311cce6
|
|
4
|
+
data.tar.gz: 607ba9f7470597a6f9fae3d5c93ced5135b6f52497e6f137fc7b99ce45814e9d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1bda46ef7f616afca38e551c63c6715b9eebfbe3958bb79b2978e2f19522c9176a5ffdcab31b491489224abc870687120f6de2839be4a84f905573ef7a71ab0e
|
|
7
|
+
data.tar.gz: ca7fb19df68cdf847c9a7323fb82074c4e7a7c9ebf8bafc0c87895d85bd496fc2cd4196ae833a04bbfca2d02a13c3ae680a19547bd10d5b9e2034f5461e0a3c7
|
data/README.md
CHANGED
|
@@ -70,5 +70,6 @@ $ gem push embeddable_content-0.2.0.gem
|
|
|
70
70
|
|
|
71
71
|
| Version | Changes |
|
|
72
72
|
| --- | --- |
|
|
73
|
+
| 1.0.1 | Major version corresponds to upgrading CMS to Rails 7. IIAB should continue using 0.x.x releases for now. |
|
|
73
74
|
| 0.3.1 | Meaningless change as I (EDC) experiment with gem host. |
|
|
74
75
|
| 0.2.0 | NIMAS export now using embedder for TeX. However, the embedder is not yet using the full TexExprssions table. |
|
|
@@ -5,7 +5,7 @@ module EmbeddableContent
|
|
|
5
5
|
attr_reader :node_processor
|
|
6
6
|
|
|
7
7
|
delegate :alt_text, :attached_file, :record, :aria_attrs?,
|
|
8
|
-
:cms_url, :s3_url, :
|
|
8
|
+
:cms_url, :s3_url, :s3_ttl_url, :target,
|
|
9
9
|
:node, to: :node_processor
|
|
10
10
|
delegate :image, to: :record
|
|
11
11
|
delegate :raw_svg, to: :image_downloader
|
|
@@ -28,7 +28,7 @@ module EmbeddableContent
|
|
|
28
28
|
when :cms then cms_url
|
|
29
29
|
when :editable then downloaded_file_url
|
|
30
30
|
when :exported, :qti then s3_url with_extension: false
|
|
31
|
-
when :print, :web then
|
|
31
|
+
when :print, :web then s3_ttl_url
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
@@ -5,7 +5,7 @@ module EmbeddableContent
|
|
|
5
5
|
|
|
6
6
|
attr_reader :node_processor
|
|
7
7
|
|
|
8
|
-
delegate :record_css_id_for, :
|
|
8
|
+
delegate :record_css_id_for, :s3_ttl_url, :caption, :attribution,
|
|
9
9
|
:alt_text, to: :node_processor
|
|
10
10
|
|
|
11
11
|
def initialize(node_processor)
|
|
@@ -13,7 +13,7 @@ module EmbeddableContent
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def img_tag_attrs
|
|
16
|
-
{ src:
|
|
16
|
+
{ src: s3_ttl_url,
|
|
17
17
|
width: '80%',
|
|
18
18
|
alt: strip_tags(alt_text),
|
|
19
19
|
role: :image }
|
|
@@ -27,13 +27,13 @@ module EmbeddableContent
|
|
|
27
27
|
src_url
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
def
|
|
30
|
+
def s3_ttl_url
|
|
31
31
|
if Rails.env.test?
|
|
32
32
|
Pathname
|
|
33
33
|
.new(ActiveStorage::Blob.service.send(:path_for, blob.key))
|
|
34
34
|
.relative_path_from Rails.root
|
|
35
35
|
else
|
|
36
|
-
blob.
|
|
36
|
+
blob.url(content_type: content_type)
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: embeddable_content
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Eric Connally
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-05-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -278,6 +278,7 @@ files:
|
|
|
278
278
|
- bin/rails
|
|
279
279
|
- config/initializers/embeddable_content.rb
|
|
280
280
|
- config/routes.rb
|
|
281
|
+
- embeddable_content-1.0.0.gem
|
|
281
282
|
- embeddable_content.gemspec
|
|
282
283
|
- lib/embeddable_content.rb
|
|
283
284
|
- lib/embeddable_content/engine.rb
|