Giter Club home page Giter Club logo

sake-tasks's Introduction

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

sake-tasks's People

Contributors

bjeanes avatar defunkt avatar dpetersen avatar drnic avatar eval avatar lukemelia avatar mocoso avatar peeja avatar pietern avatar unders avatar unpublishedworks avatar urubatan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sake-tasks's Issues

Error installing sake tasks

Hi, this ain't the right place to ask but couldn't find any other way out.
I cloned your repo of this sake tasks and did the rake install.
Some sake tasks are installed but at the end I get a bunch of error as follows.
Can you just scan it what might be the problem. Thanks.

millisami@notebook:/tmp/sake-tasks$ rake install --trace
(in /tmp/sake-tasks)
** Invoke install (first_time)
** Invoke install:all (first_time)
** Execute install:all

Installing task `github:pages:migrate_website'

Installing task `github:pages:setup'

Installing task `web:open'

Installing task `multiruby:gems:install'

Installing task `multiruby:test'

Installing task `multiruby:spec'

Installing task `check:yaml'

Installing task `check:ruby'

Installing task `check:erb'

Installing task `ssh:install_public_key'

Installing task `multiruby'

Installing task `textmate:bundles:reload'

Installing task `git:ignore:xcode'

Installing task `git:src:install'

Installing task `git:src:latest_version'

Installing task `git:manpages:install'

Installing task `git:topic'

Installing task `git:status'

Installing task `git:rebase'

Installing task `git:pull'

Installing task `git:push'

Installing task `git:analyze:commits:flog_frequent'

Installing task `git:publish'

Installing task `gem:install'

Installing task `gem:view'

Installing task `rails:date_formats'

Installing task `mysql:console'

Installing task `mysql:dump'

Installing task `mysql:load'

Installing task `mysql:params'

rake aborted!
(eval):2:in []': Insecure operation - [] /home/millisami/.rvm/gems/ree/1.8.7/gems/sake-1.0.15/lib/sake.rb:335:inparse'
/home/millisami/.rvm/gems/ree/1.8.7/gems/sake-1.0.15/lib/sake.rb:335:in join' /home/millisami/.rvm/gems/ree/1.8.7/gems/sake-1.0.15/lib/sake.rb:335:inparse'
/tmp/sake-tasks/Rakefile:9
/tmp/sake-tasks/Rakefile:8:in each' /tmp/sake-tasks/Rakefile:8 /home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:636:incall'
/home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:636:in execute' /home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:631:ineach'
/home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:631:in execute' /home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:597:ininvoke_with_call_chain'
/home/millisami/.rvm/ree-1.8.7-2009.10/lib/ruby/1.8/monitor.rb:242:in synchronize' /home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain'
/home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:607:in invoke_prerequisites' /home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:604:ineach'
/home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:604:in invoke_prerequisites' /home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:596:ininvoke_with_call_chain'
/home/millisami/.rvm/ree-1.8.7-2009.10/lib/ruby/1.8/monitor.rb:242:in synchronize' /home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain'
/home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:583:in invoke' /home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:2051:ininvoke_task'
/home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:2029:ineach'
/home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling'
/home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:2023:in top_level' /home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:2001:inrun'
/home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' /home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/lib/rake.rb:1998:inrun'
/home/millisami/.rvm/gems/ree/1.8.7/gems/rake-0.8.7/bin/rake:31
/home/millisami/.rvm/ree-1.8.7-2009.10/bin/rake:22:in `load'
/home/millisami/.rvm/ree-1.8.7-2009.10/bin/rake:22

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.