diff --git a/dbpedialite.rb b/dbpedialite.rb index e5f09e5..27d4534 100644 --- a/dbpedialite.rb +++ b/dbpedialite.rb @@ -99,9 +99,10 @@ def format_iso8061(datetime) end get '/' do - headers 'Cache-Control' => 'public,max-age=3600' - @readme = RDiscount.new(File.read(File.join(File.dirname(__FILE__), 'README.md'))) - erb :index + headers 'Cache-Control' => 'public,max-age=31536000' + redirect "https://github.com/njh/dbpedialite", 301 + #@readme = RDiscount.new(File.read(File.join(File.dirname(__FILE__), 'README.md'))) + #erb :index end get %r{/search\.?([a-z]*)} do |format| diff --git a/spec/dbpedialite_spec.rb b/spec/dbpedialite_spec.rb index fc94e87..38c8451 100644 --- a/spec/dbpedialite_spec.rb +++ b/spec/dbpedialite_spec.rb @@ -25,28 +25,9 @@ def app get '/' end - it "should be successful" do - last_response.should be_ok - end - - it "should be of type text/html" do - last_response.content_type.should == 'text/html;charset=utf-8' - end - - it "should be cachable" do - last_response.headers['Cache-Control'].should =~ /max-age=([1-9]+)/ - end - - it "should have CORS enabled" do - last_response.headers['Access-Control-Allow-Origin'].should == '*' - end - - it "should contain the readme text" do - last_response.body.should =~ /take some of the structured data/ - end - - it "should contain the bookmarklet" do - last_response.body.should =~ %r|javascript:location.href='http://example.org/flipr\?url=| + it "should redirect" do + last_response.status.should == 301 + last_response.location.should == 'https://github.com/njh/dbpedialite' end it "should be cachable" do