Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 25 lines (20 sloc) 0.67 kb
ac1087e Watson import rake v0.9.2.2
Watson1978 authored
1 require 'rake/file_task'
2 require 'rake/early_time'
3
4 module Rake
5
6 # A FileCreationTask is a file task that when used as a dependency will be
7 # needed if and only if the file has not been created. Once created, it is
8 # not re-triggered if any of its dependencies are newer, nor does trigger
9 # any rebuilds of tasks that depend on it whenever it is updated.
10 #
11 class FileCreationTask < FileTask
12 # Is this file task needed? Yes if it doesn't exist.
13 def needed?
14 ! File.exist?(name)
15 end
16
17 # Time stamp for file creation task. This time stamp is earlier
18 # than any other time stamp.
19 def timestamp
20 Rake::EARLY
21 end
22 end
23
24 end
Something went wrong with that request. Please try again.