rake 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rake might be problematic. Click here for more details.

data/CHANGES CHANGED
@@ -1,5 +1,11 @@
1
1
  = Rake Changelog
2
2
 
3
+ == Version 0.5.4
4
+
5
+ * Added double quotes to the test runner.
6
+ * Added .svn to default ignore list.
7
+ * Updated FileList#include to support nested arrays and filelists.
8
+
3
9
  == Version 0.5.3
4
10
 
5
11
  * Added support for importing Rakefile and other dependencies.
data/Rakefile CHANGED
@@ -61,25 +61,26 @@ Rake::TestTask.new(:alltests) do |t|
61
61
  'test/contrib/test*.rb',
62
62
  'test/fun*.rb'
63
63
  ]
64
- t.warning = true if t.respond_to? :warning
65
- t.verbose = true
64
+ t.warning = true
65
+ t.verbose = false
66
66
  end
67
67
 
68
68
  Rake::TestTask.new(:unittests) do |t|
69
69
  t.test_files = FileList['test/test*.rb']
70
- t.warning = true if t.respond_to? :warning
71
- t.verbose = true
70
+ t.warning = true
71
+ t.verbose = false
72
72
  end
73
73
 
74
74
  Rake::TestTask.new(:funtests) do |t|
75
- t.pattern = 'test/fun*.rb'
76
- t.warning = true if t.respond_to? :warning
75
+ t.test_files = FileList['test/fun*.rb']
76
+ t.warning = true
77
+ t.warning = true
77
78
  end
78
79
 
79
80
  Rake::TestTask.new(:contribtests) do |t|
80
- t.pattern = 'test/contrib/test*.rb'
81
- t.verbose = true
82
- t.warning = true if t.respond_to? :warning
81
+ t.test_files = FileList['test/contrib/test*.rb']
82
+ t.verbose = false
83
+ t.warning = true
83
84
  end
84
85
 
85
86
  directory 'testdata'
data/TAGS ADDED
@@ -0,0 +1,126 @@
1
+
2
+ install.rb,12
3
+ $ruby 7,68
4
+
5
+ doc/jamis.rb,98
6
+ function toggleSource(toggleSource194,2852
7
+ function openCode(openCode222,3520
8
+
9
+ lib/rake.rb,49
10
+ RAKEVERSION 32,1333
11
+ # define methods 652,18022
12
+
13
+ lib/rake/clean.rb,14
14
+ CLEAN 18,641
15
+
16
+ lib/rake/tasklib.rb,0
17
+
18
+ lib/rake/packagetask.rb,28
19
+ def initialize(72,2269
20
+
21
+ lib/rake/rdoctask.rb,28
22
+ def initialize(68,2002
23
+
24
+ lib/rake/runtest.rb,23
25
+ def run_tests(9,119
26
+
27
+ lib/rake/testtask.rb,28
28
+ def test_files=73,2340
29
+
30
+ lib/rake/gempackagetask.rb,29
31
+ rescue NoMethodError 12,184
32
+
33
+ lib/rake/ruby182_test_unit_fix.rb,31
34
+ def collect_file(6,83
35
+
36
+ lib/rake/rake_test_loader.rb,0
37
+
38
+ lib/rake/contrib/ftptools.rb,165
39
+ attr_reader :name,17,352
40
+ attr_reader :name, :size,17,352
41
+ attr_reader :name, :size, :owner,17,352
42
+ attr_reader :name, :size, :owner, :group,17,352
43
+
44
+ lib/rake/contrib/sys.rb,16
45
+ RUBY 40,1674
46
+
47
+ lib/rake/contrib/compositepublisher.rb,25
48
+ @publishers 8,130
49
+
50
+ lib/rake/contrib/publisher.rb,17
51
+ HostInfo 17,637
52
+
53
+ lib/rake/contrib/rubyforgepublisher.rb,101
54
+ attr_reader :project,8,116
55
+ attr_reader :project, :proj_id,8,116
56
+ def initialize(10,163
57
+
58
+ lib/rake/contrib/sshpublisher.rb,27
59
+ def initialize(10,180
60
+
61
+ lib/rake/loaders/makefile.rb,20
62
+ def load(9,164
63
+
64
+ test/filecreation.rb,31
65
+ def create_timed_files(6,59
66
+
67
+ test/testclean.rb,70
68
+ assert Task[8,119
69
+ assert Task[9,167
70
+ assert Task[10,219
71
+
72
+ test/testfilelist.rb,17
73
+ FileList 7,99
74
+
75
+ test/testtasks.rb,165
76
+ arg 15,266
77
+ assert_equal 18,375
78
+ assert_equal t,22,490
79
+ runlist 27,563
80
+ t2 29,658
81
+ t2 39,1013
82
+ task :t1 223,6177
83
+ task :t1 224,6224
84
+
85
+ test/testftp.rb,20
86
+ Date.new(9,121
87
+
88
+ test/testfileutils.rb,315
89
+ create_file(12,195
90
+ assert_equal true,35,789
91
+ assert_equal false,37,838
92
+ verbose(38,870
93
+ assert_equal false,41,928
94
+ assert_equal true,46,1003
95
+ assert_equal false,48,1052
96
+ nowrite(49,1084
97
+ assert_equal false,52,1142
98
+ verbose(56,1195
99
+ assert true,57,1245
100
+ ENV[61,1320
101
+
102
+ test/shellcommand.rb,0
103
+
104
+ test/testpackagetask.rb,15
105
+ pkg 8,132
106
+
107
+ test/functional.rb,21
108
+ @debug 21,466
109
+
110
+ test/testtesttask.rb,15
111
+ ENV[9,135
112
+
113
+ test/test_makefile_loader.rb,19
114
+ loader 10,170
115
+
116
+ test/contrib/testsys.rb,154
117
+ assert_equal 40,955
118
+ assert_equal 41,998
119
+ assert_equal 42,1043
120
+ assert_equal 43,1086
121
+ assert_equal 44,1136
122
+ assert_equal 45,1192
123
+
124
+ test/data/rbext/rakefile.rb,0
125
+
126
+ bin/rake,0
@@ -163,6 +163,39 @@ The following rule might be used for Java files ...
163
163
  <b>NOTE:</b> +java_compile+ is a hypothetical method that invokes the
164
164
  java compiler.
165
165
 
166
+ == Importing Dependencies
167
+
168
+ Any ruby file (including other rakefiles) can be included with a
169
+ standard Ruby +require+ command. The rules and declarations in the
170
+ required file are just added to the definitions already accumulated.
171
+
172
+ Because the files are loaded _before_ the rake targets are evaluated,
173
+ the loaded files must be "ready to go" when the rake command is
174
+ invoked. This make generated dependency files difficult to use. By
175
+ the time rake gets around to updating the dependencies file, it is too
176
+ late to load it.
177
+
178
+ The +import+ command addresses this by specifying a file to be loaded
179
+ _after_ the main rakefile is loaded, but _before_ any targets on the
180
+ command line are specified. In addition, if the file name matches an
181
+ explicit task, that task is invoked before loading the file. This
182
+ allows dependency files to be generated and used in a single rake
183
+ command invocation.
184
+
185
+ === Example:
186
+
187
+ require 'rake/loaders/makefile'
188
+
189
+ file ".depends.mf" => [SRC_LIST] do |t|
190
+ sh "makedepend -f- -- #{CFLAGS} -- #{t.prerequisites} > #{t.name}"
191
+ end
192
+
193
+ import ".depends.mf"
194
+
195
+ If ".depends" does not exist, or is out of date w.r.t. the source
196
+ files, a new ".depends" file is generated using +makedepend+ before
197
+ loading.
198
+
166
199
  == Comments
167
200
 
168
201
  Standard Ruby comments (beginning with "#") can be used anywhere it is
@@ -170,7 +203,7 @@ legal in Ruby source code, including comments for tasks and rules.
170
203
  However, if you wish a task to be described using the "-T" switch,
171
204
  then you need to use the +desc+ command to describe the task.
172
205
 
173
- Example:
206
+ === Example:
174
207
 
175
208
  desc "Create a distribution package"
176
209
  task :package => [ ... ] do ... end
@@ -0,0 +1,78 @@
1
+ = Rake 0.5.0 Released
2
+
3
+ Although it has only been two weeks since the last release, we have
4
+ enough updates to the Rake program to make it time for another
5
+ release.
6
+
7
+ == Changes
8
+
9
+ Here are the changes for version 0.5.3 ...
10
+
11
+ * FileLists have been extensively changed so that they mimic the
12
+ behavior of real arrays even more closely. In particular,
13
+ operations on FileLists that return a new collection (e.g. collect,
14
+ reject) will now return a FileList rather than an array. In
15
+ addition, several places where FileLists were not properly expanded
16
+ before use have been fixed.
17
+
18
+ * A method (+ext+) to simplify the handling of file extensions was
19
+ added to String and to Array.
20
+
21
+ * The 'testrb' script in test/unit tends to silently swallow syntax
22
+ errors in test suites. Because of that, the default test loader is
23
+ now a rake-provided script. You can still use 'testrb' by setting
24
+ the loader flag in the test task to :testrb. (See the API documents
25
+ for TestTask for all the loader flag values).
26
+
27
+ * FileUtil methods (e.g. cp, mv, install) are now declared to be
28
+ private. This will cut down on the interference with user defined
29
+ methods of the same name.
30
+
31
+ * Fixed the verbose flag in the TestTask so that the test code is
32
+ controlled by the flag. Also shortened up some failure messages.
33
+ (Thanks to Tobias Luetke for the suggestion).
34
+
35
+ * Rules will now properly detect a task that can generate a source
36
+ file. Previously rules would only consider source files that were
37
+ already present.
38
+
39
+ * Added an +import+ command that allows Rake to dynamically import
40
+ dependendencies into a running Rake session. The +import+ command
41
+ can run tasks to update the dependency file before loading them.
42
+ Dependency files can be in rake or make format, allowing rake to
43
+ work with tools designed to generate dependencies for make.
44
+
45
+ == What is Rake
46
+
47
+ Rake is a build tool similar to the make program in many ways. But
48
+ instead of cryptic make recipes, Rake uses standard Ruby code to
49
+ declare tasks and dependencies. You have the full power of a modern
50
+ scripting language built right into your build tool.
51
+
52
+ == Availability
53
+
54
+ The easiest way to get and install rake is via RubyGems ...
55
+
56
+ gem install rake (you may need root/admin privileges)
57
+
58
+ Otherwise, you can get it from the more traditional places:
59
+
60
+ Home Page:: http://rake.rubyforge.org/
61
+ Download:: http://rubyforge.org/project/showfiles.php?group_id=50
62
+
63
+ == Thanks
64
+
65
+ As usual, it was input from users that drove a alot of these changes.
66
+ Thanks to ...
67
+
68
+ * Brian Gernhardt for the rules fix (especially for the patience to
69
+ explain the problem to me until I got what he was talking about).
70
+ * Stefan Lang for pointing out problems in the dark corners of the
71
+ FileList implementation.
72
+ * Alexey Verkhovsky pointing out the silently swallows syntax errors
73
+ in tests.
74
+ * Tobias Luetke for beautifying the test task output.
75
+ * Sam Roberts for some of the ideas behind dependency loading.
76
+
77
+ -- Jim Weirich
78
+
@@ -0,0 +1,46 @@
1
+ = Rake 0.5.4 Released
2
+
3
+ Time for some minor bug fixes and small enhancements
4
+
5
+ == Changes
6
+
7
+ Here are the changes for version 0.5.3 ...
8
+
9
+ * Added double quotes to the test runner. This allows the location of
10
+ the tests (and runner) to be in a directory path that contains
11
+ spaces (e.g. "C:/Program Files/ruby/bin").
12
+
13
+ * Added .svn to default ignore list. Now subversion project metadata
14
+ is automatically ignored by Rake's FileList.
15
+
16
+ * Updated FileList#include to support nested arrays and filelists.
17
+ FileLists are flat lists of file names. Using a FileList in an
18
+ include will flatten out the nested file names.
19
+
20
+ == What is Rake
21
+
22
+ Rake is a build tool similar to the make program in many ways. But
23
+ instead of cryptic make recipes, Rake uses standard Ruby code to
24
+ declare tasks and dependencies. You have the full power of a modern
25
+ scripting language built right into your build tool.
26
+
27
+ == Availability
28
+
29
+ The easiest way to get and install rake is via RubyGems ...
30
+
31
+ gem install rake (you may need root/admin privileges)
32
+
33
+ Otherwise, you can get it from the more traditional places:
34
+
35
+ Home Page:: http://rake.rubyforge.org/
36
+ Download:: http://rubyforge.org/project/showfiles.php?group_id=50
37
+
38
+ == Thanks
39
+
40
+ As usual, it was input from users that drove a alot of these changes.
41
+ Thanks to ...
42
+
43
+ * Tilman Sauerbeck for the nested FileList suggestion.
44
+ * Josh Knowles for pointing out the spaces in directory name problem.
45
+
46
+ -- Jim Weirich
@@ -29,7 +29,7 @@
29
29
  # referenced as a library via a require statement, but it can be
30
30
  # distributed independently as an application.
31
31
 
32
- RAKEVERSION = '0.5.3'
32
+ RAKEVERSION = '0.5.4'
33
33
 
34
34
  require 'rbconfig'
35
35
  require 'ftools'
@@ -651,13 +651,8 @@ end
651
651
  # module, but mark them private so that they don't unintentionally
652
652
  # define methods on other objects.
653
653
 
654
- file_utils_methods = (FileUtils.methods - Object.methods)
655
654
  include RakeFileUtils
656
-
657
- file_utils_methods.each do |name|
658
- private name.to_sym
659
- end
660
- file_utils_methods = nil
655
+ private(*FileUtils.instance_methods(false))
661
656
 
662
657
  ######################################################################
663
658
  module Rake
@@ -789,7 +784,13 @@ module Rake
789
784
  #
790
785
  def include(*filenames)
791
786
  # TODO: check for pending
792
- filenames.each do |fn| @pending_add << fn end
787
+ filenames.each do |fn|
788
+ if fn.respond_to? :to_ary
789
+ include(*fn.to_ary)
790
+ else
791
+ @pending_add << fn
792
+ end
793
+ end
793
794
  @pending = true
794
795
  self
795
796
  end
@@ -994,6 +995,7 @@ module Rake
994
995
 
995
996
  DEFAULT_IGNORE_PATTERNS = [
996
997
  /(^|[\/\\])CVS([\/\\]|$)/,
998
+ /(^|[\/\\])\.svn([\/\\]|$)/,
997
999
  /\.bak$/,
998
1000
  /~$/,
999
1001
  /(^|[\/\\])core$/
@@ -1016,6 +1018,7 @@ module Rake
1016
1018
  # Set the ignore patterns back to the default value. The
1017
1019
  # default patterns will ignore files
1018
1020
  # * containing "CVS" in the file path
1021
+ # * containing ".svn" in the file path
1019
1022
  # * ending with ".bak"
1020
1023
  # * ending with "~"
1021
1024
  # * named "core"
@@ -106,8 +106,8 @@ module Rake
106
106
  when :rake
107
107
  rake_loader
108
108
  end
109
- ruby "-I#{lib_path} #{warning_flag}#{run_code} " +
110
- file_list.join(' ') +
109
+ ruby "-I#{lib_path} #{warning_flag}\"#{run_code}\" " +
110
+ file_list.collect { |fn| "\"#{fn}\"" }.join(' ') +
111
111
  " #{option_list}"
112
112
  end
113
113
  end
@@ -36,6 +36,23 @@ class TestFileList < Test::Unit::TestCase
36
36
  fl.sort
37
37
  end
38
38
 
39
+ def test_create_with_brackets_and_filelist
40
+ fl = FileList[FileList["testdata/*.c", "x"]]
41
+ assert_equal ["testdata/abc.c", "testdata/x.c", "testdata/xyz.c", "x"].sort,
42
+ fl.sort
43
+ end
44
+
45
+ def test_include_with_another_array
46
+ fl = FileList.new.include(["x", "y", "z"])
47
+ assert_equal ["x", "y", "z"].sort, fl.sort
48
+ end
49
+
50
+ def test_include_with_another_filelist
51
+ fl = FileList.new.include(FileList["testdata/*.c", "x"])
52
+ assert_equal ["testdata/abc.c", "testdata/x.c", "testdata/xyz.c", "x"].sort,
53
+ fl.sort
54
+ end
55
+
39
56
  def test_append
40
57
  fl = FileList.new
41
58
  fl << "a.rb" << "b.rb"
@@ -227,6 +244,7 @@ class TestFileList < Test::Unit::TestCase
227
244
  def test_ignore_special
228
245
  f = FileList['testdata/*']
229
246
  assert ! f.include?("testdata/CVS"), "Should not contain CVS"
247
+ assert ! f.include?("testdata/.svn"), "Should not contain .svn"
230
248
  assert ! f.include?("testdata/.dummy"), "Should not contain dot files"
231
249
  assert ! f.include?("testdata/x.bak"), "Should not contain .bak files"
232
250
  assert ! f.include?("testdata/x~"), "Should not contain ~ files"
@@ -234,11 +252,12 @@ class TestFileList < Test::Unit::TestCase
234
252
  end
235
253
 
236
254
  def test_clear_ignore_patterns
237
- f = FileList['testdata/*']
255
+ f = FileList['testdata/*', 'testdata/.svn']
238
256
  f.clear_exclude
239
257
  assert f.include?("testdata/abc.c")
240
258
  assert f.include?("testdata/xyz.c")
241
259
  assert f.include?("testdata/CVS")
260
+ assert f.include?("testdata/.svn")
242
261
  assert f.include?("testdata/x.bak")
243
262
  assert f.include?("testdata/x~")
244
263
  end
@@ -247,6 +266,8 @@ class TestFileList < Test::Unit::TestCase
247
266
  fl = FileList.new
248
267
  assert fl.exclude?("x/CVS/y")
249
268
  assert fl.exclude?("x\\CVS\\y")
269
+ assert fl.exclude?("x/.svn/y")
270
+ assert fl.exclude?("x\\.svn\\y")
250
271
  assert fl.exclude?("x/core")
251
272
  assert fl.exclude?("x\\core")
252
273
  end
@@ -256,6 +277,8 @@ class TestFileList < Test::Unit::TestCase
256
277
  fl.exclude(/~\d+$/)
257
278
  assert fl.exclude?("x/CVS/y")
258
279
  assert fl.exclude?("x\\CVS\\y")
280
+ assert fl.exclude?("x/.svn/y")
281
+ assert fl.exclude?("x\\.svn\\y")
259
282
  assert fl.exclude?("x/core")
260
283
  assert fl.exclude?("x\\core")
261
284
  assert fl.exclude?("x/abc~1")
@@ -427,6 +450,7 @@ class TestFileList < Test::Unit::TestCase
427
450
  verbose(false) do
428
451
  mkdir "testdata" unless File.exist? "testdata"
429
452
  mkdir "testdata/CVS" rescue nil
453
+ mkdir "testdata/.svn" rescue nil
430
454
  touch "testdata/.dummy"
431
455
  touch "testdata/x.bak"
432
456
  touch "testdata/x~"
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.10.1
3
3
  specification_version: 1
4
4
  name: rake
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.5.3
7
- date: 2005-04-09
6
+ version: 0.5.4
7
+ date: 2005-04-30
8
8
  summary: Ruby based make-like utility.
9
9
  require_paths:
10
10
  - lib
@@ -32,6 +32,7 @@ files:
32
32
  - README
33
33
  - Rakefile
34
34
  - TODO
35
+ - TAGS
35
36
  - MIT-LICENSE
36
37
  - bin/rake
37
38
  - lib/rake.rb
@@ -78,8 +79,10 @@ files:
78
79
  - doc/example/b.c
79
80
  - doc/example/main.c
80
81
  - doc/release_notes/rake-0.4.14.rdoc
82
+ - doc/release_notes/rake-0.5.3.rdoc
81
83
  - doc/release_notes/rake-0.4.15.rdoc
82
84
  - doc/release_notes/rake-0.5.0.rdoc
85
+ - doc/release_notes/rake-0.5.4.rdoc
83
86
  test_files: []
84
87
  rdoc_options:
85
88
  - "--title"
@@ -97,8 +100,10 @@ extra_rdoc_files:
97
100
  - doc/rational.rdoc
98
101
  - doc/rakefile.rdoc
99
102
  - doc/release_notes/rake-0.4.14.rdoc
103
+ - doc/release_notes/rake-0.5.3.rdoc
100
104
  - doc/release_notes/rake-0.4.15.rdoc
101
105
  - doc/release_notes/rake-0.5.0.rdoc
106
+ - doc/release_notes/rake-0.5.4.rdoc
102
107
  executables:
103
108
  - rake
104
109
  extensions: []