Socket
Book a DemoInstallSign in
Socket

rook

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rook

0.2.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

= README

release:: $Release: 0.2.1 $ copyright:: copyright(c) 2006 kuwata-lab.com all rights reserved.

== Introduction

Rook is a tool for SCM such as Make, Rake, Ant, and so on. Rook has inspired by Cook which is made by Peter Miller. http://www.canb.auug.org.au/~millerp/cook/cook.html

Features:

  • Liken software build process to cooking.
  • Two-style approach support: YAML-style and Ruby-style.
  • Natural notation for production rule and optional ingredients.
  • 'tar.gz', 'tar.bz2', and '.zip' support (requires 'minitar', 'bz2', and 'rubyzip' libraries.)
  • Able to invoke build command forcedly

Attention! Rook is under alpha version and specification may change frequently.

== Installation

If you have installed RubyGems, just stype 'gem install -r rook'. $ sudo gem install -r rook

Otherwise download ruby_X.X.X.tar.bz2 and install with setup.rb. $ tar xjf rook_X.X.X.tar.bz2 $ cd rook_X.X.X/ $ sudo setup.rb

(Must) If you have installed rook without RubyGems, the following libraries must be installed.

(Optional) If you want to handle *.tar.gz, *.tar.bz2, or *.zip files, you must install the following libraries.

(Optional) Helper script 'ruby_X.X.X/contrib/inline_require.rb' merges 'bin/rook' and rook libraries into a file. $ cd rook_X.X.X/ $ unset RUBYLIB $ ruby contrib/inline_require.rb -I lib bin/rook > contrib/rook

== Examples

The following is an example of Rookbook.yaml to cook *.c files. (Rookbook is the equivarent to Makefile in Make or Rakefile in Rake.)

properties: - project: hello - c_flags: '-g -Wall -O2'

variables: - command: $(project) - objfiles*: Dir.glob('*.c').collect{|f| f.sub(/.c$/, '.o')}

recipes: - product: $(command) ingreds: [ $(objfiles) ] desc: create '$(command)' command method: | sys "gcc #{@c_flags} -o #{@product} #{@ingreds.join(' ')}"

- product:  *.o
  ingreds:  [ $(1).c ]
  options:  [ $(1).h ]
  method: |
      sys "gcc #{@c_flags} -c #{@ingred}"

- product:  :clean
  method: |
      rm_f Dir.glob("*.o")

Rook supports two style of Rookbook: YAML-style and Ruby-style. The following ('Rookbook.rb') is the Ruby-style example of Rookbook which is equivarent to the above YAML-style example.

property :project, 'hello' property :c_flags, '-g -Wall -O2'

command = @project objfiles = Dir.glob('*.c').collect{|f| f.sub(/.c$/, '.o')}

desc "create '#{command}' command" recipe command, objfiles do |r| sys "gcc #{@c_flags} -o #{@product} #{@ingreds.join(' ')}" end

recipe "*.o", '$(1).c', :options=>['$(1).h'] do |r| sys "gcc #{@c_flags} -c #{@ingred}" end

recipe :clean do |r| rm_f Dir.glob("*.o") end

See 'examples/' directory for more examples.

== Documents

See 'doc/users-guide.html' for details.

== Terms

[ Product ] Output of cooking.

[ Ingredient ] Materials needed for cooking.

[ Byproduct ] Garbages produced in cooking.

[ Recipe ] Method how to cook product.

[ Generic recipe ] Recipe which product is specified by pattern. This is equivarent to 'rule' in Rake.

[ Specific recipe ] Recipe which product is specified by name. This is equivarent to 'file' in Rake.

[ Symbolic recipe ] Recipe which product is specified by Symbol. This is equivarent to 'task' in Rake.

== To Do

  • [_] Include external cookbook
  • [_] Fingerprints support
  • [_] Dependency Tree
  • [_] Plugin architecture
  • [_] Auto-detection of product and by-product, and delete them automatically
  • [_] Multi-products
  • [V] (DONE) Reporting Line number when schema error is found in cookbook
  • [_] Convertion cookbook into ruby code

== License

LGPL ver2.1

== Author

makoto kuwata <kwa(at)kuwata-lab.com>

FAQs

Package last updated on 25 Jul 2009

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.