rabal 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +5 -1
- data/lib/rabal/application.rb +2 -2
- data/lib/rabal/tree.rb +4 -3
- data/lib/rabal/version.rb +1 -1
- data/spec/application_spec.rb +32 -23
- data/spec/spec_helper.rb +1 -0
- metadata +3 -3
data/CHANGES
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
= Changelog
|
2
2
|
|
3
|
+
=== Version 0.2.1
|
4
|
+
|
5
|
+
* fix bug wherein some templates get lost for subdirectories when multiple modules are in use.
|
6
|
+
|
3
7
|
=== Version 0.2.0
|
4
8
|
|
5
9
|
* create conditional tasks based upon the availability of libraries (webby, heel, rubyforge)
|
6
|
-
* added in site plugin
|
10
|
+
* added in site plugin and associated tasks
|
7
11
|
* moved all rake tasks to .rake files
|
8
12
|
* added tasks to show website and rdoc if heel is installed
|
9
13
|
|
data/lib/rabal/application.rb
CHANGED
@@ -233,10 +233,10 @@ module Rabal
|
|
233
233
|
# if the params for the logfile were given then open them up and
|
234
234
|
#
|
235
235
|
def logfile_and_level_if_necessary
|
236
|
-
if main.params[
|
236
|
+
if @main.params[:logfile].given? then
|
237
237
|
Log.logger = main.params["logfile"].value
|
238
238
|
end
|
239
|
-
Log.logger.level = ::Logger::SEV_LABEL.index(main.params[
|
239
|
+
Log.logger.level = ::Logger::SEV_LABEL.index(main.params[:verbosity].value)
|
240
240
|
Log.debug "Logger initialized"
|
241
241
|
end
|
242
242
|
end
|
data/lib/rabal/tree.rb
CHANGED
@@ -15,7 +15,7 @@ module Rabal
|
|
15
15
|
# root.
|
16
16
|
attr_accessor :parent
|
17
17
|
|
18
|
-
# The children of this node. If this
|
18
|
+
# The children of this node. If this Hash is empty, then this
|
19
19
|
# Tree is a leaf.
|
20
20
|
attr_accessor :children
|
21
21
|
|
@@ -128,9 +128,10 @@ module Rabal
|
|
128
128
|
# Don't overwrite any existing children with the same name,
|
129
129
|
# just put the new subtree's children into the children of
|
130
130
|
# the already existing subtree.
|
131
|
+
|
131
132
|
if children.has_key?(subtree.name) then
|
132
|
-
subtree.children.
|
133
|
-
children[
|
133
|
+
subtree.children.each_pair do |subtree_child_name,subtree_child_tree|
|
134
|
+
children[subtree.name] << subtree_child_tree
|
134
135
|
end
|
135
136
|
else
|
136
137
|
children[subtree.name] = subtree
|
data/lib/rabal/version.rb
CHANGED
data/spec/application_spec.rb
CHANGED
@@ -20,28 +20,37 @@ describe Rabal::Application do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
it "should exit 0 on --help" do
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
23
|
+
begin
|
24
|
+
@application.run(%w[--help])
|
25
|
+
rescue SystemExit => se
|
26
|
+
se.status.should == 0
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
it "should output to stderr on bad parameters" do
|
31
|
+
begin
|
32
|
+
@application.run(%w[--blah])
|
33
|
+
rescue SystemExit => se
|
34
|
+
se.status.should == 1
|
35
|
+
@stderr.string.should =~ /unrecognized option `--blah'/m
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
it "should have allow for plugin options" do
|
40
|
+
begin
|
41
|
+
@application.run(%w[--use-all --help])
|
42
|
+
rescue SystemExit => se
|
43
|
+
se.status.should == 0
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# it "should have a good default tree " do
|
48
|
+
# begin
|
49
|
+
# Rabal::Application.new(@stdin,@stdout,@stderr).run(%w[--core-author=Testing --core-email=testing@example.com --license-flavor=mit new-rabal-proj])
|
50
|
+
# rescue SystemExit => se
|
51
|
+
# se.status.should == 0
|
52
|
+
# find_in("new-rabal-proj").sort.should == @base_tree.sort
|
53
|
+
# end
|
54
|
+
# end
|
46
55
|
end
|
47
56
|
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.
|
2
|
+
rubygems_version: 0.9.2
|
3
3
|
specification_version: 1
|
4
4
|
name: rabal
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.2.
|
7
|
-
date: 2007-09-
|
6
|
+
version: 0.2.1
|
7
|
+
date: 2007-09-11 00:00:00 -06:00
|
8
8
|
summary: A tool for bootstrapping project development
|
9
9
|
require_paths:
|
10
10
|
- lib
|