card-mod-script 0.17.0 → 0.18.1

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: 8e37f6c6359d1dc19288422e85eb4d3a64154daec566ddf6bbc1ac5374455caa
4
+ data.tar.gz: 0da2c19605f757cd5cc79ccc739ac9a905d37f43265ed549e467972761fcbd55
5
5
  SHA512:
6
- metadata.gz: 8775ad66626f63cd0ddba3ff50d0b524665bb8df14871cd24246e7cd41fcd74549eb535cae26c42b7657d6c8577e2fed5145d9bbee2b6fe098553c3d18868287
7
- data.tar.gz: ade03eb52a0f30b6c607fc861be182be91e6b25788be82abc4d86dee1b55764fa3590d399a1a6addba6034faf02eeb74711ba6ae175176c8b70a7d15f3281ce9
6
+ metadata.gz: 3a3982e614383e1b10e574b13c58181a79a47353de5b9c810306a28034883f093c7f51b688070ee6e0f8b408a854404aea72d47ac61757640935000ec14e1dfe
7
+ data.tar.gz: f2ac01e4d9ab30b5ffddd6f250d06874133aab3b71cedbea6571ab8baf3b974ae7d1a2278794b5bb4df38d1329e3661d50f9e81f2324726e99a230bdac220042
@@ -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.1
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-11-22 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.1
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.1
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.1
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.1
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.1
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.1
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