public
Fork of ctran/annotate_models
Description: Annotate ActiveRecord models as a gem
Homepage: http://agilewebdevelopment.com/plugins/annotate_models
Clone URL: git://github.com/dustin/annotate_models.git
First usable release
ctran (author)
Thu Feb 28 14:33:52 -0800 2008
commit  304cb62b62141d3e5a197d6a7c33ff1f0cb94160
tree    749e55b2e06d573ae84417f74356731ed1408c73
parent  1da0386bf9e1ca3fbd0d9d3ae69cdc7a8cdc26fa
  • .gitignore
  • License.txt
  • Manifest.txt
  • config/hoe.rb
  • lib/annotate_models.rb
  • lib/annotate_models/version.rb
  • pkg/annotate_models-0.0.1.gem
  • pkg/annotate_models-0.0.1.tgz
  • pkg/annotate_models-0.0.1/History.txt
  • pkg/annotate_models-0.0.1/License.txt
  • pkg/annotate_models-0.0.1/Manifest.txt
  • pkg/annotate_models-0.0.1/README.txt
  • pkg/annotate_models-0.0.1/Rakefile
  • pkg/annotate_models-0.0.1/config/hoe.rb
  • pkg/annotate_models-0.0.1/config/requirements.rb
  • pkg/annotate_models-0.0.1/lib/annotate_models.rb
  • pkg/annotate_models-0.0.1/lib/annotate_models/version.rb
  • pkg/annotate_models-0.0.1/log/debug.log
  • pkg/annotate_models-0.0.1/script/destroy
  • pkg/annotate_models-0.0.1/script/generate
  • pkg/annotate_models-0.0.1/script/txt2html
  • pkg/annotate_models-0.0.1/setup.rb
  • pkg/annotate_models-0.0.1/tasks/deployment.rake
  • pkg/annotate_models-0.0.1/tasks/environment.rake
  • pkg/annotate_models-0.0.1/tasks/website.rake
  • pkg/annotate_models-0.0.1/test/test_annotate_models.rb
  • pkg/annotate_models-0.0.1/test/test_helper.rb
  • pkg/annotate_models-0.0.1/website/index.html
  • pkg/annotate_models-0.0.1/website/index.txt
  • pkg/annotate_models-0.0.1/website/javascripts/rounded_corners_lite.inc.js
  • pkg/annotate_models-0.0.1/website/stylesheets/screen.css
  • pkg/annotate_models-0.0.1/website/template.rhtml
  • script/txt2html
  • tasks/annotate.rake
  • website/index.html
  • website/index.txt
  • website/template.rhtml
...
1
 
2
3
4
5
6
7
8
9
 
10
11
12
 
 
 
 
 
 
13
14
15
16
17
18
19
20
21
 
 
 
 
 
 
 
 
 
 
...
 
1
2
 
 
 
 
 
 
 
3
4
 
 
5
6
7
8
9
10
11
 
 
 
 
 
 
 
12
13
14
15
16
17
18
19
20
21
22
0
@@ -1,20 +1,21 @@
0
-Copyright (c) 2008 FIXME full name
0
+The MIT License
0
 
0
-Permission is hereby granted, free of charge, to any person obtaining
0
-a copy of this software and associated documentation files (the
0
-"Software"), to deal in the Software without restriction, including
0
-without limitation the rights to use, copy, modify, merge, publish,
0
-distribute, sublicense, and/or sell copies of the Software, and to
0
-permit persons to whom the Software is furnished to do so, subject to
0
-the following conditions:
0
+Copyright (c) 2008 Dave Thomas
0
 
0
-The above copyright notice and this permission notice shall be
0
-included in all copies or substantial portions of the Software.
0
+Permission is hereby granted, free of charge, to any person obtaining a copy
0
+of this software and associated documentation files (the "Software"), to deal
0
+in the Software without restriction, including without limitation the rights
0
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
0
+copies of the Software, and to permit persons to whom the Software is
0
+furnished to do so, subject to the following conditions:
0
 
0
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
0
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
0
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
0
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
0
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0
\ No newline at end of file
0
+The above copyright notice and this permission notice shall be included in
0
+all copies or substantial portions of the Software.
0
+
0
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
0
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
0
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
0
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
0
+THE SOFTWARE.
...
12
13
14
 
15
16
17
...
12
13
14
15
16
17
18
0
@@ -12,6 +12,7 @@ script/destroy
0
 script/generate
0
 script/txt2html
0
 setup.rb
0
+tasks/annotate.rake
0
 tasks/deployment.rake
0
 tasks/environment.rake
0
 tasks/website.rake
...
58
59
60
61
62
 
63
64
65
...
58
59
60
 
 
61
62
63
64
0
@@ -58,8 +58,7 @@ hoe = Hoe.new(GEM_NAME, VERS) do |p|
0
   
0
   # == Optional
0
   p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
0
- #p.extra_deps = [] # An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]
0
-
0
+ p.extra_deps = [['sake', '1.0.13']] # An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]
0
   #p.spec_extras = {} # A hash of extra values to set in the gemspec.
0
   
0
 end
...
1
2
3
4
5
6
 
 
7
8
9
...
 
 
1
 
 
 
2
3
4
5
6
0
@@ -1,9 +1,6 @@
0
-$:.unshift File.dirname(__FILE__)
0
-
0
 module AnnotateModels
0
- RAILS_ROOT = '.'
0
- MODEL_DIR = File.join(RAILS_ROOT, "app/models")
0
- FIXTURE_DIR = File.join(RAILS_ROOT, "test/fixtures")
0
+ MODEL_DIR = "app/models"
0
+ FIXTURE_DIR = "test/fixtures"
0
   PREFIX = "== Schema Information"
0
 
0
   # Simple quoting for the default column value
...
1
2
3
 
4
5
 
6
7
8
...
1
2
 
3
4
 
5
6
7
8
0
@@ -1,8 +1,8 @@
0
 module AnnotateModels #:nodoc:
0
   module VERSION #:nodoc:
0
- MAJOR = 0
0
+ MAJOR = 1
0
     MINOR = 0
0
- TINY = 1
0
+ TINY = 0
0
 
0
     STRING = [MAJOR, MINOR, TINY].join('.')
0
   end
...
14
15
16
17
 
18
19
20
...
14
15
16
 
17
18
19
20
0
@@ -14,7 +14,7 @@ require 'erb'
0
 require File.dirname(__FILE__) + '/../lib/annotate_models/version.rb'
0
 
0
 version = AnnotateModels::VERSION::STRING
0
-download = 'http://rubyforge.org/projects/annotate_models'
0
+download = 'http://rubyforge.org/projects/annotate-models'
0
 
0
 class Fixnum
0
   def ordinal
...
31
32
33
34
 
35
36
 
37
38
39
...
44
45
46
47
 
 
 
 
48
49
50
 
 
51
52
53
 
 
54
55
56
 
57
58
59
 
60
61
62
 
63
64
65
 
66
67
68
 
69
70
71
 
72
73
74
...
80
81
82
83
 
84
85
 
86
87
88
...
31
32
33
 
34
35
 
36
37
38
39
...
44
45
46
 
47
48
49
50
51
52
 
53
54
55
56
 
57
58
59
60
 
61
62
63
 
64
65
66
 
67
68
69
 
70
71
72
 
73
74
75
 
76
77
78
79
...
85
86
87
 
88
89
 
90
91
92
93
0
@@ -31,9 +31,9 @@
0
 <div id="main">
0
 
0
     <h1>annotate_models</h1>
0
- <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/annotate_models"; return false'>
0
+ <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/annotate-models"; return false'>
0
       <p>Get Version</p>
0
- <a href="http://rubyforge.org/projects/annotate_models" class="numbers">0.0.1</a>
0
+ <a href="http://rubyforge.org/projects/annotate-models" class="numbers">1.0.0</a>
0
     </div>
0
     <h1>&#x2192; &#8216;annotate_models&#8217;</h1>
0
 
0
@@ -44,31 +44,36 @@
0
   <h2>Installing</h2>
0
 
0
 
0
- <p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">annotate_models</span></pre></p>
0
+ <p><pre class='syntax'>
0
+ <span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">annotate_models</span>
0
+ <span class="ident">sake</span> <span class="punct">-</span><span class="ident">i</span> <span class="ident">http</span><span class="punct">:/</span><span class="regex"></span><span class="punct">/</span><span class="ident">github</span><span class="punct">.</span><span class="ident">com</span><span class="punct">/</span><span class="ident">ctran</span><span class="punct">/</span><span class="ident">annotate_models</span><span class="punct">/</span><span class="ident">tree</span><span class="punct">/</span><span class="ident">master</span><span class="punct">/</span><span class="ident">tasks</span><span class="punct">/</span><span class="ident">deployment</span><span class="punct">.</span><span class="ident">rake?raw</span><span class="punct">=</span><span class="constant">true</span>
0
+</pre></p>
0
 
0
 
0
- <h2>The basics</h2>
0
+ <h2>The basics
0
+Add a comment summarizing the current schema to the top of each ActiveRecord model source file.</h2>
0
 
0
 
0
- <h2>Demonstration of usage</h2>
0
+ <p>This was created by Dave Thomas as a Rails plugin.
0
+This is now a gem that can be used together with <a href="http://errtheblog.com/posts/60-sake-bomb">Sake</a></p>
0
 
0
 
0
- <h2>Forum</h2>
0
+ <h2>Demonstration of usage</h2>
0
 
0
 
0
- <p><a href="http://groups.google.com/group/annotate_models">http://groups.google.com/group/annotate_models</a></p>
0
+ <p>Go to your <span class="caps">RAILS</span>_ROOT dir, then run <code>sake annotate_models</code></p>
0
 
0
 
0
- <p><span class="caps">TODO</span> &#8211; create Google Group &#8211; annotate_models</p>
0
+ <h2>How to submit patches</h2>
0
 
0
 
0
- <h2>How to submit patches</h2>
0
+ <p>See <a href="http://drnicwilliams.com/2008/02/03/using-git-within-a-team/">Using Git within a project</a></p>
0
 
0
 
0
- <p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people&#8217;s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
0
+ <p>The trunk repository is <code>http://github.com/ctran/annotate_models</code>.</p>
0
 
0
 
0
- <p>The trunk repository is <code>svn://rubyforge.org/var/svn/annotate_models/trunk</code> for anonymous access.</p>
0
+ <p>A svn mirror is on rubyforge <code>svn://rubyforge.org/var/svn/annotate-models/trunk</code></p>
0
 
0
 
0
   <h2>License</h2>
0
@@ -80,9 +85,9 @@
0
   <h2>Contact</h2>
0
 
0
 
0
- <p>Comments are welcome. Send an email to <a href="mailto:FIXME"><span class="caps">FIXME</span> full name</a> email via the <a href="http://groups.google.com/group/annotate_models">forum</a></p>
0
+ <p>Comments are welcome. Send an email to <a href="mailto:ctran@pragmaquest.com">Cuong Tran</a></p>
0
     <p class="coda">
0
- <a href="FIXME email">FIXME full name</a>, 27th February 2008<br>
0
+ <a href="ctran@pragmaquest.com">Cuong Tran</a>, 28th February 2008<br>
0
       Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
0
     </p>
0
 </div>
...
8
9
10
11
 
 
 
 
12
13
 
14
 
 
15
16
17
18
19
20
21
22
23
24
 
25
26
27
28
 
 
 
29
30
 
31
32
33
...
35
36
37
38
 
39
...
8
9
10
 
11
12
13
14
15
16
17
18
19
20
21
22
23
 
 
 
 
 
 
 
24
25
26
27
 
28
29
30
31
 
32
33
34
35
...
37
38
39
 
40
41
0
@@ -8,26 +8,28 @@ h2. What
0
 
0
 h2. Installing
0
 
0
-<pre syntax="ruby">sudo gem install annotate_models</pre>
0
+<pre syntax="ruby">
0
+ sudo gem install annotate_models
0
+ sake -i http://github.com/ctran/annotate_models/tree/master/tasks/deployment.rake?raw=true
0
+</pre>
0
 
0
 h2. The basics
0
+Add a comment summarizing the current schema to the top of each ActiveRecord model source file.
0
 
0
+This was created by Dave Thomas as a Rails plugin.
0
+This is now a gem that can be used together with "Sake":http://errtheblog.com/posts/60-sake-bomb
0
 
0
 h2. Demonstration of usage
0
 
0
-
0
-
0
-h2. Forum
0
-
0
-"http://groups.google.com/group/annotate_models":http://groups.google.com/group/annotate_models
0
-
0
-TODO - create Google Group - annotate_models
0
+Go to your RAILS_ROOT dir, then run <code>sake annotate_models</code>
0
 
0
 h2. How to submit patches
0
 
0
-Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/ and for section "8b: Submit patch to Google Groups":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups, use the Google Group above.
0
+See "Using Git within a project":http://drnicwilliams.com/2008/02/03/using-git-within-a-team/
0
+
0
+The trunk repository is <code>http://github.com/ctran/annotate_models</code>.
0
 
0
-The trunk repository is <code>svn://rubyforge.org/var/svn/annotate_models/trunk</code> for anonymous access.
0
+A svn mirror is on rubyforge <code>svn://rubyforge.org/var/svn/annotate-models/trunk</code>
0
 
0
 h2. License
0
 
0
@@ -35,5 +37,5 @@ This code is free to use under the terms of the MIT license.
0
 
0
 h2. Contact
0
 
0
-Comments are welcome. Send an email to "FIXME full name":mailto:FIXME email via the "forum":http://groups.google.com/group/annotate_models
0
+Comments are welcome. Send an email to "Cuong Tran":mailto:ctran@pragmaquest.com
0
 
...
37
38
39
40
 
41
42
43
...
37
38
39
 
40
41
42
43
0
@@ -37,7 +37,7 @@
0
     </div>
0
     <%= body %>
0
     <p class="coda">
0
- <a href="FIXME email">FIXME full name</a>, <%= modified.pretty %><br>
0
+ <a href="ctran@pragmaquest.com">Cuong Tran</a>, <%= modified.pretty %><br>
0
       Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
0
     </p>
0
 </div>

Comments

    No one has commented yet.