rake 0.9.0.beta.2 → 0.9.0.beta.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.
- data/lib/rake.rb +3 -1
- data/lib/rake/file_utils_ext.rb +30 -20
- data/lib/rake/version.rb +1 -1
- metadata +2 -2
data/lib/rake.rb
CHANGED
data/lib/rake/file_utils_ext.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
require 'rake/file_utils'
|
2
2
|
|
3
3
|
module Rake
|
4
|
-
#
|
5
|
-
# FileUtilsExt provides a custom version of the FileUtils methods
|
6
|
-
# respond to the <tt>verbose</tt> and <tt>nowrite</tt>
|
4
|
+
#
|
5
|
+
# FileUtilsExt provides a custom version of the FileUtils methods
|
6
|
+
# that respond to the <tt>verbose</tt> and <tt>nowrite</tt>
|
7
|
+
# commands.
|
7
8
|
#
|
8
9
|
module FileUtilsExt
|
9
10
|
include FileUtils
|
@@ -37,14 +38,17 @@ module Rake
|
|
37
38
|
EOS
|
38
39
|
end
|
39
40
|
|
40
|
-
# Get/set the verbose flag controlling output from the FileUtils
|
41
|
-
# If verbose is true, then the utility method is
|
41
|
+
# Get/set the verbose flag controlling output from the FileUtils
|
42
|
+
# utilities. If verbose is true, then the utility method is
|
43
|
+
# echoed to standard output.
|
42
44
|
#
|
43
45
|
# Examples:
|
44
|
-
# verbose # return the current value of the
|
46
|
+
# verbose # return the current value of the
|
47
|
+
# # verbose flag
|
45
48
|
# verbose(v) # set the verbose flag to _v_.
|
46
|
-
# verbose(v) { code } # Execute code with the verbose flag set
|
47
|
-
# # Return to the
|
49
|
+
# verbose(v) { code } # Execute code with the verbose flag set
|
50
|
+
# # temporarily to _v_. Return to the
|
51
|
+
# # original value when code is done.
|
48
52
|
def verbose(value=nil)
|
49
53
|
oldvalue = FileUtilsExt.verbose_flag
|
50
54
|
FileUtilsExt.verbose_flag = value unless value.nil?
|
@@ -58,14 +62,17 @@ module Rake
|
|
58
62
|
FileUtilsExt.verbose_flag
|
59
63
|
end
|
60
64
|
|
61
|
-
# Get/set the nowrite flag controlling output from the FileUtils
|
62
|
-
# If verbose is true, then the utility method is
|
65
|
+
# Get/set the nowrite flag controlling output from the FileUtils
|
66
|
+
# utilities. If verbose is true, then the utility method is
|
67
|
+
# echoed to standard output.
|
63
68
|
#
|
64
69
|
# Examples:
|
65
|
-
# nowrite # return the current value of the
|
70
|
+
# nowrite # return the current value of the
|
71
|
+
# # nowrite flag
|
66
72
|
# nowrite(v) # set the nowrite flag to _v_.
|
67
|
-
# nowrite(v) { code } # Execute code with the nowrite flag set
|
68
|
-
# #
|
73
|
+
# nowrite(v) { code } # Execute code with the nowrite flag set
|
74
|
+
# # temporarily to _v_. Return to the
|
75
|
+
# # original value when code is done.
|
69
76
|
def nowrite(value=nil)
|
70
77
|
oldvalue = FileUtilsExt.nowrite_flag
|
71
78
|
FileUtilsExt.nowrite_flag = value unless value.nil?
|
@@ -79,8 +86,8 @@ module Rake
|
|
79
86
|
oldvalue
|
80
87
|
end
|
81
88
|
|
82
|
-
# Use this function to prevent potentially destructive ruby code
|
83
|
-
# running when the :nowrite flag is set.
|
89
|
+
# Use this function to prevent potentially destructive ruby code
|
90
|
+
# from running when the :nowrite flag is set.
|
84
91
|
#
|
85
92
|
# Example:
|
86
93
|
#
|
@@ -88,9 +95,12 @@ module Rake
|
|
88
95
|
# project.build
|
89
96
|
# end
|
90
97
|
#
|
91
|
-
# The following code will build the project under normal
|
92
|
-
# nowrite(true) flag is set, then the example
|
98
|
+
# The following code will build the project under normal
|
99
|
+
# conditions. If the nowrite(true) flag is set, then the example
|
100
|
+
# will print:
|
101
|
+
#
|
93
102
|
# DRYRUN: Building Project
|
103
|
+
#
|
94
104
|
# instead of actually building the project.
|
95
105
|
#
|
96
106
|
def when_writing(msg=nil)
|
@@ -116,8 +126,9 @@ module Rake
|
|
116
126
|
$stderr.puts(message)
|
117
127
|
end
|
118
128
|
|
119
|
-
# Check that the options do not contain options not listed in
|
120
|
-
# ArgumentError exception is thrown if non-declared
|
129
|
+
# Check that the options do not contain options not listed in
|
130
|
+
# +optdecl+. An ArgumentError exception is thrown if non-declared
|
131
|
+
# options are found.
|
121
132
|
def rake_check_options(options, *optdecl)
|
122
133
|
h = options.dup
|
123
134
|
optdecl.each do |name|
|
@@ -128,5 +139,4 @@ module Rake
|
|
128
139
|
|
129
140
|
extend self
|
130
141
|
end
|
131
|
-
|
132
142
|
end
|
data/lib/rake/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: rake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease: 6
|
5
|
-
version: 0.9.0.beta.
|
5
|
+
version: 0.9.0.beta.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jim Weirich
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-06 00:00:00 -05:00
|
14
14
|
default_executable: rake
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|