Browse files

readme

  • Loading branch information...
1 parent 3a5a51b commit aa751e5cd8831e35e6a7410db76b9f3eda4ba19f @defunkt committed Jun 25, 2007
Showing with 96 additions and 0 deletions.
  1. +18 −0 LICENSE
  2. +73 −0 README
  3. +5 −0 lib/sake.rb
View
18 LICENSE
@@ -0,0 +1,18 @@
+Copyright (c) 2007 Chris Wanstrath
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
73 README
@@ -0,0 +1,73 @@
+= Sake. Best served warm.
+
+Sick of copy & pasting your badass custom Rakefiles into every new Rails app
+you start? Fed up with writing one-off admistrative scripts and leaving them
+everything?
+
+No longer. Sake is a tool which helps you maintain a set of system level Rake tasks.
+
+Get started:
+
+$ sudo gem install sake
+$ sake -h
+
+Show all Sake tasks (but no local Rake tasks), optionally only those matching a pattern.
+ $ sake -T
+ $ sake -T db
+
+Show tasks in a Rakefile, optionally only those matching a pattern.
+ $ sake -T file.rake
+ $ sake -T file.rake db
+
+Install tasks from a Rakefile, optionally specifying specific tasks.
+ $ sake -i Rakefile
+ $ sake -i Rakefile db:remigrate
+ $ sake -i Rakefile db:remigrate routes
+
+Examine the source of a Rake task.
+ $ sake -e routes
+
+You can also examine the source of a task not yet installed.
+ $ sake -e Rakefile db:remigrate
+
+Uninstall an installed task.
+ $ sake -u db:remigrate
+
+Can be passed one or more tasks.
+
+Invoke a Sake task.
+ $ sake <taskname>
+
+Some Sake tasks may depend on tasks which exist only locally.
+
+For instance, you may have a db:version sake task which depends
+on the 'environment' Rake task. The 'environment' Rake task is one
+defined by Rails to load its environment. This db:version task will
+work when your current directory is within a Rails app because
+Sake knows how to find Rake tasks. This task will not work,
+however, in any other directory (unless a task named 'environment'
+indeed exists).
+
+Sake can also serve its tasks over a network by launching a Mongrel handler.
+Pass the -S switch to start Sake in server mode.
+
+ $ sake -S
+
+You can, of course, specify a port.
+ $ sake -S -p 1111
+
+You can also daemonize your server for long term serving fun.
+ $ sake -S -d
+
+== Special Thanks
+
+ * Ryan Davis
+ * Eric Hodel
+ * Josh Susser
+ * Brian Donovan
+ * Zack Chandler
+
+== Author
+
+>> Chris Wanstrath
+=> chris@ozmm.org
View
5 lib/sake.rb
@@ -211,6 +211,11 @@ def examine(index)
task = @args[index + 1]
end
+ # They didn't pass any args in, so just show the ~/.sake file
+ unless task
+ die Store.tasks.to_ruby
+ end
+
# Try to find the task we think they asked for.
tasks = file ? TasksFile.parse(file).tasks : Store.tasks

0 comments on commit aa751e5

Please sign in to comment.