view_source_map 0.0.9 → 0.1.0
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 +4 -4
- data/lib/view_source_map/version.rb +1 -1
- data/lib/view_source_map.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f88b82b0d49b618370e590c1ea6d57b8c9d606e5
|
4
|
+
data.tar.gz: 771faf6d47edf9b54b70d2763e5a802769590534
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae398bf331eb4735385def97fc8457725a8860c8fd50940fa38428c64b47dcea430b04599c4407ca1665d26822949d0d999c582376b795f5e8a8ab8505fdc3fa
|
7
|
+
data.tar.gz: 522a8a16fe6b5317cf5ec362627d8b866990f42e3b7b75ff1b6fc04d4bb29246b6e6a8619bd4a3fdafca2d74c5a8912a0d9d08ec18a1cc7194f7e581fb083df5
|
data/lib/view_source_map.rb
CHANGED
@@ -37,6 +37,8 @@ module ViewSourceMap
|
|
37
37
|
render_with_layout(layout_name, locals) do |layout|
|
38
38
|
instrument(:template, :identifier => template.identifier, :layout => layout.try(:virtual_path)) do
|
39
39
|
content = template.render(view, locals) { |*name| view._layout_for(*name) }
|
40
|
+
return content if ViewSourceMap.force_disabled?(locals)
|
41
|
+
|
40
42
|
if @lookup_context.rendered_format == :html and template.class != ActionView::Template::Text
|
41
43
|
path = Pathname.new(template.identifier)
|
42
44
|
name = path.relative_path_from(Rails.root)
|
@@ -69,6 +71,6 @@ module ViewSourceMap
|
|
69
71
|
return false if options.nil?
|
70
72
|
return true if options[:view_source_map] == false
|
71
73
|
return false if options[:locals].nil?
|
72
|
-
|
74
|
+
options[:locals][:view_source_map] == false
|
73
75
|
end
|
74
76
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: view_source_map
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|