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
Search Repo:
updated to work with miniunit 1.1.0
Phil Hagelberg (author)
Fri Nov 09 09:39:13 -0800 2007
commit  3f72d206489885d27bcb6839cb054e7406fc6023
tree    f6db96c66bf4a15cf565305a2e1905a5164c45a3
parent  f5e32c93da67bb1e9888d954a2d62518d9a5dfa7
...
20
21
22
23
24
25
26
 
 
 
27
28
 
29
30
31
...
73
74
75
76
77
 
 
78
 
79
80
81
82
 
83
84
85
...
20
21
22
 
 
 
 
23
24
25
26
 
27
28
29
30
...
72
73
74
 
 
75
76
77
78
79
80
81
 
82
83
84
85
0
@@ -20,12 +20,11 @@ Example:
0
 
0
 $ augment test lib/foo.rb # will store metadata for test/test_foo.rb
0
 
0
-The various frontends have their own executables that provide access
0
-to the layer metadata once it's stored. The simplest frontend is
0
-+augment_color+ which outputs the layers via ANSI color codes to the
0
-shell:
0
+You can also use the +augment+ executable to display stored
0
+metadata. The simplest frontend is +color+ which outputs the
0
+layers via ANSI color codes to the shell:
0
 
0
-$ augment_color test/test_foo.rb
0
+$ augment color test/test_foo.rb
0
 
0
 Most other frontends are editor-specific.
0
 
0
@@ -73,13 +72,14 @@ Backends:
0
 Frontends:
0
 
0
 * ANSI color codes (for shells)
0
-* Emacs (planned)
0
-* Vim (planned)
0
+* HTML
0
+* Emacs
0
 * Textmate (planned)
0
+* Vim (planned, need help)
0
 
0
 == Issues
0
   
0
-* Not really, um, written yet.
0
+* A bit short on frontends and backends.
0
 
0
 == License
0
 
...
14
15
16
17
 
18
19
20
...
14
15
16
 
17
18
19
20
0
@@ -14,7 +14,7 @@ Hoe.new('augment', Augment::VERSION) do |p|
0
   p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
0
   p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
0
   p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
0
- p.extra_deps << ['miniunit', '>= 1.0.1']
0
+ p.extra_deps << ['miniunit', '>= 1.1.0']
0
   p.extra_deps << ['json', '>= 1.1.1']
0
 end
0
 
0
...
8
9
10
 
11
12
13
...
8
9
10
11
12
13
14
0
@@ -8,6 +8,7 @@ General:
0
  - allow "--interactive" use to specify what backends to use
0
  - allow for a broader range of colors (html colors?) (how to handle ANSI?)
0
  - overlapping layers?
0
+ - publish html+docs using rsync
0
 Emacs:
0
  - stability issues
0
  - augment-show-message
...
17
18
19
 
20
21
22
...
17
18
19
20
21
22
23
0
@@ -17,6 +17,7 @@
0
    <li><a href='index.html'>Home</a></li>
0
    <li><a href='frontends.html'>Frontends</a></li>
0
    <li><a href='backends.html'>Backends</a></li>
0
+ <li><a href='doc/'>RDoc</a></li>
0
    <li><a href='http://rubyforge.org/projects/augment'>Project Page</a></li>
0
   </ul>
0
   <hr />
...
46
47
48
49
 
50
51
52
...
46
47
48
 
49
50
51
52
0
@@ -46,7 +46,7 @@
0
 
0
       <p>Grab the source: <tt>git://repo.or.cz/augment.git</tt></p>
0
 
0
- <p>Hop on the <a href=''>mailing list</a> to coordinate.</p>
0
+ <p>Hop on the <a href='http://rubyforge.org/mail/?group_id=4606'>mailing list</a> to coordinate.</p>
0
       
0
       <h3>Inspiration</h3>
0
 
...
19
20
21
22
 
23
...
19
20
21
 
22
23
0
@@ -19,5 +19,5 @@
0
 
0
 <p>TODO: explain more stuff!</p>
0
 
0
-<p>Be sure to check on the <a href=''>mailing list</a> to coordinate
0
+<p>Be sure to check on the <a href='http://rubyforge.org/mail/?group_id=4606'>mailing list</a> to coordinate
0
   work for your editor. Someone may already be working on it.</p>
...
1
2
3
 
4
5
6
7
8
9
10
 
 
 
 
 
 
11
12
13
...
1
2
 
3
4
5
6
 
 
 
 
7
8
9
10
11
12
13
14
15
0
@@ -1,13 +1,15 @@
0
 Object.flet(:at_exit => lambda {}) do
0
   # keep miniunit's at_exit block from running
0
- gem 'miniunit', ">= 1.0.1"
0
+ gem 'miniunit', ">= 1.1.0"
0
   require 'test/unit'
0
 end
0
 
0
-module Test
0
- # Puke failures/errors in a bucket
0
- def Unit.puke(*args)
0
- TestUnitBackend.failure_bucket(*args)
0
+module MiniTest
0
+ class Unit
0
+ # Puke failures/errors in a bucket
0
+ def puke(*args)
0
+ TestUnitBackend.failure_bucket(*args)
0
+ end
0
   end
0
 end
0
 
...
4
5
6
7
8
 
 
 
9
10
11
12
13
14
15
16
17
18
19
 
 
 
 
 
 
 
 
 
 
20
21
22
...
4
5
6
 
 
7
8
9
10
 
 
 
 
 
 
 
 
11
 
12
13
14
15
16
17
18
19
20
21
22
23
24
0
@@ -4,19 +4,21 @@
0
 #
0
 # DON'T USE THIS! (unless your *really* mean it and there's no other way)
0
 #
0
-def Object.flet(bindings, &block)
0
- old_methods = {}
0
+class Object
0
+ def flet(bindings) # :nodoc:all
0
+ old_methods = {}
0
 
0
- bindings.each do |the_method, body|
0
- old_methods[the_method] = method(the_method)
0
- define_method(the_method, body)
0
- end
0
-
0
- begin
0
- block.call
0
- ensure
0
     bindings.each do |the_method, body|
0
- define_method(the_method) { |*args| old_methods[the_method].call(*args) }
0
+ old_methods[the_method] = method(the_method)
0
+ define_method(the_method, body)
0
+ end
0
+
0
+ begin
0
+ yield
0
+ ensure
0
+ bindings.each do |the_method, body|
0
+ define_method(the_method) { |*args| old_methods[the_method].call(*args) }
0
+ end
0
     end
0
   end
0
 end
...
12
13
14
15
 
16
17
18
19
20
21
 
 
 
22
23
24
...
73
74
75
76
 
77
78
79
80
81
 
82
83
84
85
 
86
...
12
13
14
 
15
16
17
18
19
20
 
21
22
23
24
25
26
...
75
76
77
 
78
79
80
81
82
83
84
85
86
 
87
88
89
0
@@ -12,13 +12,15 @@
0
 
0
 (require 'elunit) ;; See http://www.emacswiki.org/cgi-bin/wiki/ElUnit
0
 (require 'augment)
0
-(require 'flymake)
0
+(require 'flymake) ;; for flymake-read-file-to-string
0
 
0
 ;; in case it hasn't been properly installed
0
 (add-to-list 'exec-path (expand-file-name "../bin"))
0
 
0
 (elunit-clear-suites)
0
-(defsuite augment-suite nil)
0
+(lexical-let ((spec-dir (file-name-nondirectory (buffer-file-name (current-buffer)))))
0
+ (defsuite augment-suite nil :setup-hook (lambda () (cd spec-dir))))
0
+
0
 (augment-reset)
0
 
0
 (deftest layer-from-plist augment-suite
0
@@ -73,12 +75,13 @@
0
     (find-file "fixtures/fix_test.rb")
0
     (augment-initiate)
0
     (sleep-for 1)
0
- (assert-overlay 77)
0
+ (assert-overlay 88)
0
     (beginning-of-buffer)
0
     (replace-regexp "assert false" "assert true")
0
     (augment-initiate)
0
     (sleep-for 1)
0
     (assert-no-overlay 77)
0
+ (revert-buffer t t)
0
     (kill-buffer "fix_test.rb")))
0
   
0
-(elunit "augment-suite")
0
\ No newline at end of file
0
+(elunit-quiet "augment-suite")
0
\ No newline at end of file

Comments

    No one has commented yet.