From 90db2b1e4557aa098a0f4ab155312e3d730a67f9 Mon Sep 17 00:00:00 2001 From: Phil Hagelberg Date: Sun, 4 Nov 2007 19:37:37 -0500 Subject: [PATCH] expanding the web site --- Manifest.txt | 7 +++++-- Rakefile | 16 ++++++++++++++- bin/augment | 12 ++++++++--- html/index.html | 59 ----------------------------------------------------- html/src/html.erb | 29 ++++++++++++++++++++++++++ html/src/index.html | 43 ++++++++++++++++++++++++++++++++++++++ html/style.css | 36 ++++++++++++++++++++++++++++++++ 7 files changed, 137 insertions(+), 65 deletions(-) delete mode 100644 html/index.html create mode 100644 html/src/html.erb create mode 100644 html/src/index.html create mode 100644 html/style.css diff --git a/Manifest.txt b/Manifest.txt index 2f66422..3953975 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -13,18 +13,21 @@ lib/backends/flog_backend.rb lib/backends/test_unit_backend.rb lib/frontends/ansi_color_frontend.rb lib/frontends/augment.el -lib/frontends/augment.el -lib/frontends/frontend.rb lib/frontends/frontend.rb lib/frontends/html_frontend.rb lib/layer.rb +lib/flet.rb spec/ansi_frontend_spec.rb spec/color_backend_spec.rb spec/emacs-frontend-test.el +spec/layer_spec.rb spec/fixtures/augment-output.txt spec/fixtures/drinks/lib/drink.rb spec/fixtures/drinks/test/test_drink.rb spec/fixtures/layers.json +spec/fixtures/fix_test.rb +spec/fixtures/working_test.rb spec/html_frontend_spec.rb spec/spec_helper.rb spec/test_backend_spec.rb +spec/flog_backend_spec.rb diff --git a/Rakefile b/Rakefile index a957c6f..8b9a995 100644 --- a/Rakefile +++ b/Rakefile @@ -2,6 +2,7 @@ require 'rubygems' require 'hoe' +require 'erb' require 'spec/rake/spectask' require './lib/augment.rb' @@ -18,7 +19,20 @@ Hoe.new('augment', Augment::VERSION) do |p| end task :publish_html do - system("scp -r html/* technomancy@rubyforge.org:/var/www/gforge-projects/augment/") + system("scp html/* technomancy@rubyforge.org:/var/www/gforge-projects/augment/") +end + +task :render_html do + FileUtils.cd(File.dirname(__FILE__) + '/html/src/') + TEMPLATE = File.read('html.erb') + Dir.glob('*html').each do |filename| + @title = filename.match(/(.*)\.html/)[1].gsub(/_/, ' ').capitalize + @title = "Augment" if @title == 'Index' # edge case! + @body = File.read(filename) + + html = ERB.new(TEMPLATE).result( binding ) + File.open("../#{filename}", 'w') { |f| f.puts html } + end end Spec::Rake::SpecTask.new diff --git a/bin/augment b/bin/augment index 9e87c78..906c029 100755 --- a/bin/augment +++ b/bin/augment @@ -3,13 +3,19 @@ $LOAD_PATH << File.dirname(__FILE__) + '/../lib' require 'augment' +# TODO: real option parsing? if ARGV.first == '--interactive' Augment.interactive exit 0 elsif ARGV.size != 2 - puts "Usage: augment BACKEND/FRONTEND FILE" - puts " or: augment --interactive" - puts "Output or store metadata regarding code." + puts "Usage: augment BACKEND/FRONTEND FILE + or: augment --interactive +Output or store metadata regarding code. + +Available backends: +#{Augment::BACKENDS.map { |k, v| " #{k}:#{v}"}.join("\n")} +Available frontends: +#{Augment::FRONTENDS.map { |k, v| " #{k}:#{v}"}.join("\n")}" exit 1 end diff --git a/html/index.html b/html/index.html deleted file mode 100644 index e172569..0000000 --- a/html/index.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - Augment - - - - - -
- - - sample - -

Augment is a system for gathering metadata from code and - displaying it. This metadata would include test failures, test - coverage levels, complexity metrics, and others. Display - frontends will be pluggable so as to interface with many - editors and environments.

- -

For now: svn co svn://rubyforge.org/var/svn/augment. - Gems will be available when we've got something worth releasing.

- -

Augment came out of - a talk - from Rubyconf 2007.

- - -
- - diff --git a/html/src/html.erb b/html/src/html.erb new file mode 100644 index 0000000..c507dfc --- /dev/null +++ b/html/src/html.erb @@ -0,0 +1,29 @@ + + + + + <%= @title %> + + + + + +
+ + <%= @body %> +
+ +
+ + diff --git a/html/src/index.html b/html/src/index.html new file mode 100644 index 0000000..7353467 --- /dev/null +++ b/html/src/index.html @@ -0,0 +1,43 @@ + sample + +

Augment is a system for gathering metadata from code and + displaying it. This metadata will include test + failures, test coverage levels, complexity metrics, and + others. The display frontends are pluggable so as to interface + with many editors and environments.

+ +

You can gem install augment to play around with it.

+ +

Usage

+ +

Ideally you would rarely use augment directly, but rather you + would interact with it from within whatever environment + you use as an editor. How you use augment is highly dependent on + what editor you're using to interact with it. Augment currently + supports these editors:

+ + + +

As you can see, that's a short list. If you'd like to + implement augment support for your editor, it's pretty easy. See + the writing a frontend guide for + details.

+ +

Augment works by running a set of backends + on a file to gather metadata about it and passing off that + metadata to frontends that get feedback to the user.

+ +

Development

+ +

Grab the source: git://repo.or.cz/augment.git

+ +

Hop on the mailing list to coordinate.

+ +

Inspiration

+ +

Augment came out of + a talk + from Rubyconf 2007.

diff --git a/html/style.css b/html/style.css new file mode 100644 index 0000000..7b1c0c8 --- /dev/null +++ b/html/style.css @@ -0,0 +1,36 @@ +body { + font-family: Verdana, "Lucida Sans", sans-serif; +} + +h1, h2, h3, h4 { + color: #8D1618; +} + +#header { + padding-bottom: 1em; +} + +#nav li { + float: left; + list-style-type: none; + padding-left: 2em; + padding-bottom: 1em; +} + +#header hr { + clear: both; +} + +a { + color: #AB0003; +} + +a:hover { + background-color: #FFF3F3; +} + +p#copyright { + font-size: 80%; +} + +hr { height: 1px; } -- 2.11.4.GIT