public
Description: Augment is a system for gathering metadata from code and displaying it.
Homepage: http://augment.rubyforge.org
Clone URL: git://github.com/technomancy/augment.git
expanding the web site
Phil Hagelberg (author)
Sun Nov 04 16:37:37 -0800 2007
commit  90db2b1e4557aa098a0f4ab155312e3d730a67f9
tree    23870b5b894e6440d74603d1929ad931eb955001
parent  e4cf6e9eeb4e266483cb3a0edce7631a08e6ec33
...
13
14
15
16
17
18
19
20
 
21
22
23
 
24
25
26
27
 
 
28
29
30
 
...
13
14
15
 
 
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
0
@@ -13,18 +13,21 @@ lib/backends/flog_backend.rb
0
 lib/backends/test_unit_backend.rb
0
 lib/frontends/ansi_color_frontend.rb
0
 lib/frontends/augment.el
0
-lib/frontends/augment.el
0
-lib/frontends/frontend.rb
0
 lib/frontends/frontend.rb
0
 lib/frontends/html_frontend.rb
0
 lib/layer.rb
0
+lib/flet.rb
0
 spec/ansi_frontend_spec.rb
0
 spec/color_backend_spec.rb
0
 spec/emacs-frontend-test.el
0
+spec/layer_spec.rb
0
 spec/fixtures/augment-output.txt
0
 spec/fixtures/drinks/lib/drink.rb
0
 spec/fixtures/drinks/test/test_drink.rb
0
 spec/fixtures/layers.json
0
+spec/fixtures/fix_test.rb
0
+spec/fixtures/working_test.rb
0
 spec/html_frontend_spec.rb
0
 spec/spec_helper.rb
0
 spec/test_backend_spec.rb
0
+spec/flog_backend_spec.rb
...
2
3
4
 
5
6
7
...
18
19
20
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
23
24
...
2
3
4
5
6
7
8
...
19
20
21
 
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
0
@@ -2,6 +2,7 @@
0
 
0
 require 'rubygems'
0
 require 'hoe'
0
+require 'erb'
0
 require 'spec/rake/spectask'
0
 require './lib/augment.rb'
0
 
0
@@ -18,7 +19,20 @@ Hoe.new('augment', Augment::VERSION) do |p|
0
 end
0
 
0
 task :publish_html do
0
- system("scp -r html/* technomancy@rubyforge.org:/var/www/gforge-projects/augment/")
0
+ system("scp html/* technomancy@rubyforge.org:/var/www/gforge-projects/augment/")
0
+end
0
+
0
+task :render_html do
0
+ FileUtils.cd(File.dirname(__FILE__) + '/html/src/')
0
+ TEMPLATE = File.read('html.erb')
0
+ Dir.glob('*html').each do |filename|
0
+ @title = filename.match(/(.*)\.html/)[1].gsub(/_/, ' ').capitalize
0
+ @title = "Augment" if @title == 'Index' # edge case!
0
+ @body = File.read(filename)
0
+
0
+ html = ERB.new(TEMPLATE).result( binding )
0
+ File.open("../#{filename}", 'w') { |f| f.puts html }
0
+ end
0
 end
0
 
0
 Spec::Rake::SpecTask.new
...
3
4
5
 
6
7
8
9
10
11
12
 
 
 
 
 
 
 
 
13
14
15
...
3
4
5
6
7
8
9
10
 
 
 
11
12
13
14
15
16
17
18
19
20
21
0
@@ -3,13 +3,19 @@ $LOAD_PATH << File.dirname(__FILE__) + '/../lib'
0
 
0
 require 'augment'
0
 
0
+# TODO: real option parsing?
0
 if ARGV.first == '--interactive'
0
   Augment.interactive
0
   exit 0
0
 elsif ARGV.size != 2
0
- puts "Usage: augment BACKEND/FRONTEND FILE"
0
- puts " or: augment --interactive"
0
- puts "Output or store metadata regarding code."
0
+ puts "Usage: augment BACKEND/FRONTEND FILE
0
+ or: augment --interactive
0
+Output or store metadata regarding code.
0
+
0
+Available backends:
0
+#{Augment::BACKENDS.map { |k, v| " #{k}:#{v}"}.join("\n")}
0
+Available frontends:
0
+#{Augment::FRONTENDS.map { |k, v| " #{k}:#{v}"}.join("\n")}"
0
   exit 1
0
 end
0
 

Comments

    No one has commented yet.