rake 0.9.0.beta.0 → 0.9.0.beta.1

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
@@ -37,9 +37,6 @@
37
37
  call 'task :xzy' in your code, include Rake::DSL into your class, or
38
38
  put the code in a Rake::DSL.environment do ... end block.
39
39
 
40
- * Allow single line comments immediately prior to a task to be used in
41
- place of +desc+.
42
-
43
40
  * Split rake.rb into individual files.
44
41
 
45
42
  * Support for the --where (-W) flag for showing where a task is defined.
@@ -383,32 +383,18 @@ loading.
383
383
 
384
384
  Standard Ruby comments (beginning with "#") can be used anywhere it is
385
385
  legal in Ruby source code, including comments for tasks and rules.
386
- A single-line comment immediately before a task (with no blank line
387
- between it and the task) will be used as that task's description, and
388
- the task and description will appear in the list displayed
389
- using the "-T" switch.
386
+ However, if you wish a task to be described using the "-T" switch,
387
+ then you need to use the +desc+ command to describe the task.
390
388
 
391
389
  === Example:
392
390
 
393
- # Create a distribution package
391
+ desc "Create a distribution package"
394
392
  task :package => [ ... ] do ... end
395
393
 
396
- You can also use the +desc+ command before a task to set the
397
- description for the task. In this case, intervening blank lines
398
- are allowed
399
-
400
- === Example:
401
-
402
- desc 'Create a distribution package'
403
-
404
- task :package => [ ... ] do ... end
405
-
406
- The +desc+ comment takes priority over the comment for of description.
407
-
408
394
  The "-T" switch (or "--tasks" if you like to spell things out) will
409
- display a list of tasks that have a description. If you use
410
- comments or +desc+ to describe your major tasks, you have a
411
- semi-automatic way of generating a summary of your Rake file.
395
+ display a list of tasks that have a description. If you use +desc+ to
396
+ describe your major tasks, you have a semi-automatic way of generating
397
+ a summary of your Rake file.
412
398
 
413
399
  traken$ rake -T
414
400
  (in /home/.../rake)
@@ -287,39 +287,13 @@ module Rake
287
287
 
288
288
  private
289
289
 
290
- # Return the current description. If there isn't one, try to find it
291
- # by reading in the source file and looking for a comment immediately
292
- # prior to the task definition
290
+ # Return the current description, clearing it in the process.
293
291
  def get_description(task)
294
- desc = @last_description || find_preceding_comment_for_task(task)
292
+ desc = @last_description
295
293
  @last_description = nil
296
294
  desc
297
295
  end
298
296
 
299
- def find_preceding_comment_for_task(task)
300
- loc = task.locations.last
301
- file_name, line = parse_location(loc)
302
- return nil unless file_name
303
- comment_from_file(file_name, line)
304
- end
305
-
306
- def parse_location(loc)
307
- if loc =~ /^(.*):(\d+)/
308
- [ $1, Integer($2) ]
309
- else
310
- nil
311
- end
312
- end
313
-
314
- def comment_from_file(file_name, line)
315
- return if file_name == '(eval)'
316
- @file_cache ||= {}
317
- content = (@file_cache[file_name] ||= File.readlines(file_name))
318
- line -= 2
319
- return nil unless content[line] =~ /^\s*#\s*(.*)/
320
- $1
321
- end
322
-
323
297
  class << self
324
298
  attr_accessor :record_task_metadata
325
299
  TaskManager.record_task_metadata = false
@@ -5,7 +5,7 @@ module Rake
5
5
  MINOR = 9,
6
6
  BUILD = 0,
7
7
  BETA = 'beta',
8
- BETANUM = 0,
8
+ BETANUM = 1,
9
9
  ]
10
10
  end
11
11
  VERSION = Version::NUMBERS.join('.')
@@ -369,7 +369,7 @@ class SessionBasedTests < Test::Unit::TestCase
369
369
  in_environment("PWD" => "test/data/comments") do
370
370
  rake "-T"
371
371
  end
372
- assert_match("comment for t1", @out)
372
+ assert_no_match(/comment for t1/, @out)
373
373
  end
374
374
 
375
375
  def test_comment_separated_from_task_by_blank_line_is_not_picked_up
@@ -389,7 +389,7 @@ class SessionBasedTests < Test::Unit::TestCase
389
389
 
390
390
  def test_correct_number_of_tasks_reported
391
391
  Dir.chdir("test/data/comments") { rake("-T")}
392
- assert_equal(3, @out.split(/\n/).grep(/t\d/).size)
392
+ assert_equal(2, @out.split(/\n/).grep(/t\d/).size)
393
393
  end
394
394
 
395
395
  def test_file_list_is_requirable_separately
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0.beta.0
4
+ prerelease: 6
5
+ version: 0.9.0.beta.1
5
6
  platform: ruby
6
7
  authors:
7
8
  - Jim Weirich
@@ -9,29 +10,31 @@ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
12
 
12
- date: 2011-02-22 00:00:00 -05:00
13
+ date: 2011-02-28 00:00:00 -05:00
13
14
  default_executable: rake
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: session
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
20
21
  requirements:
21
22
  - - ~>
22
23
  - !ruby/object:Gem::Version
23
24
  version: "2.4"
24
- version:
25
+ type: :development
26
+ version_requirements: *id001
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: flexmock
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
29
+ prerelease: false
30
+ requirement: &id002 !ruby/object:Gem::Requirement
31
+ none: false
30
32
  requirements:
31
33
  - - ~>
32
34
  - !ruby/object:Gem::Version
33
35
  version: 0.8.11
34
- version:
36
+ type: :development
37
+ version_requirements: *id002
35
38
  description: " Rake is a Make-like program implemented in Ruby. Tasks\n and dependencies are specified in standard Ruby syntax.\n"
36
39
  email: jim@weirichhouse.org
37
40
  executables:
@@ -227,21 +230,21 @@ rdoc_options:
227
230
  require_paths:
228
231
  - lib
229
232
  required_ruby_version: !ruby/object:Gem::Requirement
233
+ none: false
230
234
  requirements:
231
235
  - - ">="
232
236
  - !ruby/object:Gem::Version
233
237
  version: "0"
234
- version:
235
238
  required_rubygems_version: !ruby/object:Gem::Requirement
239
+ none: false
236
240
  requirements:
237
241
  - - ">="
238
242
  - !ruby/object:Gem::Version
239
243
  version: 1.3.2
240
- version:
241
244
  requirements: []
242
245
 
243
246
  rubyforge_project: rake
244
- rubygems_version: 1.3.5
247
+ rubygems_version: 1.5.2
245
248
  signing_key:
246
249
  specification_version: 3
247
250
  summary: Ruby based make-like utility.