card 1.95.0 → 1.95.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
  SHA1:
3
- metadata.gz: e843187d944becbd02efcad97a5a2ac0567601c4
4
- data.tar.gz: 4ea377cacfa920a114f1d266067a2bd3f3219295
3
+ metadata.gz: 4d598432151555db009b0d39d8cc95bfa6a0958a
4
+ data.tar.gz: bf9d27bf2c4bf8a0c58ebac87a12c1ef82f779b2
5
5
  SHA512:
6
- metadata.gz: c0faf4d57bc8e26a1c54a16c3547fd7463d63aea1540e98dc635418c5ee83e3b111ff385eeb919d7315f7b976ad14a8071d050eec28545538cbaed32731aed74
7
- data.tar.gz: c4081f79639108518e3e38781938d29ee736988b5594a26f72bdc94146da7a81f867d09ba81034111a4730cc2efde2ae80002dad078fcd7a04ccc35ee680d9b7
6
+ metadata.gz: b202c6d3e44b5b5bce2c29a9b04ce4efcfccd878f2362165298f9b85b3a07fbd8dcc24819d3dbf34f81a4b67003343ac1bcdab16458fba16d82a21d3a16a9260
7
+ data.tar.gz: 59120bd2568a0da6d291191fd5c5a0c3ad7d8eab577d02e381f0905968a0b63cbcb01c2ae1be303ee0f26fe5e87275a40529435d25d9d98c73fa14f7c5843035
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
@@ -1,5 +1,5 @@
1
1
  format do
2
- view :page_title, tags: :unknown_ok do
2
+ view :page_title, tags: :unknown_ok, perms: :none do
3
3
  [(safe_name if card.name.present?), Card.global_setting(:title)].compact.join " - "
4
4
  end
5
5
  end
@@ -10,7 +10,7 @@ format :html do
10
10
  # - the name of a javascript method that handles the config
11
11
  basket :mod_js_config
12
12
 
13
- view :head, tags: :unknown_ok do
13
+ view :head, tags: :unknown_ok, perms: :none do
14
14
  views_in_head.map { |viewname| render viewname }.flatten.compact.join "\n"
15
15
  end
16
16
 
@@ -22,19 +22,19 @@ format :html do
22
22
  end
23
23
 
24
24
  # FIXME: tags not working with `template: :haml`
25
- view :meta_tags, tags: :unknown_ok do
25
+ view :meta_tags, tags: :unknown_ok, perms: :none do
26
26
  haml :meta_tags
27
27
  end
28
28
 
29
- view :html5shiv_tag, tags: :unknown_ok do
29
+ view :html5shiv_tag, tags: :unknown_ok, perms: :none do
30
30
  nest :script_html5shiv_printshiv, view: :script_tag
31
31
  end
32
32
 
33
- view :page_title_tag, tags: :unknown_ok do
33
+ view :page_title_tag, tags: :unknown_ok, perms: :none do
34
34
  content_tag(:title) { render :page_title }
35
35
  end
36
36
 
37
- view :favicon_tag, tags: :unknown_ok do
37
+ view :favicon_tag, tags: :unknown_ok, perms: :none do
38
38
  nest :favicon, view: :link_tag
39
39
  end
40
40
 
@@ -47,18 +47,18 @@ format :html do
47
47
  # these should render a view of the rule card
48
48
  # it would then be safe to cache if combined with param handling
49
49
  # (but note that machine clearing would need to reset card cache...)
50
- view :head_stylesheet, tags: :unknown_ok, cache: :never do
50
+ view :head_stylesheet, tags: :unknown_ok, cache: :never, perms: :none do
51
51
  return unless (href = head_stylesheet_path)
52
52
  tag "link", href: href, media: "all", rel: "stylesheet", type: "text/css"
53
53
  end
54
54
 
55
- view :head_javascript, tags: :unknown_ok, cache: :never do
55
+ view :head_javascript, tags: :unknown_ok, cache: :never, perms: :none do
56
56
  Array.wrap(head_javascript_paths).map do |path|
57
57
  javascript_include_tag path
58
58
  end
59
59
  end
60
60
 
61
- view :decko_script_variables, tags: :unknown_ok, cache: :never do
61
+ view :decko_script_variables, tags: :unknown_ok, cache: :never, perms: :none do
62
62
  string = ""
63
63
  decko_script_variables.each do |k, v|
64
64
  string += "#{k}=#{script_variable_to_js v};\n"
@@ -118,7 +118,7 @@ format :html do
118
118
  end
119
119
  end
120
120
 
121
- view :script_config_and_initiation, tags: :unknown_ok do
121
+ view :script_config_and_initiation, tags: :unknown_ok, perms: :none do
122
122
  javascript_tag do
123
123
  (mod_js_configs << trigger_slot_ready).join "\n\n"
124
124
  end
@@ -29,7 +29,13 @@ def mod_dir new_mod=nil
29
29
  end
30
30
 
31
31
  def files_base_dir
32
- bucket ? bucket_config[:subdirectory] : Card.paths["files"].existent.first
32
+ dir = bucket ? bucket_config[:subdirectory] : Card.paths["files"].existent.first
33
+ dir || files_base_dir_configuration_error
34
+ end
35
+
36
+ def files_base_dir_configuration_error
37
+ raise StandardError,
38
+ "missing directory for file cache (default is `files` in deck root)"
33
39
  end
34
40
 
35
41
  # used in the indentifier
@@ -4,7 +4,7 @@ format :html do
4
4
  source.present? ? source : nest(:logo, view: :source, size: voo.size)
5
5
  end
6
6
 
7
- view :link_tag do
7
+ view :link_tag, perms: :none do
8
8
  return unless (source = render :source, size: :small)
9
9
  tag :link, rel: "shortcut icon", href: source
10
10
  end
@@ -27,12 +27,14 @@ $.extend decko,
27
27
 
28
28
  jQuery.fn.extend {
29
29
  slot: (status="success") ->
30
- if @data("slot-#{status}-selector")
31
- @findSlot(@data("slot-#{status}-selector"))
32
- else if @data("slot-selector")
33
- @findSlot(@data("slot-selector"))
34
- else
35
- @closest '.card-slot'
30
+ @selectSlot("slot-#{status}-selector") ||
31
+ @selectSlot("slot-selector") ||
32
+ @closest(".card-slot")
33
+
34
+ selectSlot: (selectorName) ->
35
+ if selector = @data(selectorName)
36
+ slot = @findSlot selector
37
+ slot[0] && slot
36
38
 
37
39
  isSlot: ->
38
40
  $(this).hasClass "card-slot"
@@ -80,6 +82,7 @@ jQuery.fn.extend {
80
82
  else
81
83
  s.replaceWith v
82
84
  v.trigger 'slotReady'
85
+ v.find(".card-slot").trigger "slotReady"
83
86
  v
84
87
 
85
88
 
@@ -1,7 +1,7 @@
1
1
  include_set Abstract::CodeFile
2
2
 
3
3
  format :html do
4
- view :script_tag do
4
+ view :script_tag, perms: :none do
5
5
  <<-HTML.strip_heredoc
6
6
  <!--[if lt IE 9]>
7
7
  #{javascript_include_tag card.machine_output_url}
@@ -1,9 +1,9 @@
1
1
  format do
2
- view :home_url do
2
+ view :home_url, perms: :none do
3
3
  card_url ""
4
4
  end
5
5
 
6
- view :home_path do
6
+ view :home_path, perms: :none do
7
7
  card_path ""
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.95.0
4
+ version: 1.95.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2018-06-05 00:00:00.000000000 Z
14
+ date: 2018-06-07 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: cardname
@@ -19,14 +19,14 @@ dependencies:
19
19
  requirements:
20
20
  - - '='
21
21
  - !ruby/object:Gem::Version
22
- version: 0.5.0
22
+ version: 0.5.1
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 0.5.0
29
+ version: 0.5.1
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: haml
32
32
  requirement: !ruby/object:Gem::Requirement