whiny_rendering 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest +5 -0
- data/README.rdoc +0 -0
- data/Rakefile +14 -0
- data/lib/whiny_rendering.rb +37 -0
- data/rails/init.rb +2 -0
- data/whiny_rendering.gemspec +30 -0
- metadata +74 -0
data/Manifest
ADDED
data/README.rdoc
ADDED
File without changes
|
data/Rakefile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
require 'echoe'
|
4
|
+
|
5
|
+
Echoe.new('whiny_rendering', '0.1.0') do |g|
|
6
|
+
g.description = "Add a helper that will be explicitly whiny about what templates and/or partials are being rendered."
|
7
|
+
g.url = "http://github.com/philcrissman/whiny_rendering"
|
8
|
+
g.author = "Phil Crissman"
|
9
|
+
g.email = "phil@betadeluxe.com"
|
10
|
+
g.ignore_pattern = ["tmp/*", "script/*"]
|
11
|
+
g.development_dependencies = []
|
12
|
+
end
|
13
|
+
|
14
|
+
Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |ext| load ext }
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module WhinyRendering
|
2
|
+
|
3
|
+
def whiny_rendering
|
4
|
+
unless @_memoized__pick_partial_template.nil?
|
5
|
+
partials = @_memoized__pick_partial_template.map do |p|
|
6
|
+
p[1].instance_variable_get(:"@_memoized_path")
|
7
|
+
end
|
8
|
+
else
|
9
|
+
partials = []
|
10
|
+
end
|
11
|
+
div = <<-EOD
|
12
|
+
<div id='whiny_rendering'>
|
13
|
+
Controller <strong>#{ @controller.controller_name}</strong> and action <strong>#{ @controller.action_name }</strong>
|
14
|
+
rendering template <strong>#{ @_first_render.instance_variable_get(:"@_memoized_path")}</strong>.
|
15
|
+
#{ "Rendering partials: <strong>" + partials.join(', ') + "</strong>" unless partials.empty? }
|
16
|
+
</div>
|
17
|
+
EOD
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
# Controller <strong><%= @controller.controller_name %></strong>
|
25
|
+
# and action <strong><%= @controller.action_name %></strong>
|
26
|
+
# rendering template: <strong><%= @_first_render.instance_variable_get(:"@_memoized_path") %></strong>
|
27
|
+
# <% unless @_memoized__pick_partial_template.nil? %>
|
28
|
+
# <br />Rendering partials:
|
29
|
+
# <% @_memoized__pick_partial_template.each do |p| %>
|
30
|
+
# <%# skip the rendering/rendering partial in the list. %>
|
31
|
+
# <% next if p[1].instance_variable_get(:"@_memoized_path")[0].match(/rendering\/_rendering/) %>
|
32
|
+
# | <strong><%= p[1].instance_variable_get(:"@_memoized_path") %></strong>
|
33
|
+
#
|
34
|
+
# <% end %>
|
35
|
+
# <% else %>
|
36
|
+
# nil
|
37
|
+
# <% end %>
|
data/rails/init.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{whiny_rendering}
|
5
|
+
s.version = "0.1.0"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Phil Crissman"]
|
9
|
+
s.date = %q{2010-06-18}
|
10
|
+
s.description = %q{Add a helper that will be explicitly whiny about what templates and/or partials are being rendered.}
|
11
|
+
s.email = %q{phil@betadeluxe.com}
|
12
|
+
s.extra_rdoc_files = ["README.rdoc", "lib/whiny_rendering.rb"]
|
13
|
+
s.files = ["README.rdoc", "Rakefile", "lib/whiny_rendering.rb", "rails/init.rb", "Manifest", "whiny_rendering.gemspec"]
|
14
|
+
s.homepage = %q{http://github.com/philcrissman/whiny_rendering}
|
15
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Whiny_rendering", "--main", "README.rdoc"]
|
16
|
+
s.require_paths = ["lib"]
|
17
|
+
s.rubyforge_project = %q{whiny_rendering}
|
18
|
+
s.rubygems_version = %q{1.3.6}
|
19
|
+
s.summary = %q{Add a helper that will be explicitly whiny about what templates and/or partials are being rendered.}
|
20
|
+
|
21
|
+
if s.respond_to? :specification_version then
|
22
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
23
|
+
s.specification_version = 3
|
24
|
+
|
25
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
26
|
+
else
|
27
|
+
end
|
28
|
+
else
|
29
|
+
end
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: whiny_rendering
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
version: 0.1.0
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Phil Crissman
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-06-18 00:00:00 -05:00
|
18
|
+
default_executable:
|
19
|
+
dependencies: []
|
20
|
+
|
21
|
+
description: Add a helper that will be explicitly whiny about what templates and/or partials are being rendered.
|
22
|
+
email: phil@betadeluxe.com
|
23
|
+
executables: []
|
24
|
+
|
25
|
+
extensions: []
|
26
|
+
|
27
|
+
extra_rdoc_files:
|
28
|
+
- README.rdoc
|
29
|
+
- lib/whiny_rendering.rb
|
30
|
+
files:
|
31
|
+
- README.rdoc
|
32
|
+
- Rakefile
|
33
|
+
- lib/whiny_rendering.rb
|
34
|
+
- rails/init.rb
|
35
|
+
- Manifest
|
36
|
+
- whiny_rendering.gemspec
|
37
|
+
has_rdoc: true
|
38
|
+
homepage: http://github.com/philcrissman/whiny_rendering
|
39
|
+
licenses: []
|
40
|
+
|
41
|
+
post_install_message:
|
42
|
+
rdoc_options:
|
43
|
+
- --line-numbers
|
44
|
+
- --inline-source
|
45
|
+
- --title
|
46
|
+
- Whiny_rendering
|
47
|
+
- --main
|
48
|
+
- README.rdoc
|
49
|
+
require_paths:
|
50
|
+
- lib
|
51
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
segments:
|
56
|
+
- 0
|
57
|
+
version: "0"
|
58
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
segments:
|
63
|
+
- 1
|
64
|
+
- 2
|
65
|
+
version: "1.2"
|
66
|
+
requirements: []
|
67
|
+
|
68
|
+
rubyforge_project: whiny_rendering
|
69
|
+
rubygems_version: 1.3.6
|
70
|
+
signing_key:
|
71
|
+
specification_version: 3
|
72
|
+
summary: Add a helper that will be explicitly whiny about what templates and/or partials are being rendered.
|
73
|
+
test_files: []
|
74
|
+
|