rake 0.8.3 → 0.8.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.

@@ -2,12 +2,15 @@
2
2
 
3
3
  require 'test/unit'
4
4
  require 'rake'
5
+ require 'test/rake_test_setup'
5
6
 
6
7
  class TaskManager
7
8
  include Rake::TaskManager
8
9
  end
9
10
 
10
11
  class TestTaskManager < Test::Unit::TestCase
12
+ include TestMethods
13
+
11
14
  def setup
12
15
  @tm = TaskManager.new
13
16
  end
@@ -68,7 +71,7 @@ class TestTaskManager < Test::Unit::TestCase
68
71
  end
69
72
 
70
73
  def test_name_lookup_with_nonexistent_task
71
- assert_raise(RuntimeError) {
74
+ assert_exception(RuntimeError) {
72
75
  t = @tm["DOES NOT EXIST"]
73
76
  }
74
77
  end
@@ -5,11 +5,13 @@ require 'fileutils'
5
5
  require 'rake'
6
6
  require 'test/filecreation'
7
7
  require 'test/capture_stdout'
8
+ require 'test/rake_test_setup'
8
9
 
9
10
  ######################################################################
10
11
  class TestTask < Test::Unit::TestCase
11
12
  include CaptureStdout
12
13
  include Rake
14
+ include TestMethods
13
15
 
14
16
  def setup
15
17
  Task.clear
@@ -48,7 +50,7 @@ class TestTask < Test::Unit::TestCase
48
50
  t2 = task(:t2 => [:t1]) { |t| runlist << t.name }
49
51
  assert_equal ["t2"], t1.prerequisites
50
52
  assert_equal ["t1"], t2.prerequisites
51
- ex = assert_raise RuntimeError do
53
+ ex = assert_exception RuntimeError do
52
54
  t1.invoke
53
55
  end
54
56
  assert_match(/circular dependency/i, ex.message)
@@ -121,7 +123,7 @@ class TestTask < Test::Unit::TestCase
121
123
  def test_find
122
124
  task :tfind
123
125
  assert_equal "tfind", Task[:tfind].name
124
- ex = assert_raises(RuntimeError) { Task[:leaves] }
126
+ ex = assert_exception(RuntimeError) { Task[:leaves] }
125
127
  assert_equal "Don't know how to build task 'leaves'", ex.message
126
128
  end
127
129
 
@@ -218,6 +220,7 @@ end
218
220
  class TestTaskWithArguments < Test::Unit::TestCase
219
221
  include CaptureStdout
220
222
  include Rake
223
+ include TestMethods
221
224
 
222
225
  def setup
223
226
  Task.clear
@@ -255,7 +258,7 @@ class TestTaskWithArguments < Test::Unit::TestCase
255
258
  end
256
259
 
257
260
  def test_illegal_keys_in_task_name_hash
258
- assert_raise RuntimeError do
261
+ assert_exception RuntimeError do
259
262
  t = task(:t, :x, :y => 1, :needs => [:pre])
260
263
  end
261
264
  end
@@ -5,6 +5,8 @@ require 'rake/testtask'
5
5
 
6
6
  class TestTestTask < Test::Unit::TestCase
7
7
  include Rake
8
+ include TestMethods
9
+
8
10
  def setup
9
11
  Task.clear
10
12
  ENV.delete('TEST')
@@ -7,12 +7,14 @@ rescue LoadError
7
7
  end
8
8
 
9
9
  require 'test/unit'
10
+ require 'flexmock/test_unit'
10
11
  require 'test/capture_stdout'
12
+ require 'test/rake_test_setup'
11
13
  require 'rake'
12
- require 'flexmock/test_unit'
13
14
 
14
15
  class TestTopLevelFunctions < Test::Unit::TestCase
15
16
  include CaptureStdout
17
+ include TestMethods
16
18
 
17
19
  def setup
18
20
  super
@@ -79,6 +81,6 @@ class TestTopLevelFunctions < Test::Unit::TestCase
79
81
  end
80
82
 
81
83
  def test_missing_other_constant
82
- assert_raise(NameError) do Object.const_missing(:Xyz) end
84
+ assert_exception(NameError) do Object.const_missing(:Xyz) end
83
85
  end
84
86
  end
@@ -8,47 +8,62 @@ require 'rake'
8
8
 
9
9
  class TestWin32 < Test::Unit::TestCase
10
10
  include InEnvironment
11
+ include TestMethods
11
12
 
12
13
  Win32 = Rake::Win32
13
-
14
- def test_win32_system_dir_uses_appdata_if_defined
15
- in_environment('RAKE_SYSTEM' => nil, 'APPDATA' => '\\AD') do
16
- assert_equal "/AD/Rake", Win32.win32_system_dir
14
+
15
+ def test_win32_system_dir_uses_home_if_defined
16
+ in_environment('RAKE_SYSTEM' => nil, 'HOME' => 'C:\\HP') do
17
+ assert_equal "C:/HP/Rake", Win32.win32_system_dir
17
18
  end
18
19
  end
19
20
 
20
- def test_win32_system_dir_uses_homedrive_otherwise
21
+ def test_win32_system_dir_uses_homedrive_homepath_when_no_home_defined
21
22
  in_environment(
22
23
  'RAKE_SYSTEM' => nil,
23
- 'APPDATA' => nil,
24
+ 'HOME' => nil,
24
25
  'HOMEDRIVE' => "C:",
25
- "HOMEPATH" => "\\HP"
26
+ 'HOMEPATH' => "\\HP"
26
27
  ) do
27
28
  assert_equal "C:/HP/Rake", Win32.win32_system_dir
28
29
  end
29
30
  end
30
31
 
31
- def test_win32_system_dir_uses_userprofile_otherwise
32
+ def test_win32_system_dir_uses_appdata_when_no_home_or_home_combo
32
33
  in_environment(
33
34
  'RAKE_SYSTEM' => nil,
34
- 'APPDATA' => nil,
35
+ 'HOME' => nil,
35
36
  'HOMEDRIVE' => nil,
36
- "HOMEPATH" => nil,
37
- "USERPROFILE" => '\\UP'
37
+ 'HOMEPATH' => nil,
38
+ 'APPDATA' => "C:\\Documents and Settings\\HP\\Application Data"
38
39
  ) do
39
- assert_equal "/UP/Rake", Win32.win32_system_dir
40
+ assert_equal "C:/Documents and Settings/HP/Application Data/Rake", Win32.win32_system_dir
40
41
  end
41
42
  end
42
43
 
43
- def test_win32_system_dir_nil_of_no_env_vars
44
+ def test_win32_system_dir_fallback_to_userprofile_otherwise
44
45
  in_environment(
45
46
  'RAKE_SYSTEM' => nil,
47
+ 'HOME' => nil,
48
+ 'HOMEDRIVE' => nil,
49
+ 'HOMEPATH' => nil,
46
50
  'APPDATA' => nil,
51
+ 'USERPROFILE' => "C:\\Documents and Settings\\HP"
52
+ ) do
53
+ assert_equal "C:/Documents and Settings/HP/Rake", Win32.win32_system_dir
54
+ end
55
+ end
56
+
57
+ def test_win32_system_dir_nil_of_no_env_vars
58
+ in_environment(
59
+ 'RAKE_SYSTEM' => nil,
60
+ 'HOME' => nil,
47
61
  'HOMEDRIVE' => nil,
48
62
  "HOMEPATH" => nil,
63
+ 'APPDATA' => nil,
49
64
  "USERPROFILE" => nil
50
65
  ) do
51
- assert_raise(Rake::Win32::Win32HomeError) do
66
+ assert_exception(Rake::Win32::Win32HomeError) do
52
67
  Win32.win32_system_dir
53
68
  end
54
69
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Weirich
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-09-25 00:00:00 -04:00
12
+ date: 2009-03-04 00:00:00 -05:00
13
13
  default_executable: rake
14
14
  dependencies: []
15
15
 
@@ -24,6 +24,7 @@ extra_rdoc_files:
24
24
  - MIT-LICENSE
25
25
  - TODO
26
26
  - CHANGES
27
+ - doc/command_line_usage.rdoc
27
28
  - doc/glossary.rdoc
28
29
  - doc/proto_rake.rdoc
29
30
  - doc/rakefile.rdoc
@@ -41,6 +42,7 @@ extra_rdoc_files:
41
42
  - doc/release_notes/rake-0.8.0.rdoc
42
43
  - doc/release_notes/rake-0.8.2.rdoc
43
44
  - doc/release_notes/rake-0.8.3.rdoc
45
+ - doc/release_notes/rake-0.8.4.rdoc
44
46
  files:
45
47
  - install.rb
46
48
  - CHANGES
@@ -62,6 +64,7 @@ files:
62
64
  - lib/rake/packagetask.rb
63
65
  - lib/rake/rake_test_loader.rb
64
66
  - lib/rake/rdoctask.rb
67
+ - lib/rake/repaired_system.rb
65
68
  - lib/rake/ruby182_test_unit_fix.rb
66
69
  - lib/rake/runtest.rb
67
70
  - lib/rake/tasklib.rb
@@ -98,6 +101,7 @@ files:
98
101
  - test/test_package_task.rb
99
102
  - test/test_pathmap.rb
100
103
  - test/test_rake.rb
104
+ - test/test_rdoc_task.rb
101
105
  - test/test_require.rb
102
106
  - test/test_rules.rb
103
107
  - test/test_task_arguments.rb
@@ -119,6 +123,7 @@ files:
119
123
  - test/data/statusreturn/Rakefile
120
124
  - test/data/unittest/Rakefile
121
125
  - test/data/unittest/subdir
126
+ - doc/command_line_usage.rdoc
122
127
  - doc/example
123
128
  - doc/example/a.c
124
129
  - doc/example/b.c
@@ -145,6 +150,7 @@ files:
145
150
  - doc/release_notes/rake-0.8.0.rdoc
146
151
  - doc/release_notes/rake-0.8.2.rdoc
147
152
  - doc/release_notes/rake-0.8.3.rdoc
153
+ - doc/release_notes/rake-0.8.4.rdoc
148
154
  has_rdoc: true
149
155
  homepage: http://rake.rubyforge.org
150
156
  post_install_message:
@@ -172,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
178
  requirements: []
173
179
 
174
180
  rubyforge_project: rake
175
- rubygems_version: 1.2.0
181
+ rubygems_version: 1.3.1
176
182
  signing_key:
177
183
  specification_version: 2
178
184
  summary: Ruby based make-like utility.