Commits

Michael Granger committed 5d3af66

Start work on the templates

  • Participants
  • Parent commits 8fe8d31

Comments (0)

Files changed (5)

 
 # Sign gems
 Hoe.plugin :signing
+Hoe.plugin :mercurial
+Hoe.plugin :deveiate
 
-Hoe.spec 'Strelka-FancyErrors' do
+Hoe.spec 'strelka-fancyerrors' do
 	self.readme_file = 'README.rdoc'
 	self.history_file = 'History.rdoc'
 	self.extra_rdoc_files = FileList[ '*.rdoc' ]
 
-	self.developer 'FIX', 'FIX' # (name, email)
+	self.developer 'Michael Granger', 'ged@FaerieMUD.org'
 
 	self.dependency 'strelka', '~> 0.1'
-	self.dependency 'rspec', '~> 2.7', :developer
+	self.dependency 'inversion', '~> 0.9'
+	self.dependency 'hoe-deveiate', '~> 0.1', :developer
 
-	self.require_ruby_version( '~> 1.9' )
+	self.spec_extras[:licenses] = ["BSD"]
+	self.spec_extras[:rdoc_options] = ['-f', 'fivefish', '-t', 'Strelka Web Application Toolkit']
+	self.require_ruby_version( '>=1.9.2' )
+	self.hg_sign_tags = true if self.respond_to?( :hg_sign_tags= )
+	self.check_history_on_release = true if self.respond_to?( :check_history_on_release= )
+
+	self.rdoc_locations << "deveiate:/usr/local/www/public/code/#{remote_rdoc_dir}"
 end
 
+ENV['VERSION'] ||= hoespec.spec.version.to_s
+
+# Ensure the specs pass before checking in
+task 'hg:precheckin' => [:check_manifest, :check_history, :spec]
+
+# Rebuild the ChangeLog immediately before release
+task :prerelease => [:check_manifest, :check_history, 'ChangeLog']
+
+task :check_manifest => 'ChangeLog'
+
+
+desc "Build a coverage report"
+task :coverage do
+	ENV["COVERAGE"] = 'yes'
+	Rake::Task[:spec].invoke
+end
+

File data/strelka-fancyerrors/templates/client.tmpl

+<!-- FIX (set up the main content template) -->
+
+<p>Your request looked this:</p>
+
+<pre><code>
+<?prettyprint request ?>
+</code></pre>
+

File data/strelka-fancyerrors/templates/layout.tmpl

 <!DOCTYPE html>
 <html>
-	<head>
-		<title>
-			FIX (application title)
-		</title>
-	</head>
-	<body>
-		<!-- FIX (set up the main layout template) -->
-		<?attr body ?>
-	</body>
+<head>
+	<title><?subscribe title || Error ?></title>
+</head>
+<body>
+
+	<?attr body ?>
+
+</body>
 </html>
 

File data/strelka-fancyerrors/templates/server.tmpl

+<?import request ?>
+
+<header>
+	<hgroup>
+		<h1><?call status_info[:status] ?></h1>
+	</hgroup>
+</header>
+
+<section id="backtrace">
+	<ol>
+<?for frame in status_info[:backtrace] ?>
+		<li><?escape frame ?></li>
+<?end for ?>
+	</ol>
+</section>
+
+<section id="request">
+<pre><code>
+	<?prettyprint request ?>
+</code></pre>
+</section>
+
+<section id="headers">
+	<table>
+		<tbody>
+<?for name,val in request.header.each ?>
+		<tr><th><?escape name ?></th><td><?escape val ?></td></tr>
+<?end for ?>
+		</tbody>
+	</table>
+</section>
+
+<section id="stack">
+	
+</section>

File data/strelka-fancyerrors/templates/top.tmpl

-<!-- FIX (set up the main content template) -->
-
-<p>Your request looked this:</p>
-
-<pre><code>
-<?prettyprint request ?>
-</code></pre>
-