Changeset 242

Show
Ignore:
Timestamp:
02/28/08 11:29:07 (8 months ago)
Author:
rob
Message:

add hyperlink to url in question in the detail report

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • rubygems/tarantula/trunk

    • Property svn:ignore set to
      tmp
  • rubygems/tarantula/trunk/lib/relevance/tarantula/detail.html.erb

    r240 r242  
    1717    <h1>Tarantula report detail <%= short_description %></h1> 
    1818    <p>Generated on <%= Time.now %> (<a href="index.html">Top</a>)</p> 
     19    <p>Visit <a href="<%= full_url %>"><%= full_url %></a></p> 
    1920    <p>Response: <%= code %></p> 
    2021    <p>Referrer: <%= referrer || "" %></p> 
  • rubygems/tarantula/trunk/lib/relevance/tarantula/result.rb

    r202 r242  
    11class Relevance::Tarantula::Result 
    22  HASHABLE_ATTRS = [:success, :method, :url, :response, :referrer, :data, :description, :log] 
     3  DEFAULT_LOCALHOST = "http://localhost:3000" 
    34  attr_accessor *HASHABLE_ATTRS 
    45  include Relevance::Tarantula 
     
    2425  def body 
    2526    response && response.body 
     27  end 
     28  def full_url 
     29    "#{DEFAULT_LOCALHOST}#{url}" 
    2630  end 
    2731  ALLOW_NNN_FOR = /^allow_(\d\d\d)_for$/ 
  • rubygems/tarantula/trunk/test/relevance/tarantula/result_test.rb

    r191 r242  
    1919    @result.sequence_number.should == 1 
    2020    @result.class.next_number.should == 1 
     21  end 
     22   
     23  it "has link to the url at localhost" do 
     24    @result.full_url.should == "http://localhost:3000/some/url?arg1=foo&arg2=bar" 
    2125  end 
    2226