rook 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.txt +5 -1
  2. data/bin/rook +38 -17
  3. metadata +2 -2
data/README.txt CHANGED
@@ -1,5 +1,6 @@
1
1
  .=title: README
2
- .?lastupdated: $Date$
2
+ .?release: $Release: 0.0.2$
3
+ .?lastupdated: $Date: 2005-04-30 11:16:15 +0900 (Sat, 30 Apr 2005) $
3
4
 
4
5
 
5
6
  .$ About
@@ -8,6 +9,9 @@ Rook is a tool for SCM such as Make, Rake, Ant, and so on.
8
9
  Rook is inspired by Cook which is made by Peter Miller.
9
10
  http://www.canb.auug.org.au/~millerp/cook/cook.html
10
11
 
12
+ Attention! Rook is under alpha version and specification
13
+ may change frequently.
14
+
11
15
 
12
16
  .$ Installation
13
17
 
data/bin/rook CHANGED
@@ -5,8 +5,8 @@
5
5
  ###
6
6
  ### copryright(c) 2005 makoto kuwata all rights reserverd
7
7
  ###
8
- ### $Id: rook 11 2005-04-29 12:26:31Z kwatch $
9
- ### $Release: 0.0.1$
8
+ ### $Id: rook 14 2005-04-30 02:16:15Z kwatch $
9
+ ### $Release: 0.0.2$
10
10
  ###
11
11
 
12
12
  require 'fileutils'
@@ -16,9 +16,9 @@ FileUtils.instance_eval "@fileutils_output = $stdout"
16
16
 
17
17
  module Rook
18
18
 
19
- VERSION = ('$Rev: 11 $' =~ /(\d+)/) && $1
20
- LAST_UPDATE = ('$Date: 2005-04-29 21:26:31 +0900 (Fri, 29 Apr 2005) $' =~ /([-\d]+)/) && $1
21
- RELEASE = ('$Release: 0.0.1$' =~ /([\.\d]+)/) && $1
19
+ VERSION = ('$Rev: 14 $' =~ /(\d+)/) && $1
20
+ LAST_UPDATE = ('$Date: 2005-04-30 11:16:15 +0900 (Sat, 30 Apr 2005) $' =~ /([-\d]+)/) && $1
21
+ RELEASE = ('$Release: 0.0.2$' =~ /([\.\d]+)/) && $1
22
22
 
23
23
  $rook_defaults = {
24
24
  :bookname => 'Rookbook', # or 'Cookbook.rb'
@@ -79,6 +79,11 @@ module Rook
79
79
  @specific_recipes = []
80
80
  @generic_recipes = []
81
81
  @symbolic_recipes = []
82
+ #
83
+ #unless test(?f, @bookname)
84
+ # raise CookbookNotFoundError.new("`#{@bookname}': cookbook not found.")
85
+ #end
86
+ #load(@bookname) ## load cookbook
82
87
  end
83
88
  attr_reader :bookname
84
89
  attr_reader :specific_recipes, :generic_recipes, :symbolic_recipes
@@ -159,12 +164,25 @@ module Rook
159
164
 
160
165
  def start(targets)
161
166
  _execute() do
162
- targets.each do |target|
163
- target = target[1,target.length-1].intern if target.is_a?(String) && target[0] == ?:
167
+ if targets == nil || targets.empty?
168
+ target = $rook_defaults[:target]
164
169
  recipe = lookup(target)
165
- raise AssertionError.new("recipe.class=#{recipe.class.name}") if recipe.kind_of?(GenericRecipe)
166
- raise RecipeNotFoundError.new("#{target}: recipe not found.") unless recipe
167
- recipe.execute()
170
+ raise AssertionError.new("recipe.class=#{recipe.class.name}") if recipe.kind_of?(GenericRecipe)
171
+ if recipe
172
+ recipe.execute()
173
+ else
174
+ #raise RecipeNotFoundError.new("#{target}: recipe not found.")
175
+ puts "*** target is not specified."
176
+ listup()
177
+ end
178
+ else
179
+ targets.each do |target|
180
+ target = target[1,target.length-1].intern if target.is_a?(String) && target[0] == ?:
181
+ recipe = lookup(target)
182
+ raise RecipeNotFoundError.new("#{target}: recipe not found.") unless recipe
183
+ raise AssertionError.new("recipe.class=#{recipe.class.name}") if recipe.kind_of?(GenericRecipe)
184
+ recipe.execute()
185
+ end
168
186
  end
169
187
  end
170
188
  end
@@ -779,15 +797,18 @@ module Rook
779
797
  cookbook.listup()
780
798
  elsif options[?L]
781
799
  cookbook.listup_all()
782
- elsif !@argv.empty?
800
+ else
783
801
  targets = @argv
784
802
  cookbook.start(targets)
785
- elsif cookbook.lookup($rook_defaults[:target]) == nil
786
- puts "*** target is not specified."
787
- cookbook.listup()
788
- else
789
- target = $rook_defaults[:target]
790
- cookbook.start([target])
803
+ #elsif !@argv.empty?
804
+ # targets = @argv
805
+ # cookbook.start(targets)
806
+ #elsif cookbook.lookup($rook_defaults[:target]) == nil
807
+ # puts "*** target is not specified."
808
+ # cookbook.listup()
809
+ #else
810
+ # target = $rook_defaults[:target]
811
+ # cookbook.start([target])
791
812
  end
792
813
  end
793
814
 
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.10
3
3
  specification_version: 1
4
4
  name: rook
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.1
7
- date: 2005-04-29
6
+ version: 0.0.2
7
+ date: 2005-04-30
8
8
  summary: "a SCM tool like Make, Rake, Ant, and so on."
9
9
  require_paths:
10
10
  - lib