wonki 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/wonki/wiki_page.rb +1 -0
- data/test/wiki_page_test.rb +4 -0
- data/wonki.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/lib/wonki/wiki_page.rb
CHANGED
@@ -22,6 +22,7 @@ module Wonki
|
|
22
22
|
git_data = builder.build(path)
|
23
23
|
response_body = git_data[:content]
|
24
24
|
headers["Last-Modified"] = git_data[:last_modified].httpdate
|
25
|
+
headers["Etag"] = Digest::MD5.hexdigest(git_data[:content])
|
25
26
|
status = 200
|
26
27
|
rescue Wonki::PageNotFound
|
27
28
|
response_body = "Page Not Found"
|
data/test/wiki_page_test.rb
CHANGED
@@ -24,6 +24,10 @@ class WikiPageTest < Test::Unit::TestCase
|
|
24
24
|
should "set last modified" do
|
25
25
|
assert_equal(@headers["Last-Modified"], "Tue, 29 Dec 2009 06:56:38 GMT")
|
26
26
|
end
|
27
|
+
|
28
|
+
should "set etag" do
|
29
|
+
assert_not_nil @headers['Etag']
|
30
|
+
end
|
27
31
|
end
|
28
32
|
|
29
33
|
context "PageNotFound" do
|
data/wonki.gemspec
CHANGED