rake 10.5.0 → 13.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +5 -5
  2. data/CONTRIBUTING.rdoc +13 -8
  3. data/Gemfile +10 -0
  4. data/History.rdoc +2015 -288
  5. data/README.rdoc +40 -24
  6. data/Rakefile +25 -65
  7. data/bin/bundle +105 -0
  8. data/bin/console +7 -0
  9. data/bin/rake +20 -24
  10. data/bin/rdoc +29 -0
  11. data/bin/rubocop +29 -0
  12. data/bin/setup +6 -0
  13. data/doc/jamis.rb +1 -0
  14. data/doc/rake.1 +139 -124
  15. data/doc/rakefile.rdoc +2 -4
  16. data/exe/rake +27 -0
  17. data/lib/rake.rb +35 -43
  18. data/lib/rake/application.rb +124 -90
  19. data/lib/rake/backtrace.rb +3 -2
  20. data/lib/rake/clean.rb +7 -5
  21. data/lib/rake/cloneable.rb +1 -0
  22. data/lib/rake/cpu_counter.rb +10 -28
  23. data/lib/rake/default_loader.rb +1 -0
  24. data/lib/rake/dsl_definition.rb +5 -11
  25. data/lib/rake/early_time.rb +1 -0
  26. data/lib/rake/ext/core.rb +1 -0
  27. data/lib/rake/ext/string.rb +22 -21
  28. data/lib/rake/file_creation_task.rb +4 -3
  29. data/lib/rake/file_list.rb +34 -27
  30. data/lib/rake/file_task.rb +12 -4
  31. data/lib/rake/file_utils.rb +38 -32
  32. data/lib/rake/file_utils_ext.rb +8 -18
  33. data/lib/rake/invocation_chain.rb +1 -0
  34. data/lib/rake/invocation_exception_mixin.rb +1 -0
  35. data/lib/rake/late_time.rb +2 -1
  36. data/lib/rake/linked_list.rb +24 -15
  37. data/lib/rake/loaders/makefile.rb +5 -4
  38. data/lib/rake/multi_task.rb +2 -1
  39. data/lib/rake/name_space.rb +1 -1
  40. data/lib/rake/packagetask.rb +40 -17
  41. data/lib/rake/phony.rb +2 -1
  42. data/lib/rake/private_reader.rb +1 -0
  43. data/lib/rake/promise.rb +13 -12
  44. data/lib/rake/pseudo_status.rb +1 -0
  45. data/lib/rake/rake_module.rb +30 -1
  46. data/lib/rake/rake_test_loader.rb +18 -13
  47. data/lib/rake/rule_recursion_overflow_error.rb +2 -2
  48. data/lib/rake/scope.rb +3 -2
  49. data/lib/rake/task.rb +82 -31
  50. data/lib/rake/task_argument_error.rb +1 -0
  51. data/lib/rake/task_arguments.rb +15 -4
  52. data/lib/rake/task_manager.rb +54 -30
  53. data/lib/rake/tasklib.rb +2 -14
  54. data/lib/rake/testtask.rb +37 -61
  55. data/lib/rake/thread_history_display.rb +4 -3
  56. data/lib/rake/thread_pool.rb +16 -17
  57. data/lib/rake/trace_output.rb +2 -1
  58. data/lib/rake/version.rb +4 -1
  59. data/lib/rake/win32.rb +10 -15
  60. data/rake.gemspec +43 -0
  61. metadata +32 -219
  62. data/.autotest +0 -7
  63. data/.rubocop.yml +0 -27
  64. data/.togglerc +0 -7
  65. data/Manifest.txt +0 -166
  66. data/doc/release_notes/rake-0.4.14.rdoc +0 -23
  67. data/doc/release_notes/rake-0.4.15.rdoc +0 -35
  68. data/doc/release_notes/rake-0.5.0.rdoc +0 -53
  69. data/doc/release_notes/rake-0.5.3.rdoc +0 -78
  70. data/doc/release_notes/rake-0.5.4.rdoc +0 -46
  71. data/doc/release_notes/rake-0.6.0.rdoc +0 -141
  72. data/doc/release_notes/rake-0.7.0.rdoc +0 -119
  73. data/doc/release_notes/rake-0.7.1.rdoc +0 -59
  74. data/doc/release_notes/rake-0.7.2.rdoc +0 -121
  75. data/doc/release_notes/rake-0.7.3.rdoc +0 -47
  76. data/doc/release_notes/rake-0.8.0.rdoc +0 -114
  77. data/doc/release_notes/rake-0.8.2.rdoc +0 -165
  78. data/doc/release_notes/rake-0.8.3.rdoc +0 -112
  79. data/doc/release_notes/rake-0.8.4.rdoc +0 -147
  80. data/doc/release_notes/rake-0.8.5.rdoc +0 -53
  81. data/doc/release_notes/rake-0.8.6.rdoc +0 -37
  82. data/doc/release_notes/rake-0.8.7.rdoc +0 -55
  83. data/doc/release_notes/rake-0.9.0.rdoc +0 -112
  84. data/doc/release_notes/rake-0.9.1.rdoc +0 -52
  85. data/doc/release_notes/rake-0.9.2.2.rdoc +0 -55
  86. data/doc/release_notes/rake-0.9.2.rdoc +0 -49
  87. data/doc/release_notes/rake-0.9.3.rdoc +0 -102
  88. data/doc/release_notes/rake-0.9.4.rdoc +0 -60
  89. data/doc/release_notes/rake-0.9.5.rdoc +0 -55
  90. data/doc/release_notes/rake-0.9.6.rdoc +0 -64
  91. data/doc/release_notes/rake-10.0.0.rdoc +0 -178
  92. data/doc/release_notes/rake-10.0.1.rdoc +0 -58
  93. data/doc/release_notes/rake-10.0.2.rdoc +0 -53
  94. data/doc/release_notes/rake-10.0.3.rdoc +0 -191
  95. data/doc/release_notes/rake-10.1.0.rdoc +0 -61
  96. data/lib/rake/alt_system.rb +0 -110
  97. data/lib/rake/contrib/.document +0 -1
  98. data/lib/rake/contrib/compositepublisher.rb +0 -21
  99. data/lib/rake/contrib/ftptools.rb +0 -137
  100. data/lib/rake/contrib/publisher.rb +0 -81
  101. data/lib/rake/contrib/rubyforgepublisher.rb +0 -18
  102. data/lib/rake/contrib/sshpublisher.rb +0 -61
  103. data/lib/rake/contrib/sys.rb +0 -4
  104. data/lib/rake/ext/module.rb +0 -2
  105. data/lib/rake/ext/pathname.rb +0 -25
  106. data/lib/rake/ext/time.rb +0 -18
  107. data/lib/rake/gempackagetask.rb +0 -4
  108. data/lib/rake/pathmap.rb +0 -3
  109. data/lib/rake/rdoctask.rb +0 -4
  110. data/lib/rake/ruby182_test_unit_fix.rb +0 -29
  111. data/lib/rake/runtest.rb +0 -27
  112. data/rakelib/publish.rake +0 -20
  113. data/rakelib/test_times.rake +0 -25
  114. data/test/file_creation.rb +0 -34
  115. data/test/helper.rb +0 -129
  116. data/test/support/rakefile_definitions.rb +0 -478
  117. data/test/support/ruby_runner.rb +0 -34
  118. data/test/test_private_reader.rb +0 -42
  119. data/test/test_rake.rb +0 -40
  120. data/test/test_rake_application.rb +0 -643
  121. data/test/test_rake_application_options.rb +0 -468
  122. data/test/test_rake_backtrace.rb +0 -119
  123. data/test/test_rake_clean.rb +0 -61
  124. data/test/test_rake_cpu_counter.rb +0 -68
  125. data/test/test_rake_definitions.rb +0 -84
  126. data/test/test_rake_directory_task.rb +0 -76
  127. data/test/test_rake_dsl.rb +0 -40
  128. data/test/test_rake_early_time.rb +0 -31
  129. data/test/test_rake_extension.rb +0 -59
  130. data/test/test_rake_file_creation_task.rb +0 -56
  131. data/test/test_rake_file_list.rb +0 -670
  132. data/test/test_rake_file_list_path_map.rb +0 -8
  133. data/test/test_rake_file_task.rb +0 -197
  134. data/test/test_rake_file_utils.rb +0 -314
  135. data/test/test_rake_ftp_file.rb +0 -74
  136. data/test/test_rake_functional.rb +0 -482
  137. data/test/test_rake_invocation_chain.rb +0 -64
  138. data/test/test_rake_late_time.rb +0 -18
  139. data/test/test_rake_linked_list.rb +0 -84
  140. data/test/test_rake_makefile_loader.rb +0 -46
  141. data/test/test_rake_multi_task.rb +0 -64
  142. data/test/test_rake_name_space.rb +0 -57
  143. data/test/test_rake_package_task.rb +0 -79
  144. data/test/test_rake_path_map.rb +0 -168
  145. data/test/test_rake_path_map_explode.rb +0 -34
  146. data/test/test_rake_path_map_partial.rb +0 -18
  147. data/test/test_rake_pathname_extensions.rb +0 -15
  148. data/test/test_rake_pseudo_status.rb +0 -21
  149. data/test/test_rake_rake_test_loader.rb +0 -20
  150. data/test/test_rake_reduce_compat.rb +0 -26
  151. data/test/test_rake_require.rb +0 -40
  152. data/test/test_rake_rules.rb +0 -388
  153. data/test/test_rake_scope.rb +0 -44
  154. data/test/test_rake_task.rb +0 -393
  155. data/test/test_rake_task_argument_parsing.rb +0 -119
  156. data/test/test_rake_task_arguments.rb +0 -127
  157. data/test/test_rake_task_lib.rb +0 -9
  158. data/test/test_rake_task_manager.rb +0 -178
  159. data/test/test_rake_task_manager_argument_resolution.rb +0 -19
  160. data/test/test_rake_task_with_arguments.rb +0 -172
  161. data/test/test_rake_test_task.rb +0 -146
  162. data/test/test_rake_thread_pool.rb +0 -145
  163. data/test/test_rake_top_level_functions.rb +0 -71
  164. data/test/test_rake_win32.rb +0 -72
  165. data/test/test_thread_history_display.rb +0 -101
  166. data/test/test_trace_output.rb +0 -52
data/bin/setup ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
data/doc/jamis.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module RDoc
2
3
  module Page
3
4
 
data/doc/rake.1 CHANGED
@@ -1,141 +1,156 @@
1
- .\" Hey, EMACS: -*- nroff -*-
2
- .\" First parameter, NAME, should be all caps
3
- .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
4
- .\" other parameters are allowed: see man(7), man(1)
5
- .TH RAKE 1 "December 3, 2014" "rake 10.4.2" "Rake User Commands"
6
- .\" Please adjust this date whenever revising the manpage.
7
- .\"
8
- .\" Some roff macros, for reference:
9
- .\" .nh disable hyphenation
10
- .\" .hy enable hyphenation
11
- .\" .ad l left justify
12
- .\" .ad b justify to both left and right margins
13
- .\" .nf disable filling
14
- .\" .fi enable filling
15
- .\" .br insert line break
16
- .\" .sp <n> insert n+1 empty lines
17
- .\" for manpage-specific macros, see man(7)
18
- .SH NAME
19
- rake \- a make-like build utility for Ruby
20
- .SH SYNOPSIS
21
- \fBrake\fR [\fI\-f rakefile\fR] {\fIOPTIONS\fR} \fITARGETS...\fR
22
- .br
23
- .SH DESCRIPTION
24
- .B rake
25
- is a make-like build utility for Ruby. Tasks and dependencies are specified in
26
- standard Ruby syntax.
27
- .SH OPTIONS
28
- .TP
29
- \fB\-m\fR, \fB\-\-multitask\fR
1
+ .Dd June 12, 2016
2
+ .Dt RAKE 1
3
+ .Os rake 11.2.2
4
+ .Sh NAME
5
+ .Nm rake
6
+ .Nd make-like build utility for Ruby
7
+ .Sh SYNOPSIS
8
+ .Nm
9
+ .Op Fl f Ar rakefile
10
+ .Op Ar options
11
+ .Ar targets ...
12
+ .Sh DESCRIPTION
13
+ .Nm
14
+ is a
15
+ .Xr make 1 Ns -like
16
+ build utility for Ruby.
17
+ Tasks and dependencies are specified in standard Ruby syntax.
18
+ .Sh OPTIONS
19
+ .Bl -tag -width Ds
20
+ .It Fl m , Fl -multitask
30
21
  Treat all tasks as multitasks.
31
- .TP
32
- \fB\-B\fR, \fB\-\-build\-all\fR
22
+ .It Fl B , Fl -build-all
33
23
  Build all prerequisites, including those which are up\-to\-date.
34
-
35
- .TP
36
- \fB\-j\fR, \fB\-\-jobs\fR [\fINUMBER\fR]
24
+ .It Fl j , Fl -jobs Ar num_jobs
37
25
  Specifies the maximum number of tasks to execute in parallel (default is number of CPU cores + 4).
38
-
39
- .SS Modules
40
- .TP
41
- \fB\-I\fR, \fB\-\-libdir\fR \fILIBDIR\fR
42
- Include \fILIBDIR\fR in the search path for required modules.
43
- .TP
44
- \fB\-r\fR, \fB\-\-require\fR \fIMODULE\fR
45
- Require \fIMODULE\fR before executing rakefile.
46
-
47
- .SS Rakefile location
48
- .TP
49
- \fB\-f\fR, \fB\-\-rakefile\fR [\fIFILENAME\fR]
50
- Use \fIFILENAME\fR as the rakefile to search for.
51
- .TP
52
- \fB\-N\fR, \fB\-\-no\-search\fR, \fB\-\-nosearch\fR
26
+ .El
27
+ .Ss Modules
28
+ .Bl -tag -width Ds
29
+ .It Fl I , Fl -libdir Ar libdir
30
+ Include
31
+ .Ar libdir
32
+ in the search path for required modules.
33
+ .It Fl r , Fl -require Ar module
34
+ Require
35
+ .Ar module
36
+ before executing
37
+ .Pa rakefile .
38
+ .El
39
+ .Ss Rakefile location
40
+ .Bl -tag -width Ds
41
+ .It Fl f , Fl -rakefile Ar filename
42
+ Use
43
+ .Ar filename
44
+ as the rakefile to search for.
45
+ .It Fl N , Fl -no-search , Fl -nosearch
53
46
  Do not search parent directories for the Rakefile.
54
- .TP
55
- \fB\-G\fR, \fB\-\-no\-system\fR, \fB\-\-nosystem\fR
47
+ .It Fl G , Fl -no-system , Fl -nosystem
56
48
  Use standard project Rakefile search paths, ignore system wide rakefiles.
57
- .TP
58
- \fB\-R\fR, \fB\-\-rakelibdir\fR \fIRAKELIBDIR\fR
59
- Auto\-import any .rake files in \fIRAKELIBDIR\fR (default is 'rakelib')
60
- .HP
61
- \fB\-\-rakelib\fR
62
- .TP
63
- \fB\-g\fR, \fB\-\-system\fR
64
- Using system wide (global) rakefiles (usually '\fI~/.rake/*.rake\fR').
65
-
66
- .SS Debugging
67
- .TP
68
- \fB\-\-backtrace\fR=\fI\,[OUT]\/\fR
69
- Enable full backtrace. \fIOUT\fR can be stderr (default) or stdout.
70
- .TP
71
- \fB\-t\fR, \fB\-\-trace\fR=\fI\,[OUT]\/\fR
72
- Turn on invoke/execute tracing, enable full backtrace. \fIOUT\fR can be stderr (default) or stdout.
73
- .TP
74
- \fB\-\-suppress\-backtrace\fR \fIPATTERN\fR
75
- Suppress backtrace lines matching regexp \fIPATTERN\fR. Ignored if \fI\-\-trace\fR is on.
76
- .TP
77
- \fB\-\-rules\fR
49
+ .It Fl R , Fl -rakelib Ar rakelibdir , Fl -rakelibdir Ar rakelibdir
50
+ Auto-import any .rake files in
51
+ .Ar rakelibdir
52
+ (default is
53
+ .Sq rakelib )
54
+ .It Fl g , Fl -system
55
+ Use system-wide (global) rakefiles (usually
56
+ .Pa ~/.rake/*.rake ) .
57
+ .El
58
+ .Ss Debugging
59
+ .Bl -tag -width Ds
60
+ .It Fl -backtrace Ns = Ns Ar out
61
+ Enable full backtrace.
62
+ .Ar out
63
+ can be
64
+ .Dv stderr
65
+ (default) or
66
+ .Dv stdout .
67
+ .It Fl t , Fl -trace Ns = Ns Ar out
68
+ Turn on invoke/execute tracing, enable full backtrace.
69
+ .Ar out
70
+ can be
71
+ .Dv stderr
72
+ (default) or
73
+ .Dv stdout .
74
+ .It Fl -suppress-backtrace Ar pattern
75
+ Suppress backtrace lines matching regexp
76
+ .Ar pattern .
77
+ Ignored if
78
+ .Fl -trace
79
+ is on.
80
+ .It Fl -rules
78
81
  Trace the rules resolution.
79
-
80
- .TP
81
- \fB\-n\fR, \fB\-\-dry\-run\fR
82
+ .It Fl n , Fl -dry-run
82
83
  Do a dry run without executing actions.
83
- .TP
84
- \fB\-T\fR, \fB\-\-tasks\fR [\fIPATTERN\fR]
85
- Display the tasks (matching optional \fIPATTERN\fR) with descriptions, then exit.
86
- .TP
87
- \fB\-D\fR, \fB\-\-describe\fR [\fIPATTERN\fR]
88
- Describe the tasks (matching optional \fIPATTERN\fR), then exit.
89
- .TP
90
- \fB\-W\fR, \fB\-\-where\fR [\fIPATTERN\fR]
91
- Describe the tasks (matching optional \fIPATTERN\fR), then exit.
92
- .TP
93
- \fB\-P\fR, \fB\-\-prereqs\fR
84
+ .It Fl T , Fl -tasks Op Ar pattern
85
+ Display the tasks (matching optional
86
+ .Ar pattern )
87
+ with descriptions, then exit.
88
+ .It Fl D , Fl -describe Op Ar pattern
89
+ Describe the tasks (matching optional
90
+ .Ar pattern ) ,
91
+ then exit.
92
+ .It Fl W , Fl -where Op Ar pattern
93
+ Describe the tasks (matching optional
94
+ .Ar pattern ) ,
95
+ then exit.
96
+ .It Fl P , Fl -prereqs
94
97
  Display the tasks and dependencies, then exit.
95
-
96
- .TP
97
- \fB\-e\fR, \fB\-\-execute\fR \fICODE\fR
98
+ .It Fl e , Fl -execute Ar code
98
99
  Execute some Ruby code and exit.
99
- .TP
100
- \fB\-p\fR, \fB\-\-execute\-print\fR \fICODE\fR
100
+ .It Fl p , Fl -execute-print Ar code
101
101
  Execute some Ruby code, print the result, then exit.
102
- .TP
103
- \fB\-E\fR, \fB\-\-execute\-continue\fR \fICODE\fR
102
+ .It Fl E , Fl -execute-continue Ar code
104
103
  Execute some Ruby code, then continue with normal task processing.
105
-
106
- .SS Information
107
- .TP
108
- \fB\-v\fR, \fB\-\-verbose\fR
104
+ .El
105
+ .Ss Information
106
+ .Bl -tag -width Ds
107
+ .It Fl v , Fl -verbose
109
108
  Log message to standard output.
110
- .TP
111
- \fB\-q\fR, \fB\-\-quiet\fR
109
+ .It Fl q , Fl -quiet
112
110
  Do not log messages to standard output.
113
- .TP
114
- \fB\-s\fR, \fB\-\-silent\fR
115
- Like \fB\-\-quiet\fR, but also suppresses the 'in directory' announcement.
116
- .TP
117
- \fB\-X\fR, \fB\-\-no\-deprecation\-warnings\fR
111
+ .It Fl s , Fl -silent
112
+ Like
113
+ .Fl -quiet ,
114
+ but also suppresses the
115
+ .Sq in directory
116
+ announcement.
117
+ .It Fl X , Fl -no-deprecation-warnings
118
118
  Disable the deprecation warnings.
119
- .TP
120
- \fB\-\-comments\fR
119
+ .It Fl -comments
121
120
  Show commented tasks only
122
- .TP
123
- \fB\-A\fR, \fB\-\-all\fR
124
- Show all tasks, even uncommented ones (in combination with \fB\-T\fR or \fB\-D\fR)
125
- .TP
126
- \fB\-\-job\-stats\fR [\fILEVEL\fR]
127
- Display job statistics. \fILEVEL=history\fR displays a complete job list
128
- .TP
129
- \fB\-V\fR, \fB\-\-version\fR
121
+ .It Fl A , Fl -all
122
+ Show all tasks, even uncommented ones (in combination with
123
+ .Fl T
124
+ or
125
+ .Fl D )
126
+ .It Fl -job-stats Op Ar level
127
+ Display job statistics.
128
+ If
129
+ .Ar level
130
+ is
131
+ .Sq history ,
132
+ displays a complete job list.
133
+ .It Fl V , Fl -version
130
134
  Display the program version.
131
- .TP
132
- \fB\-h\fR, \fB\-H\fR, \fB\-\-help\fR
135
+ .It Fl h , Fl H , Fl -help
133
136
  Display a help message.
134
-
135
- .SH SEE ALSO
136
- The complete documentation for \fBrake\fR has been installed at \fI/usr/share/doc/rake-doc/html/index.html\fR. It is also available online at \fIhttp://docs.seattlerb.org/rake\fR.
137
- .SH AUTHOR
138
- .B rake
139
- was written by Jim Weirich <jim@weirichhouse.org>
140
- .PP
141
- This manual was created by Caitlin Matos <caitlin.matos@zoho.com> for the Debian project (but may be used by others). It was inspired by the manual by Jani Monoses <jani@iv.ro> for the Ubuntu project.
137
+ .El
138
+ .Sh SEE ALSO
139
+ The complete documentation for
140
+ .Nm rake
141
+ has been installed at
142
+ .Pa /usr/share/doc/rake-doc/html/index.html .
143
+ It is also available online at
144
+ .Lk https://ruby.github.io/rake .
145
+ .Sh AUTHORS
146
+ .An -nosplit
147
+ .Nm
148
+ was written by
149
+ .An Jim Weirich Aq Mt jim@weirichhouse.org .
150
+ .Pp
151
+ This manual was created by
152
+ .An Caitlin Matos Aq Mt caitlin.matos@zoho.com
153
+ for the Debian project (but may be used by others).
154
+ It was inspired by the manual by
155
+ .An Jani Monoses Aq Mt jani@iv.ro
156
+ for the Ubuntu project.
data/doc/rakefile.rdoc CHANGED
@@ -223,9 +223,7 @@ behaviour can now accept a second parameter:
223
223
  The first argument of the block "t" is always bound to the current
224
224
  task object. The second argument "args" is an open-struct like object
225
225
  that allows access to the task arguments. Extra command line
226
- arguments to a task are ignored. Missing command line arguments are
227
- picked up from matching environment variables. If there are no
228
- matching environment variables, they are given the nil value.
226
+ arguments to a task are ignored.
229
227
 
230
228
  If you wish to specify default values for the arguments, you can use
231
229
  the with_defaults method in the task body. Here is the above example
@@ -412,7 +410,7 @@ display a list of tasks that have a description. If you use +desc+ to
412
410
  describe your major tasks, you have a semi-automatic way of generating
413
411
  a summary of your Rake file.
414
412
 
415
- traken$ rake -T
413
+ $ rake -T
416
414
  (in /home/.../rake)
417
415
  rake clean # Remove any temporary products.
418
416
  rake clobber # Remove any generated file.
data/exe/rake ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ #--
4
+ # Copyright (c) 2003, 2004, 2005, 2006, 2007 Jim Weirich
5
+ #
6
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ # of this software and associated documentation files (the "Software"), to
8
+ # deal in the Software without restriction, including without limitation the
9
+ # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10
+ # sell copies of the Software, and to permit persons to whom the Software is
11
+ # furnished to do so, subject to the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included in
14
+ # all copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22
+ # IN THE SOFTWARE.
23
+ #++
24
+
25
+ require "rake"
26
+
27
+ Rake.application.run
data/lib/rake.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  #--
2
3
  # Copyright 2003-2010 by Jim Weirich (jim.weirich@gmail.com)
3
4
  #
@@ -20,54 +21,45 @@
20
21
  # IN THE SOFTWARE.
21
22
  #++
22
23
 
23
- module Rake
24
- VERSION = '10.5.0'
25
- end
24
+ module Rake; end
26
25
 
27
- require 'rake/version'
26
+ require "rake/version"
28
27
 
29
- # :stopdoc:
30
- # TODO: Remove in Rake 11
31
- RAKEVERSION = Rake::VERSION
32
- # :startdoc:
33
-
34
- require 'rbconfig'
35
- require 'fileutils'
36
- require 'singleton'
37
- require 'monitor'
38
- require 'optparse'
39
- require 'ostruct'
28
+ require "rbconfig"
29
+ require "fileutils"
30
+ require "singleton"
31
+ require "monitor"
32
+ require "optparse"
33
+ require "ostruct"
40
34
 
41
- require 'rake/ext/module'
42
- require 'rake/ext/string'
43
- require 'rake/ext/time'
35
+ require "rake/ext/string"
44
36
 
45
- require 'rake/win32'
37
+ require "rake/win32"
46
38
 
47
- require 'rake/linked_list'
48
- require 'rake/cpu_counter'
49
- require 'rake/scope'
50
- require 'rake/task_argument_error'
51
- require 'rake/rule_recursion_overflow_error'
52
- require 'rake/rake_module'
53
- require 'rake/trace_output'
54
- require 'rake/pseudo_status'
55
- require 'rake/task_arguments'
56
- require 'rake/invocation_chain'
57
- require 'rake/task'
58
- require 'rake/file_task'
59
- require 'rake/file_creation_task'
60
- require 'rake/multi_task'
61
- require 'rake/dsl_definition'
62
- require 'rake/file_utils_ext'
63
- require 'rake/file_list'
64
- require 'rake/default_loader'
65
- require 'rake/early_time'
66
- require 'rake/late_time'
67
- require 'rake/name_space'
68
- require 'rake/task_manager'
69
- require 'rake/application'
70
- require 'rake/backtrace'
39
+ require "rake/linked_list"
40
+ require "rake/cpu_counter"
41
+ require "rake/scope"
42
+ require "rake/task_argument_error"
43
+ require "rake/rule_recursion_overflow_error"
44
+ require "rake/rake_module"
45
+ require "rake/trace_output"
46
+ require "rake/pseudo_status"
47
+ require "rake/task_arguments"
48
+ require "rake/invocation_chain"
49
+ require "rake/task"
50
+ require "rake/file_task"
51
+ require "rake/file_creation_task"
52
+ require "rake/multi_task"
53
+ require "rake/dsl_definition"
54
+ require "rake/file_utils_ext"
55
+ require "rake/file_list"
56
+ require "rake/default_loader"
57
+ require "rake/early_time"
58
+ require "rake/late_time"
59
+ require "rake/name_space"
60
+ require "rake/task_manager"
61
+ require "rake/application"
62
+ require "rake/backtrace"
71
63
 
72
64
  $trace = false
73
65
 
@@ -1,12 +1,12 @@
1
- require 'shellwords'
2
- require 'optparse'
1
+ # frozen_string_literal: true
2
+ require "optparse"
3
3
 
4
- require 'rake/task_manager'
5
- require 'rake/file_list'
6
- require 'rake/thread_pool'
7
- require 'rake/thread_history_display'
8
- require 'rake/trace_output'
9
- require 'rake/win32'
4
+ require "rake/task_manager"
5
+ require "rake/file_list"
6
+ require "rake/thread_pool"
7
+ require "rake/thread_history_display"
8
+ require "rake/trace_output"
9
+ require "rake/win32"
10
10
 
11
11
  module Rake
12
12
 
@@ -35,17 +35,20 @@ module Rake
35
35
  # List of the top level task names (task names from the command line).
36
36
  attr_reader :top_level_tasks
37
37
 
38
+ # Override the detected TTY output state (mostly for testing)
39
+ attr_writer :tty_output
40
+
38
41
  DEFAULT_RAKEFILES = [
39
- 'rakefile',
40
- 'Rakefile',
41
- 'rakefile.rb',
42
- 'Rakefile.rb'
42
+ "rakefile",
43
+ "Rakefile",
44
+ "rakefile.rb",
45
+ "Rakefile.rb"
43
46
  ].freeze
44
47
 
45
48
  # Initialize a Rake::Application object.
46
49
  def initialize
47
50
  super
48
- @name = 'rake'
51
+ @name = "rake"
49
52
  @rakefiles = DEFAULT_RAKEFILES.dup
50
53
  @rakefile = nil
51
54
  @pending_imports = []
@@ -54,11 +57,13 @@ module Rake
54
57
  @default_loader = Rake::DefaultLoader.new
55
58
  @original_dir = Dir.pwd
56
59
  @top_level_tasks = []
57
- add_loader('rb', DefaultLoader.new)
58
- add_loader('rf', DefaultLoader.new)
59
- add_loader('rake', DefaultLoader.new)
60
+ add_loader("rb", DefaultLoader.new)
61
+ add_loader("rf", DefaultLoader.new)
62
+ add_loader("rake", DefaultLoader.new)
60
63
  @tty_output = STDOUT.tty?
61
- @terminal_columns = ENV['RAKE_COLUMNS'].to_i
64
+ @terminal_columns = ENV["RAKE_COLUMNS"].to_i
65
+
66
+ set_default_options
62
67
  end
63
68
 
64
69
  # Run the Rake application. The run method performs the following
@@ -71,19 +76,24 @@ module Rake
71
76
  # If you wish to build a custom rake command, you should call
72
77
  # +init+ on your application. Then define any tasks. Finally,
73
78
  # call +top_level+ to run your top level tasks.
74
- def run
79
+ def run(argv = ARGV)
75
80
  standard_exception_handling do
76
- init
81
+ init "rake", argv
77
82
  load_rakefile
78
83
  top_level
79
84
  end
80
85
  end
81
86
 
82
87
  # Initialize the command line parameters and app name.
83
- def init(app_name='rake')
88
+ def init(app_name="rake", argv = ARGV)
84
89
  standard_exception_handling do
85
90
  @name = app_name
86
- args = handle_options
91
+ begin
92
+ args = handle_options argv
93
+ rescue ArgumentError
94
+ # Backward compatibility for capistrano
95
+ args = handle_options
96
+ end
87
97
  collect_command_line_tasks(args)
88
98
  end
89
99
  end
@@ -162,7 +172,7 @@ module Rake
162
172
  args = []
163
173
 
164
174
  begin
165
- /((?:[^\\,]|\\.)*?)\s*(?:,\s*(.*))?$/ =~ remaining_args
175
+ /\s*((?:[^\\,]|\\.)*?)\s*(?:,\s*(.*))?$/ =~ remaining_args
166
176
 
167
177
  remaining_args = $2
168
178
  args << $1.gsub(/\\(.)/, '\1')
@@ -202,13 +212,22 @@ module Rake
202
212
  end
203
213
 
204
214
  def display_exception_details(ex) # :nodoc:
205
- seen = Thread.current[:rake_display_exception_details_seen] ||= []
206
- return if seen.include? ex
207
- seen << ex
215
+ display_exception_details_seen << ex
208
216
 
209
217
  display_exception_message_details(ex)
210
218
  display_exception_backtrace(ex)
211
- display_exception_details(ex.cause) if has_cause?(ex)
219
+ display_cause_details(ex.cause) if has_cause?(ex)
220
+ end
221
+
222
+ def display_cause_details(ex) # :nodoc:
223
+ return if display_exception_details_seen.include? ex
224
+
225
+ trace "\nCaused by:"
226
+ display_exception_details(ex)
227
+ end
228
+
229
+ def display_exception_details_seen # :nodoc:
230
+ Thread.current[:rake_display_exception_details_seen] ||= []
212
231
  end
213
232
 
214
233
  def has_cause?(ex) # :nodoc:
@@ -257,7 +276,7 @@ module Rake
257
276
  if File.exist?(fn)
258
277
  others = FileList.glob(fn, File::FNM_CASEFOLD)
259
278
  return others.size == 1 ? others.first : fn
260
- elsif fn == ''
279
+ elsif fn == ""
261
280
  return fn
262
281
  end
263
282
  end
@@ -269,11 +288,6 @@ module Rake
269
288
  @tty_output
270
289
  end
271
290
 
272
- # Override the detected TTY output state (mostly for testing)
273
- def tty_output=(tty_output_state) # :nodoc:
274
- @tty_output = tty_output_state
275
- end
276
-
277
291
  # We will truncate output if we are outputting to a TTY or if we've been
278
292
  # given an explicit column width to honor
279
293
  def truncate_output? # :nodoc:
@@ -345,7 +359,7 @@ module Rake
345
359
  end
346
360
 
347
361
  def unix? # :nodoc:
348
- RbConfig::CONFIG['host_os'] =~
362
+ RbConfig::CONFIG["host_os"] =~
349
363
  /(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris|irix|hpux)/i
350
364
  end
351
365
 
@@ -378,7 +392,7 @@ module Rake
378
392
 
379
393
  def sort_options(options) # :nodoc:
380
394
  options.sort_by { |opt|
381
- opt.select { |o| o =~ /^-/ }.map { |o| o.downcase }.sort.reverse
395
+ opt.select { |o| o.is_a?(String) && o =~ /^-/ }.map(&:downcase).sort.reverse
382
396
  }
383
397
  end
384
398
  private :sort_options
@@ -388,38 +402,38 @@ module Rake
388
402
  def standard_rake_options # :nodoc:
389
403
  sort_options(
390
404
  [
391
- ['--all', '-A',
405
+ ["--all", "-A",
392
406
  "Show all tasks, even uncommented ones (in combination with -T or -D)",
393
407
  lambda { |value|
394
408
  options.show_all_tasks = value
395
409
  }
396
410
  ],
397
- ['--backtrace=[OUT]',
411
+ ["--backtrace=[OUT]",
398
412
  "Enable full backtrace. OUT can be stderr (default) or stdout.",
399
413
  lambda { |value|
400
414
  options.backtrace = true
401
- select_trace_output(options, 'backtrace', value)
415
+ select_trace_output(options, "backtrace", value)
402
416
  }
403
417
  ],
404
- ['--build-all', '-B',
418
+ ["--build-all", "-B",
405
419
  "Build all prerequisites, including those which are up-to-date.",
406
420
  lambda { |value|
407
421
  options.build_all = true
408
422
  }
409
423
  ],
410
- ['--comments',
424
+ ["--comments",
411
425
  "Show commented tasks only",
412
426
  lambda { |value|
413
427
  options.show_all_tasks = !value
414
428
  }
415
429
  ],
416
- ['--describe', '-D [PATTERN]',
430
+ ["--describe", "-D [PATTERN]",
417
431
  "Describe the tasks (matching optional PATTERN), then exit.",
418
432
  lambda { |value|
419
433
  select_tasks_to_show(options, :describe, value)
420
434
  }
421
435
  ],
422
- ['--dry-run', '-n',
436
+ ["--dry-run", "-n",
423
437
  "Do a dry run without executing actions.",
424
438
  lambda { |value|
425
439
  Rake.verbose(true)
@@ -428,31 +442,31 @@ module Rake
428
442
  options.trace = true
429
443
  }
430
444
  ],
431
- ['--execute', '-e CODE',
445
+ ["--execute", "-e CODE",
432
446
  "Execute some Ruby code and exit.",
433
447
  lambda { |value|
434
448
  eval(value)
435
449
  exit
436
450
  }
437
451
  ],
438
- ['--execute-print', '-p CODE',
452
+ ["--execute-print", "-p CODE",
439
453
  "Execute some Ruby code, print the result, then exit.",
440
454
  lambda { |value|
441
455
  puts eval(value)
442
456
  exit
443
457
  }
444
458
  ],
445
- ['--execute-continue', '-E CODE',
459
+ ["--execute-continue", "-E CODE",
446
460
  "Execute some Ruby code, " +
447
461
  "then continue with normal task processing.",
448
462
  lambda { |value| eval(value) }
449
463
  ],
450
- ['--jobs', '-j [NUMBER]',
464
+ ["--jobs", "-j [NUMBER]",
451
465
  "Specifies the maximum number of tasks to execute in parallel. " +
452
466
  "(default is number of CPU cores + 4)",
453
467
  lambda { |value|
454
- if value.nil? || value == ''
455
- value = FIXNUM_MAX
468
+ if value.nil? || value == ""
469
+ value = Float::INFINITY
456
470
  elsif value =~ /^\d+$/
457
471
  value = value.to_i
458
472
  else
@@ -462,7 +476,7 @@ module Rake
462
476
  options.thread_pool_size = value - 1
463
477
  }
464
478
  ],
465
- ['--job-stats [LEVEL]',
479
+ ["--job-stats [LEVEL]",
466
480
  "Display job statistics. " +
467
481
  "LEVEL=history displays a complete job list",
468
482
  lambda { |value|
@@ -473,42 +487,42 @@ module Rake
473
487
  end
474
488
  }
475
489
  ],
476
- ['--libdir', '-I LIBDIR',
490
+ ["--libdir", "-I LIBDIR",
477
491
  "Include LIBDIR in the search path for required modules.",
478
492
  lambda { |value| $:.push(value) }
479
493
  ],
480
- ['--multitask', '-m',
494
+ ["--multitask", "-m",
481
495
  "Treat all tasks as multitasks.",
482
496
  lambda { |value| options.always_multitask = true }
483
497
  ],
484
- ['--no-search', '--nosearch',
485
- '-N', "Do not search parent directories for the Rakefile.",
498
+ ["--no-search", "--nosearch",
499
+ "-N", "Do not search parent directories for the Rakefile.",
486
500
  lambda { |value| options.nosearch = true }
487
501
  ],
488
- ['--prereqs', '-P',
502
+ ["--prereqs", "-P",
489
503
  "Display the tasks and dependencies, then exit.",
490
504
  lambda { |value| options.show_prereqs = true }
491
505
  ],
492
- ['--quiet', '-q',
506
+ ["--quiet", "-q",
493
507
  "Do not log messages to standard output.",
494
508
  lambda { |value| Rake.verbose(false) }
495
509
  ],
496
- ['--rakefile', '-f [FILENAME]',
510
+ ["--rakefile", "-f [FILENAME]",
497
511
  "Use FILENAME as the rakefile to search for.",
498
512
  lambda { |value|
499
- value ||= ''
513
+ value ||= ""
500
514
  @rakefiles.clear
501
515
  @rakefiles << value
502
516
  }
503
517
  ],
504
- ['--rakelibdir', '--rakelib', '-R RAKELIBDIR',
518
+ ["--rakelibdir", "--rakelib", "-R RAKELIBDIR",
505
519
  "Auto-import any .rake files in RAKELIBDIR. " +
506
520
  "(default is 'rakelib')",
507
521
  lambda { |value|
508
522
  options.rakelib = value.split(File::PATH_SEPARATOR)
509
523
  }
510
524
  ],
511
- ['--require', '-r MODULE',
525
+ ["--require", "-r MODULE",
512
526
  "Require MODULE before executing rakefile.",
513
527
  lambda { |value|
514
528
  begin
@@ -522,11 +536,11 @@ module Rake
522
536
  end
523
537
  }
524
538
  ],
525
- ['--rules',
539
+ ["--rules",
526
540
  "Trace the rules resolution.",
527
541
  lambda { |value| options.trace_rules = true }
528
542
  ],
529
- ['--silent', '-s',
543
+ ["--silent", "-s",
530
544
  "Like --quiet, but also suppresses the " +
531
545
  "'in directory' announcement.",
532
546
  lambda { |value|
@@ -534,59 +548,60 @@ module Rake
534
548
  options.silent = true
535
549
  }
536
550
  ],
537
- ['--suppress-backtrace PATTERN',
551
+ ["--suppress-backtrace PATTERN",
538
552
  "Suppress backtrace lines matching regexp PATTERN. " +
539
553
  "Ignored if --trace is on.",
540
554
  lambda { |value|
541
555
  options.suppress_backtrace_pattern = Regexp.new(value)
542
556
  }
543
557
  ],
544
- ['--system', '-g',
558
+ ["--system", "-g",
545
559
  "Using system wide (global) rakefiles " +
546
560
  "(usually '~/.rake/*.rake').",
547
561
  lambda { |value| options.load_system = true }
548
562
  ],
549
- ['--no-system', '--nosystem', '-G',
563
+ ["--no-system", "--nosystem", "-G",
550
564
  "Use standard project Rakefile search paths, " +
551
565
  "ignore system wide rakefiles.",
552
566
  lambda { |value| options.ignore_system = true }
553
567
  ],
554
- ['--tasks', '-T [PATTERN]',
568
+ ["--tasks", "-T [PATTERN]",
555
569
  "Display the tasks (matching optional PATTERN) " +
556
- "with descriptions, then exit.",
570
+ "with descriptions, then exit. " +
571
+ "-AT combination displays all of tasks contained no description.",
557
572
  lambda { |value|
558
573
  select_tasks_to_show(options, :tasks, value)
559
574
  }
560
575
  ],
561
- ['--trace=[OUT]', '-t',
576
+ ["--trace=[OUT]", "-t",
562
577
  "Turn on invoke/execute tracing, enable full backtrace. " +
563
578
  "OUT can be stderr (default) or stdout.",
564
579
  lambda { |value|
565
580
  options.trace = true
566
581
  options.backtrace = true
567
- select_trace_output(options, 'trace', value)
582
+ select_trace_output(options, "trace", value)
568
583
  Rake.verbose(true)
569
584
  }
570
585
  ],
571
- ['--verbose', '-v',
586
+ ["--verbose", "-v",
572
587
  "Log message to standard output.",
573
588
  lambda { |value| Rake.verbose(true) }
574
589
  ],
575
- ['--version', '-V',
590
+ ["--version", "-V",
576
591
  "Display the program version.",
577
592
  lambda { |value|
578
- puts "rake, version #{RAKEVERSION}"
593
+ puts "rake, version #{Rake::VERSION}"
579
594
  exit
580
595
  }
581
596
  ],
582
- ['--where', '-W [PATTERN]',
597
+ ["--where", "-W [PATTERN]",
583
598
  "Describe the tasks (matching optional PATTERN), then exit.",
584
599
  lambda { |value|
585
600
  select_tasks_to_show(options, :lines, value)
586
601
  options.show_all_tasks = true
587
602
  }
588
603
  ],
589
- ['--no-deprecation-warnings', '-X',
604
+ ["--no-deprecation-warnings", "-X",
590
605
  "Disable the deprecation warnings.",
591
606
  lambda { |value|
592
607
  options.ignore_deprecate = true
@@ -597,7 +612,7 @@ module Rake
597
612
 
598
613
  def select_tasks_to_show(options, show_tasks, value) # :nodoc:
599
614
  options.show_tasks = show_tasks
600
- options.show_task_pattern = Regexp.new(value || '')
615
+ options.show_task_pattern = Regexp.new(value || "")
601
616
  Rake::TaskManager.record_task_metadata = true
602
617
  end
603
618
  private :select_tasks_to_show
@@ -605,9 +620,9 @@ module Rake
605
620
  def select_trace_output(options, trace_option, value) # :nodoc:
606
621
  value = value.strip unless value.nil?
607
622
  case value
608
- when 'stdout'
623
+ when "stdout"
609
624
  options.trace_output = $stdout
610
- when 'stderr', nil
625
+ when "stderr", nil
611
626
  options.trace_output = $stderr
612
627
  else
613
628
  fail CommandLineOptionError,
@@ -619,9 +634,8 @@ module Rake
619
634
  # Read and handle the command line options. Returns the command line
620
635
  # arguments that we didn't understand, which should (in theory) be just
621
636
  # task names and env vars.
622
- def handle_options # :nodoc:
623
- options.rakelib = ['rakelib']
624
- options.trace_output = $stderr
637
+ def handle_options(argv) # :nodoc:
638
+ set_default_options
625
639
 
626
640
  OptionParser.new do |opts|
627
641
  opts.banner = "#{Rake.application.name} [-f rakefile] {options} targets..."
@@ -634,8 +648,8 @@ module Rake
634
648
  end
635
649
 
636
650
  standard_rake_options.each { |args| opts.on(*args) }
637
- opts.environment('RAKEOPT')
638
- end.parse(ARGV)
651
+ opts.environment("RAKEOPT")
652
+ end.parse(argv)
639
653
  end
640
654
 
641
655
  # Similar to the regular Ruby +require+ command, but will check
@@ -673,7 +687,7 @@ module Rake
673
687
 
674
688
  def raw_load_rakefile # :nodoc:
675
689
  rakefile, location = find_rakefile_location
676
- if (! options.ignore_system) &&
690
+ if (!options.ignore_system) &&
677
691
  (options.load_system || rakefile.nil?) &&
678
692
  system_dir && File.directory?(system_dir)
679
693
  print_rakefile_directory(location)
@@ -687,7 +701,7 @@ module Rake
687
701
  Dir.chdir(location)
688
702
  print_rakefile_directory(location)
689
703
  Rake.load_rakefile(File.expand_path(@rakefile)) if
690
- @rakefile && @rakefile != ''
704
+ @rakefile && @rakefile != ""
691
705
  options.rakelib.each do |rlib|
692
706
  glob("#{rlib}/*.rake") do |name|
693
707
  add_import name
@@ -698,7 +712,7 @@ module Rake
698
712
  end
699
713
 
700
714
  def glob(path, &block) # :nodoc:
701
- FileList.glob(path.gsub("\\", '/')).each(&block)
715
+ FileList.glob(path.tr("\\", "/")).each(&block)
702
716
  end
703
717
  private :glob
704
718
 
@@ -706,8 +720,8 @@ module Rake
706
720
  def system_dir # :nodoc:
707
721
  @system_dir ||=
708
722
  begin
709
- if ENV['RAKE_SYSTEM']
710
- ENV['RAKE_SYSTEM']
723
+ if ENV["RAKE_SYSTEM"]
724
+ ENV["RAKE_SYSTEM"]
711
725
  else
712
726
  standard_system_dir
713
727
  end
@@ -721,7 +735,7 @@ module Rake
721
735
  end
722
736
  else
723
737
  def standard_system_dir #:nodoc:
724
- File.join(File.expand_path('~'), '.rake')
738
+ File.join(File.expand_path("~"), ".rake")
725
739
  end
726
740
  end
727
741
  private :standard_system_dir
@@ -780,11 +794,31 @@ module Rake
780
794
  re = /^#{@rakefile}$/
781
795
  re = /#{re.source}/i if windows?
782
796
 
783
- backtrace.find { |str| str =~ re } || ''
797
+ backtrace.find { |str| str =~ re } || ""
798
+ end
799
+
800
+ def set_default_options # :nodoc:
801
+ options.always_multitask = false
802
+ options.backtrace = false
803
+ options.build_all = false
804
+ options.dryrun = false
805
+ options.ignore_deprecate = false
806
+ options.ignore_system = false
807
+ options.job_stats = false
808
+ options.load_system = false
809
+ options.nosearch = false
810
+ options.rakelib = %w[rakelib]
811
+ options.show_all_tasks = false
812
+ options.show_prereqs = false
813
+ options.show_task_pattern = nil
814
+ options.show_tasks = nil
815
+ options.silent = false
816
+ options.suppress_backtrace_pattern = nil
817
+ options.thread_pool_size = Rake.suggested_thread_count
818
+ options.trace = false
819
+ options.trace_output = $stderr
820
+ options.trace_rules = false
784
821
  end
785
822
 
786
- private
787
- FIXNUM_MAX = (2**(0.size * 8 - 2) - 1) # :nodoc:
788
-
789
823
  end
790
824
  end