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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94ba4cc1d00e944460f9696b5debcc97488c033f
4
- data.tar.gz: e3dc5aba66ece81d13603648758e001693cd40fa
3
+ metadata.gz: f88b82b0d49b618370e590c1ea6d57b8c9d606e5
4
+ data.tar.gz: 771faf6d47edf9b54b70d2763e5a802769590534
5
5
  SHA512:
6
- metadata.gz: 05f29327ed8a1bc073b7ff055021fcd5bfe14f1162ba16474e14a4a6886b4688edec3a528279fcaaa134dc0d1b3c6986fe1267150c66871580d44c56345c5496
7
- data.tar.gz: 18dcfce6b129e66cd0749ada15a8aeec51a33c9c4200d1a63b7c4541bff0c366d9d8feac65321872a16b8c4ecb8f98d71bb023875d0f6d29f72b2bd70d0e93b6
6
+ metadata.gz: ae398bf331eb4735385def97fc8457725a8860c8fd50940fa38428c64b47dcea430b04599c4407ca1665d26822949d0d999c582376b795f5e8a8ab8505fdc3fa
7
+ data.tar.gz: 522a8a16fe6b5317cf5ec362627d8b866990f42e3b7b75ff1b6fc04d4bb29246b6e6a8619bd4a3fdafca2d74c5a8912a0d9d08ec18a1cc7194f7e581fb083df5
@@ -1,3 +1,3 @@
1
1
  module ViewSourceMap
2
- VERSION = "0.0.9"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -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
- return true if options[:locals][:view_source_map] == false
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.9
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-09-16 00:00:00.000000000 Z
11
+ date: 2014-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails