Commit 3502a73c by Cuong Tran

Add a script so don't need to rely on Sake anymore

parent 4bf03485
......@@ -11,8 +11,8 @@ log/debug.log
script/destroy
script/generate
script/txt2html
bin/annotate
setup.rb
tasks/annotate.rake
tasks/deployment.rake
tasks/environment.rake
tasks/website.rake
......
......@@ -25,12 +25,11 @@ Install
=======
sudo gem install sake annotate_models
sake -i http://github.com/ctran/annotate_models/tree/master/tasks/annotate.rake?raw=true
Usage
=====
sake annotate_models
cd [your project]
annotate
Source
======
......
load 'Rakefile'
require 'tasks/annotate'
Rake::Task['annotate_models'].invoke
......@@ -58,8 +58,8 @@ hoe = Hoe.new(GEM_NAME, VERS) do |p|
# == Optional
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
p.extra_deps = [['sake', '1.0.13']] # An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]
#p.spec_extras = {} # A hash of extra values to set in the gemspec.
p.extra_deps = [] # An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]
p.spec_extras = {} # A hash of extra values to set in the gemspec.
end
......
......@@ -2,4 +2,4 @@ desc "Add schema information (as comments) to model files"
task :annotate_models => :environment do
require 'annotate_models'
AnnotateModels.do_annotations
end
end
\ No newline at end of file
......@@ -46,7 +46,6 @@
<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>
<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>
</pre></p>
......@@ -55,13 +54,13 @@ Add a comment summarizing the current schema to the top of each ActiveRecord mod
<p>This was created by Dave Thomas as a Rails plugin.
This is now a gem that can be used together with <a href="http://errtheblog.com/posts/60-sake-bomb">Sake</a></p>
This is now a gem that can run from command line</p>
<h2>Demonstration of usage</h2>
<p>Go to your <span class="caps">RAILS</span>_ROOT dir, then run <code>sake annotate_models</code></p>
<p>Go to your <span class="caps">RAILS</span>_ROOT dir, then run <code>annotate</code></p>
<h2>How to submit patches</h2>
......@@ -87,7 +86,7 @@ This is now a gem that can be used together with <a href="http://errtheblog.com/
<p>Comments are welcome. Send an email to <a href="mailto:ctran@pragmaquest.com">Cuong Tran</a></p>
<p class="coda">
<a href="ctran@pragmaquest.com">Cuong Tran</a>, 28th February 2008<br>
<a href="ctran@pragmaquest.com">Cuong Tran</a>, 29th February 2008<br>
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
</p>
</div>
......
......@@ -10,18 +10,17 @@ h2. Installing
<pre syntax="ruby">
sudo gem install annotate_models
sake -i http://github.com/ctran/annotate_models/tree/master/tasks/annotate.rake?raw=true
</pre>
h2. The basics
Add a comment summarizing the current schema to the top of each ActiveRecord model source file.
This was created by Dave Thomas as a Rails plugin.
This is now a gem that can be used together with "Sake":http://errtheblog.com/posts/60-sake-bomb
This is now a gem that can run from command line
h2. Demonstration of usage
Go to your RAILS_ROOT dir, then run <code>sake annotate_models</code>
Go to your RAILS_ROOT dir, then run <code>annotate</code>
h2. How to submit patches
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment