forked from ianwhite/rspec-dev
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a3a524
commit b321d9c
Showing
81 changed files
with
12,480 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ example_rails_app/vendor | |
*.ipr | ||
*.iws | ||
*~ | ||
website/output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
The RSpec website is built with webby-0.9.2. You should be able to build and | ||
see it with these simple steps (standing in the same directory as this | ||
README): | ||
|
||
== Build the site | ||
|
||
webby build | ||
|
||
== Rebuild the site | ||
|
||
webby rebuild | ||
|
||
== Start the webserver | ||
|
||
webby heel:start | ||
|
||
== Stop the webserver | ||
|
||
webby heel:stop | ||
|
||
== Learn about other tasks | ||
|
||
webby -T | ||
|
||
== Learn about the webby command | ||
|
||
webby -h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
task :default => :build | ||
|
||
desc 'deploy the site to the webserver' | ||
task :deploy => [:build, 'deploy:rsync'] | ||
|
||
# EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
extension: html | ||
filter: erb | ||
--- | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{lang:}"> | ||
<head> | ||
<title>RSpec-<%= rspec_version %>: <%= @page.title %></title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<meta name="description" content="RSpec, {title: }, BDD, behaviour driven development, behavior driven development, TDD, test driven development, Ruby, Rails, testing, watir, selenium"/> | ||
|
||
<!-- CodeRay syntax highlighting CSS --> | ||
<link rel="stylesheet" href="/css/coderay.css" type="text/css" /> | ||
|
||
<!-- Homepage CSS --> | ||
<link rel="stylesheet" href="/css/breadcrumbs.css" type="text/css" media="screen, projection" /> | ||
<link rel="stylesheet" href="/css/default.css" type="text/css" media="screen, projection" /> | ||
|
||
<style><!-- | ||
div.breadcrumbs ul li { | ||
background-image: url(/images/arrow.gif); | ||
} | ||
--></style> | ||
</head> | ||
<body> | ||
|
||
<div id="container"> | ||
<div id="header"> | ||
<h1><a href='/'>RSpec <%= rspec_version %></a></h1> | ||
</div> | ||
|
||
<%= breadcrumb_menu(@page) %> | ||
|
||
<div id="content"> | ||
<%= @content %> | ||
|
||
<div id="footer"> | ||
Webdesign by <a href="http://www.oswd.org/user/profile/id/9462">JM</a> | ||
<div style="float:right;align"> | ||
<table border="0" padding="2"> | ||
<tr> | ||
<td valign="top" align="right"> | ||
<a href="http://engineyard.com">Hosted by our<br/>good friends at<br/>Engine Yard</a> | ||
</td> | ||
<td> | ||
<a href="http://engineyard.com"><img src="/images/eylogo.gif" border="0"></a> | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
<SCRIPT type='text/javascript' language='JavaScript' src='http://www.ohloh.net/projects/4386;badge_js'></SCRIPT> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> | ||
</script> | ||
<script type="text/javascript"> | ||
_uacct = "UA-1889510-1"; | ||
urchinTracker(); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# breadcrumbs.rb | ||
|
||
module BreadcrumbsHelper | ||
# call-seq: | ||
# breadcrumbs( page ) => html | ||
# | ||
# Create breadcrumb links for the current page. This will return an HTML | ||
# <ul></ul> object. | ||
# | ||
def breadcrumbs( page ) | ||
list = ["<li>#{h(page.title)}</li>"] | ||
loop do | ||
page = @pages.parent_of(page) | ||
break if page.nil? | ||
list << "<li>#{link_to_page(page)}</li>" | ||
end | ||
list.reverse! | ||
|
||
html = "<ul class=\"breadcrumbs\">\n" | ||
html << list.join("\n") | ||
html << "\n</ul>\n" | ||
html | ||
end | ||
end # module Breadcrumbs | ||
|
||
Webby::Helpers.register(BreadcrumbsHelper) | ||
|
||
# EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
module Webby | ||
module Resources | ||
class DB | ||
def immediate_children( page, opts = {} ) | ||
root = page.dir == "" ? "" : "#{page.dir}/" | ||
rgxp = Regexp.new "\\A#{root}[^/]+$" | ||
keys = @db.keys.find_all {|k| rgxp =~ k} | ||
|
||
ary = keys.map {|k| @db[k]} | ||
ary.flatten! | ||
|
||
return ary unless opts.has_key? :sort_by | ||
|
||
m = opts[:sort_by] | ||
ary.sort! {|a,b| a.__send__(m) <=> b.__send__(m)} | ||
ary.reverse! if opts[:reverse] | ||
ary | ||
end | ||
end | ||
|
||
class Resource | ||
def link | ||
"<a href=\"#{url}\">#{title}</a>" | ||
end | ||
|
||
def order | ||
(@_meta_data['order'] || 10000).to_i | ||
end | ||
|
||
def path_from_root | ||
resources = [] | ||
resource = self | ||
while(resource) | ||
resources << resource | ||
resource = Webby::Resources.pages.parent_of(resource) | ||
end | ||
resources.reverse | ||
end | ||
|
||
def siblings | ||
Webby::Resources.pages.siblings(self).reject{|p| p.title.nil?} | ||
end | ||
|
||
def immediate_children | ||
Webby::Resources.pages.immediate_children(self).reject{|p| p.title.nil?}.select{|p| p.filename == 'index'} | ||
end | ||
end | ||
end | ||
|
||
require File.dirname(__FILE__) + '/../../example_rails_app/vendor/plugins/rspec/lib/spec/version' | ||
|
||
class Renderer | ||
def rspec_version | ||
Spec::VERSION::STRING | ||
end | ||
|
||
def svn_tag | ||
Spec::VERSION::TAG | ||
end | ||
|
||
def breadcrumb_menu(page) | ||
'<div class="breadcrumb-menu">' + breadcrumbs(page) + menu(page) + '</div>' | ||
end | ||
|
||
def breadcrumbs(page) | ||
b = binding | ||
ERB.new(<<-EOF, nil, '-').result(b) | ||
<div class="breadcrumbs"> | ||
<ul> | ||
<% page.path_from_root.each do |p| %> | ||
<% if p != page %> | ||
<li><%= p.link %></li> | ||
<% else %> | ||
<li class="current"><%= p.link %></li> | ||
<% end %> | ||
<% end %> | ||
</ul> | ||
</div> | ||
EOF | ||
end | ||
|
||
def menu(page) | ||
pages = if page.filename == 'index' | ||
(page.siblings + page.immediate_children).sort{|a,b| a.order <=> b.order} | ||
else | ||
[] | ||
end | ||
|
||
b = binding | ||
ERB.new(<<-EOF, nil, '-').result(b) | ||
<div class="menu"> | ||
<ul> | ||
<% pages.each do |p| %> | ||
<li> | ||
<%= p.link %> | ||
</li> | ||
<% end %> | ||
<% if page.url == '/' %> | ||
<li> | ||
<a href="/rdoc/">RDoc</a> | ||
</li> | ||
<li> | ||
<a href="/rdoc-rails/">RDoc-Rails</a> | ||
</li> | ||
<% end %> | ||
<% if page.url == '/documentation/rails' -%> | ||
<li> | ||
<a href="http://github.com/dchelimsky/rspec-rails/wikis/home">Install</a> | ||
</li> | ||
<% end -%> | ||
</ul> | ||
</div> | ||
EOF | ||
end | ||
|
||
end | ||
end | ||
|
||
# This patches a bug in webby-0.8.2 in which the coderay method fails to add a | ||
# newline resulting in webby formatting problems. | ||
module Webby::Helpers::CodeRayHelper | ||
alias :orig_coderay :coderay | ||
|
||
def coderay( *args, &block ) | ||
orig_coderay *args, &block | ||
buffer = eval('_erbout', block.binding) | ||
pos = buffer.length | ||
buffer[pos..-1] = "\n" | ||
return | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
|
||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
|
||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> | ||
<title>The page you were looking for doesn't exist (404)</title> | ||
<style type="text/css"> | ||
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } | ||
div.dialog { | ||
width: 25em; | ||
padding: 0 4em; | ||
margin: 4em auto 0 auto; | ||
border: 1px solid #ccc; | ||
border-right-color: #999; | ||
border-bottom-color: #999; | ||
} | ||
h1 { font-size: 100%; color: #f00; line-height: 1.5em; } | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<!-- This file lives in public/404.html --> | ||
<div class="dialog"> | ||
<h1>The page you were looking for doesn't exist.</h1> | ||
<p>You may have mistyped the address or the page may have moved.</p> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
|
||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
|
||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> | ||
<title>The change you wanted was rejected (422)</title> | ||
<style type="text/css"> | ||
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } | ||
div.dialog { | ||
width: 25em; | ||
padding: 0 4em; | ||
margin: 4em auto 0 auto; | ||
border: 1px solid #ccc; | ||
border-right-color: #999; | ||
border-bottom-color: #999; | ||
} | ||
h1 { font-size: 100%; color: #f00; line-height: 1.5em; } | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<!-- This file lives in public/422.html --> | ||
<div class="dialog"> | ||
<h1>The change you wanted was rejected.</h1> | ||
<p>Maybe you tried to change something you didn't have access to.</p> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
|
||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
|
||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> | ||
<title>We're sorry, but something went wrong (500)</title> | ||
<style type="text/css"> | ||
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } | ||
div.dialog { | ||
width: 25em; | ||
padding: 0 4em; | ||
margin: 4em auto 0 auto; | ||
border: 1px solid #ccc; | ||
border-right-color: #999; | ||
border-bottom-color: #999; | ||
} | ||
h1 { font-size: 100%; color: #f00; line-height: 1.5em; } | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<!-- This file lives in public/500.html --> | ||
<div class="dialog"> | ||
<h1>We're sorry, but something went wrong.</h1> | ||
<p>We've been notified about this issue and we'll take a look at it shortly.</p> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: Archive | ||
order: 8 | ||
filter: | ||
- erb | ||
- textile | ||
--- | ||
|
||
h2. <%= @page.title %> | ||
|
||
Here are docs for previous versions. | ||
|
||
<p> | ||
<a href="http://rspec.rubyforge.org/REL_1_0_8" target="_blank">1.0.8</a><br/> | ||
<a href="http://rspec.rubyforge.org/REL_0_9_4" target="_blank">0.9.4</a> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: CHANGES | ||
order: 3 | ||
filter: | ||
- erb | ||
- textile | ||
--- | ||
<pre><%= IO.read '../example_rails_app/vendor/plugins/rspec/History.txt' %></pre> |
Oops, something went wrong.