render_debug 0.1.0 → 0.1.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: feae5b64adcd668b1a03a522debc231a4495e1d1
4
- data.tar.gz: e128a07de6e337ffe9e12b07cce390271c58e63e
3
+ metadata.gz: 33f006a06c607e0d8d8ce2d4990ffad50204a02b
4
+ data.tar.gz: b581f2b5e821d19395988474ce7688a794cb1322
5
5
  SHA512:
6
- metadata.gz: 9f2f77615eb73305842965046a2d6448cae7bdcce1e1983784fb579b9f7968e964a01e91ed1979c1495850f57554f91392db6f9b2b62662b9f4012232f356035
7
- data.tar.gz: caf6f2cc74e8394ed8850a9f5acb08796bc62d0753a4fad866c9b08d02488381f5934bcdad554a3c4625e5cc7cf92dcfcef7c488e40c88bd4d65e32636ee28ff
6
+ metadata.gz: 8ff6ecbb719cf49ea5bd268e5f58d7f5f030fa2d8fbf436134ad4b3801f242e48778af213049659516e3ea13181346995cca18e895f27d36c12c5872290b6bf5
7
+ data.tar.gz: 2b1b0260b0c4bed5cc6745fecc28c37f4eba64edbbe2d71d30dfc9563fb3e725bf41b8354d46ea2df285a7dac36ace57ae59f845f163369e1765a34c4c230fa1
data/Rakefile CHANGED
@@ -8,9 +8,8 @@ require 'rdoc/task'
8
8
 
9
9
  RDoc::Task.new(:rdoc) do |rdoc|
10
10
  rdoc.rdoc_dir = 'rdoc'
11
- rdoc.title = 'RenderVariant'
11
+ rdoc.title = 'RenderDebug'
12
12
  rdoc.options << '--line-numbers'
13
- rdoc.rdoc_files.include('README.rdoc')
14
13
  rdoc.rdoc_files.include('lib/**/*.rb')
15
14
  end
16
15
 
@@ -5,12 +5,19 @@ module RenderDebug
5
5
  alias_method_chain :render, :callout
6
6
  end
7
7
 
8
- def render_with_callout(context, options, block)
9
- initial_render = render_without_callout(context, options, block)
10
- if(@path)
11
- "<!-- TEMPLATE : #{@path} -->#{initial_render}<!-- END TEMPLATE #{@path}-->".html_safe
8
+ def render_with_callout(context, options)
9
+ initial_render = render_without_callout(context, options)
10
+ tag = ""
11
+ if(options[:partial])
12
+ tag = "PARTIAL #{options[:partial]}"
13
+ elsif(options[:template])
14
+ tag = "ACTION #{options[:template]} INVOKED FROM #{context.controller.class.to_s}"
15
+ end
16
+
17
+ if(tag.blank?)
18
+ initial_render.html_safe
12
19
  else
13
- "<!-- TEMPLATE : ??? -->#{initial_render}<!-- END TEMPLATE ???-->".html_safe
20
+ "<!-- #{tag} -->#{initial_render}<!-- END #{tag}-->".html_safe
14
21
  end
15
22
  end
16
23
  end
@@ -2,7 +2,7 @@ module RenderDebug
2
2
  class Railtie < Rails::Railtie
3
3
  initializer "render_debug.setup" do |app|
4
4
  ActiveSupport.on_load(:action_view) do
5
- ActionView::PartialRenderer.send(:include, RenderDebug::PreRenderCallout)
5
+ ActionView::Renderer.send(:include, RenderDebug::PreRenderCallout)
6
6
  end
7
7
  end
8
8
  end
@@ -1,3 +1,3 @@
1
1
  module RenderDebug
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: render_debug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - alex