rake 0.8.0 → 0.8.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
@@ -1,6 +1,11 @@
1
1
  = Rake Changelog
2
2
 
3
- == Pre-Version 0.7.4
3
+ == Version 0.8.1
4
+
5
+ * Removed requires on parsedate.rb (in Ftptools)
6
+ * Removed ftools from rake.rb. Made it options in sys.rb
7
+
8
+ == Version 0.8.0
4
9
 
5
10
  * Added task parameters (e.g. "rake build[version7]")
6
11
  * Made task parameters passable to prerequisites.
@@ -29,10 +29,9 @@
29
29
  # as a library via a require statement, but it can be distributed
30
30
  # independently as an application.
31
31
 
32
- RAKEVERSION = '0.8.0'
32
+ RAKEVERSION = '0.8.1'
33
33
 
34
34
  require 'rbconfig'
35
- require 'ftools'
36
35
  require 'getoptlong'
37
36
  require 'fileutils'
38
37
  require 'singleton'
@@ -6,7 +6,6 @@
6
6
  # use.
7
7
 
8
8
  require 'date'
9
- require 'parsedate'
10
9
  require 'net/ftp'
11
10
 
12
11
  module Rake # :nodoc:
@@ -20,6 +19,10 @@ module Rake # :nodoc:
20
19
  @date_class ||= Date
21
20
  end
22
21
 
22
+ def self.time
23
+ @time_class ||= Time
24
+ end
25
+
23
26
  def initialize(path, entry)
24
27
  @path = path
25
28
  @mode, line, @owner, @group, size, d1, d2, d3, @name = entry.split(' ')
@@ -54,17 +57,28 @@ module Rake # :nodoc:
54
57
  end
55
58
 
56
59
  def determine_time(d1, d2, d3)
57
- elements = ParseDate.parsedate("#{d1} #{d2} #{d3}")
58
- if elements[0].nil?
59
- today = self.class.date.today
60
- if elements[1] > today.month
61
- elements[0] = today.year - 1
62
- else
63
- elements[0] = today.year
60
+ now = self.class.time.now
61
+ if /:/ =~ d3
62
+ h, m = d3.split(':')
63
+ result = Time.parse("#{d1} #{d2} #{now.year} #{d3}")
64
+ if result > now
65
+ result = Time.parse("#{d1} #{d2} #{now.year-1} #{d3}")
64
66
  end
67
+ else
68
+ result = Time.parse("#{d1} #{d2} #{d3}")
65
69
  end
66
- elements = elements.collect { |el| el.nil? ? 0 : el }
67
- Time.mktime(*elements[0,7])
70
+ result
71
+ # elements = ParseDate.parsedate("#{d1} #{d2} #{d3}")
72
+ # if elements[0].nil?
73
+ # today = self.class.date.today
74
+ # if elements[1] > today.month
75
+ # elements[0] = today.year - 1
76
+ # else
77
+ # elements[0] = today.year
78
+ # end
79
+ # end
80
+ # elements = elements.collect { |el| el.nil? ? 0 : el }
81
+ # Time.mktime(*elements[0,7])
68
82
  end
69
83
  end
70
84
 
@@ -23,7 +23,10 @@
23
23
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
24
  #++
25
25
  #
26
- require 'ftools'
26
+ begin
27
+ require 'ftools'
28
+ rescue LoadError
29
+ end
27
30
  require 'rbconfig'
28
31
 
29
32
  ######################################################################
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'ftools'
4
-
5
3
  module FileCreation
6
4
  OLDFILE = "testdata/old"
7
5
  NEWFILE = "testdata/new"
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'date'
4
+ require 'time'
4
5
  require 'test/unit'
5
6
  require 'rake/contrib/ftptools'
6
7
 
@@ -8,13 +9,16 @@ class FakeDate
8
9
  def self.today
9
10
  Date.new(2003,10,3)
10
11
  end
12
+ def self.now
13
+ Time.local(2003,10,3,12,00,00)
14
+ end
11
15
  end
12
16
 
13
17
 
14
18
  class TestFtpFile < Test::Unit::TestCase
15
19
 
16
20
  def setup
17
- Rake::FtpFile.class_eval { @date_class = FakeDate }
21
+ Rake::FtpFile.class_eval { @date_class = FakeDate; @time_class = FakeDate }
18
22
  end
19
23
 
20
24
  def test_general
@@ -261,7 +261,7 @@ class TestRules < Test::Unit::TestCase
261
261
 
262
262
  def test_rule_with_proc_dependent_will_trigger
263
263
  ran = false
264
- File.makedirs("testdata/src/jw")
264
+ mkdir_p("testdata/src/jw")
265
265
  create_file("testdata/src/jw/X.java")
266
266
  rule %r(classes/.*\.class) => [
267
267
  proc { |fn| fn.pathmap("%{classes,testdata/src}d/%n.java") }
@@ -278,7 +278,7 @@ class TestRules < Test::Unit::TestCase
278
278
 
279
279
  def test_proc_returning_lists_are_flattened_into_prereqs
280
280
  ran = false
281
- File.makedirs("testdata/flatten")
281
+ mkdir_p("testdata/flatten")
282
282
  create_file("testdata/flatten/a.txt")
283
283
  task 'testdata/flatten/b.data' do |t|
284
284
  ran = true
metadata CHANGED
@@ -1,40 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4.7
3
- specification_version: 2
4
2
  name: rake
5
3
  version: !ruby/object:Gem::Version
6
- version: 0.8.0
7
- date: 2007-12-20 00:00:00 -05:00
8
- summary: Ruby based make-like utility.
9
- require_paths:
10
- - lib
11
- email: jim@weirichhouse.org
12
- homepage: http://rake.rubyforge.org
13
- rubyforge_project: rake
14
- description: Rake is a Make-like program implemented in Ruby. Tasks and dependencies are specified in standard Ruby syntax.
4
+ version: 0.8.1
5
+ platform: ruby
6
+ authors:
7
+ - Jim Weirich
15
8
  autorequire:
16
- default_executable: rake
17
9
  bindir: bin
18
- has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Requirement
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: "0"
24
- version:
25
- required_rubygems_version: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: "0"
30
- version:
31
- platform: ruby
32
- signing_key:
33
10
  cert_chain: []
34
11
 
35
- post_install_message:
36
- authors:
37
- - Jim Weirich
12
+ date: 2007-12-26 00:00:00 -05:00
13
+ default_executable: rake
14
+ dependencies: []
15
+
16
+ description: Rake is a Make-like program implemented in Ruby. Tasks and dependencies are specified in standard Ruby syntax.
17
+ email: jim@weirichhouse.org
18
+ executables:
19
+ - rake
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README
24
+ - MIT-LICENSE
25
+ - TODO
26
+ - CHANGES
27
+ - doc/glossary.rdoc
28
+ - doc/proto_rake.rdoc
29
+ - doc/rakefile.rdoc
30
+ - doc/rational.rdoc
31
+ - doc/release_notes/rake-0.4.14.rdoc
32
+ - doc/release_notes/rake-0.4.15.rdoc
33
+ - doc/release_notes/rake-0.5.0.rdoc
34
+ - doc/release_notes/rake-0.5.3.rdoc
35
+ - doc/release_notes/rake-0.5.4.rdoc
36
+ - doc/release_notes/rake-0.6.0.rdoc
37
+ - doc/release_notes/rake-0.7.0.rdoc
38
+ - doc/release_notes/rake-0.7.1.rdoc
39
+ - doc/release_notes/rake-0.7.2.rdoc
40
+ - doc/release_notes/rake-0.7.3.rdoc
38
41
  files:
39
42
  - install.rb
40
43
  - CHANGES
@@ -131,8 +134,9 @@ files:
131
134
  - doc/release_notes/rake-0.7.1.rdoc
132
135
  - doc/release_notes/rake-0.7.2.rdoc
133
136
  - doc/release_notes/rake-0.7.3.rdoc
134
- test_files: []
135
-
137
+ has_rdoc: true
138
+ homepage: http://rake.rubyforge.org
139
+ post_install_message:
136
140
  rdoc_options:
137
141
  - --line-numbers
138
142
  - --inline-source
@@ -140,30 +144,26 @@ rdoc_options:
140
144
  - README
141
145
  - --title
142
146
  - Rake -- Ruby Make
143
- extra_rdoc_files:
144
- - README
145
- - MIT-LICENSE
146
- - TODO
147
- - CHANGES
148
- - doc/glossary.rdoc
149
- - doc/proto_rake.rdoc
150
- - doc/rakefile.rdoc
151
- - doc/rational.rdoc
152
- - doc/release_notes/rake-0.4.14.rdoc
153
- - doc/release_notes/rake-0.4.15.rdoc
154
- - doc/release_notes/rake-0.5.0.rdoc
155
- - doc/release_notes/rake-0.5.3.rdoc
156
- - doc/release_notes/rake-0.5.4.rdoc
157
- - doc/release_notes/rake-0.6.0.rdoc
158
- - doc/release_notes/rake-0.7.0.rdoc
159
- - doc/release_notes/rake-0.7.1.rdoc
160
- - doc/release_notes/rake-0.7.2.rdoc
161
- - doc/release_notes/rake-0.7.3.rdoc
162
- executables:
163
- - rake
164
- extensions: []
165
-
147
+ require_paths:
148
+ - lib
149
+ required_ruby_version: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: "0"
154
+ version:
155
+ required_rubygems_version: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: "0"
160
+ version:
166
161
  requirements: []
167
162
 
168
- dependencies: []
163
+ rubyforge_project: rake
164
+ rubygems_version: 1.0.1
165
+ signing_key:
166
+ specification_version: 2
167
+ summary: Ruby based make-like utility.
168
+ test_files: []
169
169