serve 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/History.txt CHANGED
@@ -1,6 +1,14 @@
1
+ == 0.9.4 (January 31, 2008)
2
+
3
+ * Small fix for calculating the partial name in render_partial.
4
+
5
+ == 0.9.3 (January 23, 2008)
6
+
7
+ * Added support for layouts and partials for HAML documents.
8
+
1
9
  == 0.9.2 (January 17, 2008)
2
10
 
3
- * Added support for redirects
11
+ * Added support for redirects.
4
12
 
5
13
  == 0.9.1 (October 19, 2007)
6
14
 
data/lib/serve.rb CHANGED
@@ -144,7 +144,7 @@ module Serve #:nodoc:
144
144
  partial = partial[1..-1]
145
145
  path = @root
146
146
  end
147
- filename = File.join(path, "_" + partial + ".haml")
147
+ filename = partial_filename(File.join(path, partial))
148
148
  if File.file?(filename)
149
149
  lines = IO.read(filename)
150
150
  engine = Haml::Engine.new(lines, @engine_options)
@@ -153,6 +153,13 @@ module Serve #:nodoc:
153
153
  raise "File does not exist #{filename.inspect}"
154
154
  end
155
155
  end
156
+
157
+ def partial_filename(name)
158
+ path = File.dirname(name)
159
+ partial = File.basename(name)
160
+ partial = "_" + partial + ".haml"
161
+ File.join(path, partial)
162
+ end
156
163
  end
157
164
  end
158
165
 
@@ -209,4 +216,4 @@ module Serve #:nodoc:
209
216
  class Server < WEBrick::HTTPServer #:nodoc:
210
217
  end
211
218
 
212
- end
219
+ end
data/lib/serve/version.rb CHANGED
@@ -2,7 +2,7 @@ module Serve #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 9
5
- TINY = 3
5
+ TINY = 4
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.2
2
+ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: serve
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.9.3
7
- date: 2008-01-23 00:00:00 -05:00
6
+ version: 0.9.4
7
+ date: 2008-01-31 00:00:00 -05:00
8
8
  summary: Serve is a small Ruby script that makes it easy to start up a WEBrick server in any directory. Serve is ideal for HTML prototyping and simple file sharing. If the haml, redcloth, and bluecloth gems are installed serve can handle Haml, Sass, Textile, and Markdown (in addition to HTML).
9
9
  require_paths:
10
10
  - lib
metadata.gz.sig CHANGED
Binary file