ruhl 0.22.0 → 0.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/ruhl/sinatra.rb +16 -0
  3. data/ruhl.gemspec +4 -4
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.22.0
1
+ 0.23.0
data/lib/ruhl/sinatra.rb CHANGED
@@ -27,3 +27,19 @@ module Sinatra
27
27
  end
28
28
  end
29
29
  end
30
+
31
+ module Ruhl
32
+ class Engine
33
+ private
34
+
35
+ def render_partial
36
+ views = scope.class.views || "./views"
37
+
38
+ data, filename, line = scope.send :lookup_template, :ruhl, call_result.to_sym, views
39
+
40
+ raise PartialNotFoundError.new(call_result) unless data
41
+
42
+ render_nodes Nokogiri::HTML.fragment(data)
43
+ end
44
+ end
45
+ end
data/ruhl.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ruhl}
8
- s.version = "0.22.0"
8
+ s.version = "0.23.0"
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"]
12
- s.date = %q{2009-12-14}
12
+ s.date = %q{2009-12-22}
13
13
  s.description = %q{Make your HTML dynamic with the addition of a data-ruhl attribute.}
14
14
  s.email = %q{andy@stonean.com}
15
15
  s.extra_rdoc_files = [
@@ -63,8 +63,8 @@ Gem::Specification.new do |s|
63
63
  s.rubygems_version = %q{1.3.5}
64
64
  s.summary = %q{Ruby Hypertext Language}
65
65
  s.test_files = [
66
- "spec/ruhl_spec.rb",
67
- "spec/spec_helper.rb"
66
+ "spec/spec_helper.rb",
67
+ "spec/ruhl_spec.rb"
68
68
  ]
69
69
 
70
70
  if s.respond_to? :specification_version then
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.22.0
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Stone
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-14 00:00:00 -05:00
12
+ date: 2009-12-22 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -110,5 +110,5 @@ signing_key:
110
110
  specification_version: 3
111
111
  summary: Ruby Hypertext Language
112
112
  test_files:
113
- - spec/ruhl_spec.rb
114
113
  - spec/spec_helper.rb
114
+ - spec/ruhl_spec.rb