rake 10.2.2 → 10.3.0
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.rdoc +18 -0
- data/Rakefile +1 -0
- data/lib/rake.rb +1 -1
- data/lib/rake/application.rb +6 -0
- data/lib/rake/backtrace.rb +3 -0
- data/lib/rake/clean.rb +13 -1
- data/lib/rake/cpu_counter.rb +3 -1
- data/lib/rake/file_task.rb +1 -1
- data/lib/rake/linked_list.rb +1 -1
- data/lib/rake/name_space.rb +36 -23
- data/test/test_rake_clean.rb +9 -0
- data/test/test_rake_file_task.rb +54 -0
- data/test/test_rake_name_space.rb +14 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e051b1f1a97aa88b0d3436bbb7ac9878d51b94c
|
4
|
+
data.tar.gz: e0065135845a6d264193616f9c686fc2661960e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ee50f4cb44444171b20ce5f5359152d874f600fca75467f92d3aa8da69b275177a7752ab8b9a6ccea86186616c180e06ba1c6ad67a06334b6a1c11de50436bc
|
7
|
+
data.tar.gz: 20c3f24c190b6cc1230bfe92d4ece47ece4cd2c5dcf007fb7e94ac7cfec28372862a2b02c0a39f71a0400ed52480b54e4c221edd75f4bf50a199a09a534b53e4
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/History.rdoc
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
=== 10.3 / 2014-04-15
|
2
|
+
|
3
|
+
Enhancements:
|
4
|
+
|
5
|
+
* Added --build-all option to rake which treats all file prerequisites as
|
6
|
+
out-of-date. Pull request #254 by Andrew Gilbert.
|
7
|
+
* Added Rake::NameSpace#scope. Issue #263 by Jon San Miguel.
|
8
|
+
|
9
|
+
Bug fixes:
|
10
|
+
|
11
|
+
* Suppress org.jruby package files in rake error messages for JRuby users.
|
12
|
+
Issue #213 by Charles Nutter.
|
13
|
+
* Fixed typo, removed extra "h". Pull request #267 by Hsing-Hui Hsu.
|
14
|
+
* Rake no longer reports an error when cleaning already-deleted files. Pull
|
15
|
+
request #266 by Randy Coulman.
|
16
|
+
* Consume stderr while determining CPU count to avoid hang. Issue #268 by
|
17
|
+
Albert Sun.
|
18
|
+
|
1
19
|
=== 10.2.2 / 2014-03-27
|
2
20
|
|
3
21
|
Bug fixes:
|
data/Rakefile
CHANGED
data/lib/rake.rb
CHANGED
data/lib/rake/application.rb
CHANGED
@@ -397,6 +397,12 @@ module Rake
|
|
397
397
|
select_trace_output(options, 'backtrace', value)
|
398
398
|
}
|
399
399
|
],
|
400
|
+
['--build-all', '-B',
|
401
|
+
"Build all prerequisites, including those which are up-to-date.",
|
402
|
+
lambda { |value|
|
403
|
+
options.build_all = true
|
404
|
+
}
|
405
|
+
],
|
400
406
|
['--comments',
|
401
407
|
"Show commented tasks only",
|
402
408
|
lambda { |value|
|
data/lib/rake/backtrace.rb
CHANGED
@@ -9,6 +9,9 @@ module Rake
|
|
9
9
|
map { |f| File.expand_path(f) }.
|
10
10
|
reject { |s| s.nil? || s =~ /^ *$/ }
|
11
11
|
SUPPRESSED_PATHS_RE = SUPPRESSED_PATHS.map { |f| Regexp.quote(f) }.join("|")
|
12
|
+
SUPPRESSED_PATHS_RE << "|^org\\/jruby\\/\\w+\\.java" if
|
13
|
+
Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
|
14
|
+
|
12
15
|
SUPPRESS_PATTERN = %r!(\A(#{SUPPRESSED_PATHS_RE})|bin/rake:\d+)!i
|
13
16
|
|
14
17
|
def self.collapse(backtrace)
|
data/lib/rake/clean.rb
CHANGED
@@ -31,9 +31,21 @@ module Rake
|
|
31
31
|
begin
|
32
32
|
rm_r file_name, opts
|
33
33
|
rescue StandardError => ex
|
34
|
-
puts "Failed to remove #{file_name}: #{ex}"
|
34
|
+
puts "Failed to remove #{file_name}: #{ex}" unless file_already_gone?(file_name)
|
35
35
|
end
|
36
36
|
end
|
37
|
+
|
38
|
+
def file_already_gone?(file_name)
|
39
|
+
return false if File.exist?(file_name)
|
40
|
+
|
41
|
+
path = file_name
|
42
|
+
while path = File.dirname(path)
|
43
|
+
return false unless File.readable?(path) && File.executable?(path)
|
44
|
+
break if ["/", "."].include?(path)
|
45
|
+
end
|
46
|
+
true
|
47
|
+
end
|
48
|
+
private_class_method :file_already_gone?
|
37
49
|
end
|
38
50
|
end
|
39
51
|
|
data/lib/rake/cpu_counter.rb
CHANGED
data/lib/rake/file_task.rb
CHANGED
@@ -13,7 +13,7 @@ module Rake
|
|
13
13
|
# Is this file task needed? Yes if it doesn't exist, or if its time stamp
|
14
14
|
# is out of date.
|
15
15
|
def needed?
|
16
|
-
! File.exist?(name) || out_of_date?(timestamp)
|
16
|
+
! File.exist?(name) || out_of_date?(timestamp) || @application.options.build_all
|
17
17
|
end
|
18
18
|
|
19
19
|
# Time stamp for file task.
|
data/lib/rake/linked_list.rb
CHANGED
@@ -13,7 +13,7 @@ module Rake
|
|
13
13
|
end
|
14
14
|
|
15
15
|
# Polymorphically add a new element to the head of a list. The
|
16
|
-
# type of head node will be the same list type
|
16
|
+
# type of head node will be the same list type as the tail.
|
17
17
|
def conj(item)
|
18
18
|
self.class.cons(item, self)
|
19
19
|
end
|
data/lib/rake/name_space.rb
CHANGED
@@ -1,25 +1,38 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
1
|
+
##
|
2
|
+
# The NameSpace class will lookup task names in the scope defined by a
|
3
|
+
# +namespace+ command.
|
4
|
+
|
5
|
+
class Rake::NameSpace
|
6
|
+
|
7
|
+
##
|
8
|
+
# Create a namespace lookup object using the given task manager
|
9
|
+
# and the list of scopes.
|
10
|
+
|
11
|
+
def initialize(task_manager, scope_list)
|
12
|
+
@task_manager = task_manager
|
13
|
+
@scope = scope_list.dup
|
14
|
+
end
|
15
|
+
|
16
|
+
##
|
17
|
+
# Lookup a task named +name+ in the namespace.
|
18
|
+
|
19
|
+
def [](name)
|
20
|
+
@task_manager.lookup(name, @scope)
|
21
|
+
end
|
22
|
+
|
23
|
+
##
|
24
|
+
# The scope of the namespace (a LinkedList)
|
25
|
+
|
26
|
+
def scope
|
27
|
+
@scope.dup
|
24
28
|
end
|
29
|
+
|
30
|
+
##
|
31
|
+
# Return the list of tasks defined in this and nested namespaces.
|
32
|
+
|
33
|
+
def tasks
|
34
|
+
@task_manager.tasks_in_scope(@scope)
|
35
|
+
end
|
36
|
+
|
25
37
|
end
|
38
|
+
|
data/test/test_rake_clean.rb
CHANGED
@@ -23,6 +23,15 @@ class TestRakeClean < Rake::TestCase
|
|
23
23
|
remove_undeletable_file
|
24
24
|
end
|
25
25
|
|
26
|
+
def test_cleanup_ignores_missing_files
|
27
|
+
file_name = File.join(@tempdir, "missing_directory" "no_such_file")
|
28
|
+
|
29
|
+
out, _ = capture_io do
|
30
|
+
Rake::Cleaner.cleanup(file_name, :verbose => false)
|
31
|
+
end
|
32
|
+
refute_match(/failed to remove/i, out)
|
33
|
+
end
|
34
|
+
|
26
35
|
private
|
27
36
|
|
28
37
|
def create_undeletable_file
|
data/test/test_rake_file_task.rb
CHANGED
@@ -98,6 +98,60 @@ class TestRakeFileTask < Rake::TestCase
|
|
98
98
|
assert @ran
|
99
99
|
end
|
100
100
|
|
101
|
+
def test_needed_eh_build_all
|
102
|
+
create_file 'a'
|
103
|
+
|
104
|
+
file 'a'
|
105
|
+
|
106
|
+
a_task = Task['a']
|
107
|
+
|
108
|
+
refute a_task.needed?
|
109
|
+
|
110
|
+
Rake.application.options.build_all = true
|
111
|
+
|
112
|
+
assert a_task.needed?
|
113
|
+
ensure
|
114
|
+
delete_file 'a'
|
115
|
+
end
|
116
|
+
|
117
|
+
def test_needed_eh_dependency
|
118
|
+
create_file 'a', Time.now
|
119
|
+
create_file 'b', Time.now - 60
|
120
|
+
|
121
|
+
create_file 'c', Time.now
|
122
|
+
create_file 'd', Time.now - 60
|
123
|
+
|
124
|
+
file 'b' => 'a'
|
125
|
+
|
126
|
+
b_task = Task['b']
|
127
|
+
|
128
|
+
assert b_task.needed?
|
129
|
+
|
130
|
+
file 'c' => 'd'
|
131
|
+
|
132
|
+
c_task = Task['c']
|
133
|
+
|
134
|
+
refute c_task.needed?
|
135
|
+
ensure
|
136
|
+
delete_file 'old'
|
137
|
+
delete_file 'new'
|
138
|
+
end
|
139
|
+
|
140
|
+
def test_needed_eh_exists
|
141
|
+
name = "dummy"
|
142
|
+
file name
|
143
|
+
|
144
|
+
ftask = Task[name]
|
145
|
+
|
146
|
+
assert ftask.needed?
|
147
|
+
|
148
|
+
create_file name
|
149
|
+
|
150
|
+
refute ftask.needed?
|
151
|
+
ensure
|
152
|
+
delete_file name
|
153
|
+
end
|
154
|
+
|
101
155
|
def test_source_is_first_prerequisite
|
102
156
|
t = file :f => ["preqA", "preqB"]
|
103
157
|
assert_equal "preqA", t.source
|
@@ -40,4 +40,18 @@ class TestRakeNameSpace < Rake::TestCase
|
|
40
40
|
ns.tasks.map { |tsk| tsk.name }
|
41
41
|
assert_equal ["n:nn:z"], nns.tasks.map { |t| t.name }
|
42
42
|
end
|
43
|
+
|
44
|
+
def test_scope
|
45
|
+
mgr = TM.new
|
46
|
+
|
47
|
+
scope = Rake::LinkedList.new 'b'
|
48
|
+
scope = scope.conj 'a'
|
49
|
+
|
50
|
+
ns = Rake::NameSpace.new mgr, scope
|
51
|
+
|
52
|
+
assert_equal scope, ns.scope
|
53
|
+
|
54
|
+
refute_same scope, ns.scope
|
55
|
+
end
|
56
|
+
|
43
57
|
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: 10.
|
4
|
+
version: 10.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Hodel
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
pfkQPF5Ezsi73pEpFN93Fy21NKCYQH1jCwWeKUF29MIMGd6kE3ZmHW/7fz5GwKIM
|
31
31
|
Ls5SgY48a0l7Hw==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2014-
|
33
|
+
date: 2014-04-15 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: minitest
|
metadata.gz.sig
CHANGED
Binary file
|