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 CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
@@ -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"
@@ -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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{wonki}
8
- s.version = "0.0.4"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["rubyyot"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wonki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - rubyyot