rbexy 2.0.0.beta6 → 2.0.0.beta7

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: e49b6c4fa1c9416c987a4d81ed3b825101a201806d34868d35cd7277fb7e60d9
4
- data.tar.gz: c00c5c310fa4ffd4c5fe242042ecbb4a394392e106594c10aaca1f2ef5f00062
3
+ metadata.gz: 97a3fcda88057f9554949f70bbc5dcd30910354e6eb4a4cd1a83e0b53bd30322
4
+ data.tar.gz: fe5f40ad4f4820233e2c555e9c0d13852774c75e40d03e1ac6357157e87d6a22
5
5
  SHA512:
6
- metadata.gz: 22eacdfd5e1e53cdcb521e8b58540f04406bd7797ce2089fd624b098cb382a6bc0b3722d8a70eddcc4a80454728e3ea4c8df1caaf8aee47efbb1f13cc796eb6c
7
- data.tar.gz: e1399a68a0bea51e573dca820a4c663efa731c76644fec40ea7963686e8006008adde044b2de5b7e5ee607136c7d09549debe768f2e1295bdf167bc05b10de99
6
+ metadata.gz: d819a2cdd14c75b73b0fc88aabb57cff4666232601a0cf7aeb554a7841313bfdb9f6a56f43d672bec493e14b4a5fcd6f01613ead04ea1609d36e75368352576a
7
+ data.tar.gz: 18c2566b9851268b689e43800dd0a9876224c181cd089750416fc2202c65613cc57717c3a354c5da90cecbd6cb2258ec911e56aff59dc44739ee1bf14b5bccce
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rbexy (2.0.0.beta6)
4
+ rbexy (2.0.0.beta7)
5
5
  actionview (>= 6.0, < 7.0)
6
6
  activesupport (>= 6.0, < 7.0)
7
7
 
@@ -51,6 +51,12 @@ module Rbexy
51
51
  self.class.call_component? ? call : _render
52
52
  end
53
53
 
54
+ # Explicitly delegate `render` to the view_context rather than super,
55
+ # so `render partial: "..."` calls run in the expected context.
56
+ def render(*args)
57
+ view_context.render(*args)
58
+ end
59
+
54
60
  def content
55
61
  content_block ? content_block.call : ""
56
62
  end
@@ -6,7 +6,8 @@ module Rbexy
6
6
  COMMENT_SYNTAX = {
7
7
  rbx: "# %s",
8
8
  erb: "<%%# %s %%>",
9
- html: "<!-- %s -->"
9
+ haml: "-# %s",
10
+ slim: "/ %s"
10
11
  }
11
12
 
12
13
  # Rails 6 requires us to override `_find_all` in order to hook
@@ -78,12 +79,13 @@ module Rbexy
78
79
  end
79
80
 
80
81
  def cachebuster_digest_as_comment(filename, format)
82
+ comment_template = COMMENT_SYNTAX[format.to_sym]
83
+ return "" unless comment_template
84
+
81
85
  source = File.binread(filename)
82
86
  digest = ActiveSupport::Digest.hexdigest(source)
83
87
 
84
- comment_template = COMMENT_SYNTAX[format.to_sym] || COMMENT_SYNTAX[:html]
85
- comment = comment_template % digest
86
- "\n#{comment}"
88
+ "\n#{comment_template % digest}"
87
89
  end
88
90
  end
89
91
  end
@@ -1,3 +1,3 @@
1
1
  module Rbexy
2
- VERSION = "2.0.0.beta6"
2
+ VERSION = "2.0.0.beta7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbexy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta6
4
+ version: 2.0.0.beta7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Giancola