card-mod-script 0.17.0 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8701cb28be798684cd3ef7cdeda75c555c9c198a630dbee3c551aa4f095a5965
4
- data.tar.gz: 89a620cf437f0158a5a226cd238e1724ca13386ee3fb129a2fb589f411ebc267
3
+ metadata.gz: b0025163b444a1237b1c1039bdea5234e43eefa6d93cf7db767fd1679d7917cd
4
+ data.tar.gz: 5129ce7547473601012ae48ecb3d197aae797ecd284cb1671d4b2cd68e70050f
5
5
  SHA512:
6
- metadata.gz: 8775ad66626f63cd0ddba3ff50d0b524665bb8df14871cd24246e7cd41fcd74549eb535cae26c42b7657d6c8577e2fed5145d9bbee2b6fe098553c3d18868287
7
- data.tar.gz: ade03eb52a0f30b6c607fc861be182be91e6b25788be82abc4d86dee1b55764fa3590d399a1a6addba6034faf02eeb74711ba6ae175176c8b70a7d15f3281ce9
6
+ metadata.gz: 98f40c23605c6f995b43a31c8d000157daf3834cb92221fea93c86c704de3ee2080d77f9e9ab8949a82d844f5772fb35fe4028e1197c40769d13e606aa8f6091
7
+ data.tar.gz: 9392c4306294b9e42f379242311c0bd5383d9c0a9258b68486a0f6f23370ba65c87fc1c8225b801a3459c3ea3faf7549272cfc8997170fd8ad109d43f84231e6
@@ -75,7 +75,7 @@ format :html do
75
75
  process_content highlight(render_raw)
76
76
  end
77
77
 
78
- view :javascript_include_tag do
78
+ view :javascript_include_tag, cache: :never do
79
79
  javascript_include_tag path(format: :js)
80
80
  end
81
81
 
@@ -4,7 +4,7 @@ format :html do
4
4
  # - value is the argument to send to the method
5
5
  basket[:script_calls] = {}
6
6
 
7
- basket[:head_views] += %w[head_javascript script_variables script_calls]
7
+ basket[:head_views] += %w[javascript_tags script_variables script_calls]
8
8
 
9
9
  view :script_variables, unknown: true, cache: :never, perms: :none do
10
10
  javascript_tag do
@@ -14,7 +14,7 @@ format :html do
14
14
  end
15
15
  end
16
16
 
17
- view :head_javascript, unknown: true, cache: :never, perms: :none do
17
+ view :javascript_tags, unknown: true, cache: :deep, perms: :none do
18
18
  Array.wrap(head_javascript_paths).reject(&:empty?).join
19
19
  end
20
20
 
@@ -22,7 +22,7 @@ format :html do
22
22
  javascript_tag { (script_configs << trigger_slot_ready).join "\n\n" }
23
23
  end
24
24
 
25
- view :javascript_include_tag, unknown: true, perms: :none do
25
+ view :javascript_include_tag, cache: :never, unknown: true, perms: :none do
26
26
  "\n<!-- javascript_include_tag not overridden for #{card.name} -->\n"
27
27
  end
28
28
 
@@ -38,6 +38,7 @@ format :html do
38
38
  def head_javascript_paths
39
39
  return unless (asset_card = param_or_rule_card :script)
40
40
 
41
+ seed_asset_outputs asset_card
41
42
  asset_card.item_cards.map do |script|
42
43
  script.format(:html).render :javascript_include_tag
43
44
  end
@@ -45,6 +46,10 @@ format :html do
45
46
 
46
47
  private
47
48
 
49
+ def seed_asset_outputs asset_card
50
+ Cache.populate_fields asset_card.item_names, :asset_output
51
+ end
52
+
48
53
  def trigger_slot_ready
49
54
  "$('document').ready(function() { $('.card-slot').trigger('decko.slot.ready'); })"
50
55
  end
data/set/right/script.rb CHANGED
@@ -5,7 +5,7 @@ def ok_to_read?
5
5
  end
6
6
 
7
7
  format :html do
8
- view :javascript_include_tag do
8
+ view :javascript_include_tag, cache: :never do
9
9
  card.item_cards.map do |script|
10
10
  script.format(:html).render :javascript_include_tag
11
11
  end
@@ -30,7 +30,7 @@ def asset_output_updated_at
30
30
  end
31
31
 
32
32
  format :html do
33
- view :javascript_include_tag do
33
+ view :javascript_include_tag, cache: :never do
34
34
  [remote_include_tags, local_include_tag].flatten.compact.join "\n"
35
35
  end
36
36
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-script
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-06-12 00:00:00.000000000 Z
13
+ date: 2024-10-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: card
@@ -18,42 +18,42 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.107.0
21
+ version: 1.108.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 1.107.0
28
+ version: 1.108.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: card-mod-assets
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.17.0
35
+ version: 0.18.0
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.17.0
42
+ version: 0.18.0
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: card-mod-list
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.17.0
49
+ version: 0.18.0
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
- version: 0.17.0
56
+ version: 0.18.0
57
57
  description: ''
58
58
  email:
59
59
  - info@decko.org
@@ -89,7 +89,7 @@ files:
89
89
  - set/type_plus_right/set/script.rb
90
90
  homepage: https://decko.org
91
91
  licenses:
92
- - GPL-3.0
92
+ - GPL-3.0-or-later
93
93
  metadata:
94
94
  source_code_uri: https://github.com/decko-commons/decko
95
95
  homepage_uri: https://decko.org
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  - !ruby/object:Gem::Version
114
114
  version: '0'
115
115
  requirements: []
116
- rubygems_version: 3.5.10
116
+ rubygems_version: 3.5.7
117
117
  signing_key:
118
118
  specification_version: 4
119
119
  summary: JavaScript, CoffeeScript, etc.