ruhl 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/Rakefile +1 -0
  2. data/VERSION +1 -1
  3. data/lib/ruhl/rails.rb +17 -1
  4. data/ruhl.gemspec +1 -1
  5. metadata +1 -1
data/Rakefile CHANGED
@@ -26,6 +26,7 @@ begin
26
26
  gemspec.add_dependency('nokogiri','>=1.3.3')
27
27
  gemspec.add_development_dependency('rspec')
28
28
  end
29
+ Jeweler::GemcutterTasks.new
29
30
  rescue LoadError
30
31
  puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
31
32
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.4
1
+ 0.9.5
data/lib/ruhl/rails.rb CHANGED
@@ -13,7 +13,6 @@ module Ruhl
13
13
  options[:layout] = layout.filename
14
14
  options[:layout_source] = layout.source
15
15
 
16
- Rails.logger.info("calling ruhl. template: #{template.inspect}\n options: #{options.inspect}")
17
16
  Ruhl::Engine.new(template.source, options).render(@action_view)
18
17
  end
19
18
  end
@@ -23,3 +22,20 @@ ActionView::Template.register_template_handler(:ruhl, Ruhl::Plugin)
23
22
 
24
23
  ActionView::Template.exempt_from_layout(:ruhl)
25
24
 
25
+
26
+ module Ruhl
27
+ class Engine
28
+ private
29
+
30
+ def render_partial(tag, code)
31
+ file = execute_ruby(tag, code)
32
+
33
+ template = scope.view_paths.find_template(file)
34
+
35
+ raise PartialNotFoundError.new(file) unless template
36
+
37
+ render_file( template.source )
38
+ end
39
+
40
+ end
41
+ end
data/ruhl.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ruhl}
8
- s.version = "0.9.4"
8
+ s.version = "0.9.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andrew Stone"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruhl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Stone