github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

drnic / sake-tasks forked from defunkt/sake-tasks

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 60
    • 17
  • Source
  • Commits
  • Network (17)
  • Issues (1)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Your own personal sake tasks, ripe for sharing. — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

local sake script is sort of useful if you don't have sake installed 
drnic (author)
Wed Oct 14 02:08:53 -0700 2009
commit  ba12536ed6d3990fd296ce620d72cb65bb6fc498
tree    e09b0186b339dc22a050796cbff83c079fb8e81e
parent  d3a3f59f63fc363df4fd0fac9e284ad75882e376
sake-tasks /
name age
history
message
file .gitignore Loading commit data...
file README.markdown
file Rakefile
file Rakefile.sake
directory check/
directory gem/
directory git/
directory github/
file multiruby.sake
directory multiruby/
directory mysql/
directory rails/
file sake
directory ssh/
directory textmate/
directory web/
README.markdown

Installation

First, clone the sake-tasks repo:

git clone git://github.com/drnic/sake-tasks.git

Or replace 'drnic' with your github username if you have forked the sake-tasks repo.

Then install the sake tasks (this step is repeatable, even if one or more tasks are already exist; that is, any pre-existing tasks with the same name will be overridden)

rake install

To see your list of resulting tasks:

sake -T

What are Sake tasks/recipes?

It's the marvelous Sake, system-wide Rake.
http://errtheblog.com/posts/60-sake-bomb

Current tasks

The following sake tasks are installed:

sake check:erb                           # Find all .erb or .rhtml files in the current directory tree and report any syntax errors
sake check:ruby                          # Find all .rb files in the current directory tree and report any syntax errors
sake check:yaml                          # Find all .yml files in the current directory tree and report any syntax errors
sake git:analyze:commits:flog_frequent   # Flog the most commonly revised files in the git history
sake git:close                           # Delete the current branch and switch back to master
sake git:manpages:install                # Install man pages for current git version
sake git:open                            # Create a new branch off master
sake git:publish                         # Push all changes to the SVN repository
sake git:pull                            # Pull new commits from the repository
sake git:push                            # Push all changes to the repository
sake git:rebase                          # Pull new commits from the SVN repository
sake git:src:install                     # Downloads and installs latest version of git
sake git:status                          # Show the current status of the checkout
sake git:topic                           # Create a new topic branch
sake git:update                          # Pull new commits from the repository
sake mysql:dump                          # Dump the database to FILE (depends on mysql:params)
sake mysql:load                          # Load the database from FILE (depends on mysql:params)
sake ssh:install_public_key              # Install your public key on a remote server.

Adding new recipes/tasks

The installer rake task rake install works by assuming that each .sake file contains one sake task. This allows it to uninstall the task from sake first, and then re-install it (sake barfs if you attempt to reinstall an existing task).

So, to create a task foo:bar:baz, you'll need to add a folder foo/bar and create a file baz.sake inside it. Within that file you would then specify your task using namespace and task method calls:

namespace 'foo' do
  namespace 'bar' do
    desc "This task ..."
    task :baz do

    end
  end
end

Testing tasks (even if not installed)

Whilst a task is in development you can execute it locally, without sake, using rake testrun.

To run the local version of foo/bar/baz.sake, use:

rake testrun foo:bar:baz

Installing individual tasks/files

You can selectively install only tasks/files that you are working on, rather than all the files in your repository, or just install the most recently modified sake file.

To install the latest modified sake file:

rake install:latest

To restrict rake install to only re-install a task foo:bar:baz you can either use:

rake install:file f=foo/bar/baz.sake
rake install:task t=foo:bar:baz

The values can be comma-separated lists.

So for iterative install & run development you could run the install task and the sake task via the same command line:

rake install:task t=foo:bar:baz && sake foo:bar:baz --trace

The optional --trace runs sake in trace mode so useful stacktrace information is given as necessary. Ultimately you'd probably use rake testrun foo:bar:baz as above.

TextMate users

The latest Ruby.tmbundle on github includes a task command that generates the above namespace/task snippet based on the path + file name. That is, inside the foo/bar/baz.sake file, make sure your grammar is 'Ruby' or 'Ruby on Rails' and then type "task" and press TAB. The above snippet will be generated ready for you to specify your task.

Authors

  • Luke Melia - many git + mysql + ssh tasks
  • Dr Nic Williams - repeatable installer rake task
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server