rails_view_annotator 0.0.8 → 0.0.9
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f291edf8f589c42e16efbea3b22d295b02b1b11
|
4
|
+
data.tar.gz: 18de8386718f85f8a8af1c632a0f9c9253374bfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa83d5e4b545a7f6edfcf80aeb0030605cc223eab67df4ff4396bbb3b36389bbb52f42153fce412d5ca766999523e13c11e564d859e93078281e780bbd15e7a2
|
7
|
+
data.tar.gz: bfe2799a7b1e2aa466cf83c5c2df352d5e685f7847db434d61f799fedd7d98108010ea68838ddb3d3f2d525eb5161241e04aa47f35ef18933107325073b83fe1
|
@@ -13,11 +13,16 @@ module RailsViewAnnotator
|
|
13
13
|
descriptor = "#{short_identifier} (from #{called_from})"
|
14
14
|
|
15
15
|
if not inner.blank?
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
comment_pattern = "%{partial}"
|
17
|
+
|
18
|
+
template_formats = Array(args[1][:formats])
|
19
|
+
if template_formats.include?(:js)
|
20
|
+
comment_pattern = "/* begin: %{comment} */\n#{comment_pattern}/* end: %{comment} */"
|
21
|
+
elsif template_formats.empty? || template_formats.include?(:html)
|
22
|
+
comment_pattern = "<!-- begin: %{comment} -->\n#{comment_pattern}<!-- end: %{comment} -->"
|
20
23
|
end
|
24
|
+
|
25
|
+
(comment_pattern % {:partial => inner, :comment => descriptor}).html_safe
|
21
26
|
end
|
22
27
|
end
|
23
28
|
klass.send(:include, InstanceMethods)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_view_annotator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Duncan Beevers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: The Rails View Annotator makes it easy to find out which partial generated
|
14
14
|
which output
|