rubybreaker 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/NEWS +5 -0
- data/NOTES +9 -0
- data/README.md +100 -183
- data/Rakefile +21 -6
- data/VERSION +1 -1
- data/bin/rubybreaker +34 -50
- data/lib/rubybreaker/debug/debug.rb +6 -0
- data/lib/rubybreaker/doc/rdoc.rb +37 -0
- data/lib/rubybreaker/doc.rb +3 -0
- data/lib/rubybreaker/runtime/inspector.rb +6 -28
- data/lib/rubybreaker/runtime/monitor.rb +21 -17
- data/lib/rubybreaker/runtime/object_wrapper.rb +7 -2
- data/lib/rubybreaker/runtime/type_system.rb +3 -5
- data/lib/rubybreaker/runtime/typesig_unparser.rb +1 -4
- data/lib/rubybreaker/runtime.rb +64 -105
- data/lib/rubybreaker/task.rb +97 -0
- data/lib/rubybreaker/test/rspec.rb +1 -1
- data/lib/rubybreaker/test/testcase.rb +13 -28
- data/lib/rubybreaker/type/type.rb +1 -1
- data/lib/rubybreaker/typing/subtyping.rb +10 -5
- data/lib/rubybreaker/util.rb +0 -1
- data/lib/rubybreaker.rb +163 -115
- data/test/integrated/tc_both_broken_breakable.rb +5 -4
- data/test/integrated/tc_class_methods.rb +4 -3
- data/test/integrated/tc_inherit_broken.rb +4 -3
- data/test/integrated/tc_method_missing.rb +4 -4
- data/test/integrated/tc_namespace.rb +4 -2
- data/test/integrated/tc_simple1.rb +4 -3
- data/test/runtime/tc_obj_wrapper.rb +25 -6
- data/test/runtime/tc_typesig_parser.rb +0 -1
- data/test/testtask/sample.rb +10 -0
- data/test/testtask/tc_testtask.rb +25 -0
- data/test/ts_rspec.rb +21 -15
- data/test/typing/tc_typing.rb +2 -3
- data/webpage/index.html +105 -193
- data/webpage/rdoc/Kernel.html +286 -0
- data/webpage/rdoc/Object.html +17 -11
- data/webpage/rdoc/Rake/RubyBreakerTestTask.html +374 -0
- data/webpage/rdoc/Rake.html +212 -0
- data/webpage/rdoc/RubyBreaker/Breakable.html +24 -40
- data/webpage/rdoc/RubyBreaker/Broken.html +21 -69
- data/webpage/rdoc/RubyBreaker/Context.html +16 -10
- data/webpage/rdoc/RubyBreaker/Errors/InternalError.html +16 -10
- data/webpage/rdoc/RubyBreaker/Errors/InvalidSubtypeCheck.html +16 -10
- data/webpage/rdoc/RubyBreaker/Errors/InvalidTypeConstruction.html +16 -10
- data/webpage/rdoc/RubyBreaker/Errors/SubtypeFailure.html +16 -10
- data/webpage/rdoc/RubyBreaker/Errors/TypeError.html +16 -10
- data/webpage/rdoc/RubyBreaker/Errors/UserError.html +16 -10
- data/webpage/rdoc/RubyBreaker/Errors.html +16 -10
- data/webpage/rdoc/RubyBreaker/ObjectPosition.html +16 -10
- data/webpage/rdoc/RubyBreaker/Position.html +16 -10
- data/webpage/rdoc/RubyBreaker/{TestCase.html → RDocSupport.html} +81 -82
- data/webpage/rdoc/RubyBreaker/RubyTypeUtils.html +16 -10
- data/webpage/rdoc/RubyBreaker/Runtime/Inspector.html +25 -44
- data/webpage/rdoc/RubyBreaker/Runtime/MethodInfo.html +16 -10
- data/webpage/rdoc/RubyBreaker/Runtime/Monitor.html +19 -13
- data/webpage/rdoc/RubyBreaker/Runtime/MonitorInstaller.html +37 -25
- data/webpage/rdoc/RubyBreaker/Runtime/MonitorSwitch.html +20 -14
- data/webpage/rdoc/RubyBreaker/Runtime/MonitorUtils.html +21 -15
- data/webpage/rdoc/RubyBreaker/Runtime/ObjectWrapper.html +23 -12
- data/webpage/rdoc/RubyBreaker/Runtime/Pluggable.html +16 -10
- data/webpage/rdoc/RubyBreaker/Runtime/TypeSigParser.html +16 -10
- data/webpage/rdoc/RubyBreaker/Runtime/{TypesigUnparser.html → TypeSigUnparser.html} +19 -16
- data/webpage/rdoc/RubyBreaker/Runtime/TypeSystem.html +18 -14
- data/webpage/rdoc/RubyBreaker/Runtime.html +145 -11
- data/webpage/rdoc/RubyBreaker/TypeComparer.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/AnyType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/BlockType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/DuckType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/FusionType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/MethodListType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/MethodType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/NilType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/NominalType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/OptionalType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/OrType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/SelfType.html +17 -11
- data/webpage/rdoc/RubyBreaker/TypeDefs/Type.html +17 -11
- data/webpage/rdoc/RubyBreaker/TypeDefs/VarLengthType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeUnparser.html +16 -10
- data/webpage/rdoc/RubyBreaker/Typing.html +17 -11
- data/webpage/rdoc/RubyBreaker/Util.html +16 -10
- data/webpage/rdoc/RubyBreaker.html +167 -34
- data/webpage/rdoc/{RubyBreaker/Runtime/TypePlaceholder.html → Test/Unit/TestCase.html} +68 -39
- data/webpage/rdoc/Test/Unit.html +211 -0
- data/webpage/rdoc/Test.html +211 -0
- data/webpage/rdoc/created.rid +18 -17
- data/webpage/rdoc/index.html +16 -10
- data/webpage/rdoc/js/search_index.js +1 -1
- data/webpage/rdoc/table_of_contents.html +61 -48
- metadata +21 -12
- data/lib/rubybreaker/rubylib/core.rb +0 -2483
- data/lib/rubybreaker/rubylib.rb +0 -3
- data/lib/rubybreaker/runtime/type_placeholder.rb +0 -23
- data/webpage/rdoc/RubyBreaker/Broken/BrokenEigen.html +0 -305
- data/webpage/rdoc/RubyBreaker/Main.html +0 -458
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
|
6
|
+
|
|
7
|
+
<title>class Rake::RubyBreakerTestTask - RDoc Documentation</title>
|
|
8
|
+
|
|
9
|
+
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
|
10
|
+
|
|
11
|
+
<script type="text/javascript">
|
|
12
|
+
var rdoc_rel_prefix = "../";
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
16
|
+
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
|
17
|
+
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
|
18
|
+
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
|
19
|
+
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
|
20
|
+
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<body id="top" class="class">
|
|
24
|
+
<nav id="metadata">
|
|
25
|
+
<nav id="home-section" class="section">
|
|
26
|
+
<h3 class="section-header">
|
|
27
|
+
<a href="../index.html">Home</a>
|
|
28
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
|
29
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
|
30
|
+
</h3>
|
|
31
|
+
</nav>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
|
36
|
+
<h3 class="section-header">
|
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
|
39
|
+
</h3>
|
|
40
|
+
</form>
|
|
41
|
+
|
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
|
43
|
+
</nav>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div id="file-metadata">
|
|
47
|
+
<nav id="file-list-section" class="section">
|
|
48
|
+
<h3 class="section-header">Defined In</h3>
|
|
49
|
+
<ul>
|
|
50
|
+
<li>lib/rubybreaker/task.rb
|
|
51
|
+
</ul>
|
|
52
|
+
</nav>
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div id="class-metadata">
|
|
58
|
+
|
|
59
|
+
<nav id="parent-class-section" class="section">
|
|
60
|
+
<h3 class="section-header">Parent</h3>
|
|
61
|
+
|
|
62
|
+
<p class="link">Rake::TestTask
|
|
63
|
+
|
|
64
|
+
</nav>
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
<!-- Method Quickref -->
|
|
68
|
+
<nav id="method-list-section" class="section">
|
|
69
|
+
<h3 class="section-header">Methods</h3>
|
|
70
|
+
|
|
71
|
+
<ul class="link-list">
|
|
72
|
+
|
|
73
|
+
<li><a href="#method-c-new">::new</a>
|
|
74
|
+
|
|
75
|
+
</ul>
|
|
76
|
+
</nav>
|
|
77
|
+
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<div id="project-metadata">
|
|
81
|
+
|
|
82
|
+
<nav id="classindex-section" class="section project-section">
|
|
83
|
+
<h3 class="section-header">Class and Module Index</h3>
|
|
84
|
+
|
|
85
|
+
<ul class="link-list">
|
|
86
|
+
|
|
87
|
+
<li><a href="../RubyBreaker.html">RubyBreaker</a>
|
|
88
|
+
|
|
89
|
+
<li><a href="../RubyBreaker/Breakable.html">RubyBreaker::Breakable</a>
|
|
90
|
+
|
|
91
|
+
<li><a href="../RubyBreaker/Broken.html">RubyBreaker::Broken</a>
|
|
92
|
+
|
|
93
|
+
<li><a href="../RubyBreaker/Context.html">RubyBreaker::Context</a>
|
|
94
|
+
|
|
95
|
+
<li><a href="../RubyBreaker/Errors.html">RubyBreaker::Errors</a>
|
|
96
|
+
|
|
97
|
+
<li><a href="../RubyBreaker/Errors/InternalError.html">RubyBreaker::Errors::InternalError</a>
|
|
98
|
+
|
|
99
|
+
<li><a href="../RubyBreaker/Errors/InvalidSubtypeCheck.html">RubyBreaker::Errors::InvalidSubtypeCheck</a>
|
|
100
|
+
|
|
101
|
+
<li><a href="../RubyBreaker/Errors/InvalidTypeConstruction.html">RubyBreaker::Errors::InvalidTypeConstruction</a>
|
|
102
|
+
|
|
103
|
+
<li><a href="../RubyBreaker/Errors/SubtypeFailure.html">RubyBreaker::Errors::SubtypeFailure</a>
|
|
104
|
+
|
|
105
|
+
<li><a href="../RubyBreaker/Errors/TypeError.html">RubyBreaker::Errors::TypeError</a>
|
|
106
|
+
|
|
107
|
+
<li><a href="../RubyBreaker/Errors/UserError.html">RubyBreaker::Errors::UserError</a>
|
|
108
|
+
|
|
109
|
+
<li><a href="../RubyBreaker/ObjectPosition.html">RubyBreaker::ObjectPosition</a>
|
|
110
|
+
|
|
111
|
+
<li><a href="../RubyBreaker/Position.html">RubyBreaker::Position</a>
|
|
112
|
+
|
|
113
|
+
<li><a href="../RubyBreaker/RDocSupport.html">RubyBreaker::RDocSupport</a>
|
|
114
|
+
|
|
115
|
+
<li><a href="../RubyBreaker/RubyTypeUtils.html">RubyBreaker::RubyTypeUtils</a>
|
|
116
|
+
|
|
117
|
+
<li><a href="../RubyBreaker/Runtime.html">RubyBreaker::Runtime</a>
|
|
118
|
+
|
|
119
|
+
<li><a href="../RubyBreaker/Runtime/Inspector.html">RubyBreaker::Runtime::Inspector</a>
|
|
120
|
+
|
|
121
|
+
<li><a href="../RubyBreaker/Runtime/MethodInfo.html">RubyBreaker::Runtime::MethodInfo</a>
|
|
122
|
+
|
|
123
|
+
<li><a href="../RubyBreaker/Runtime/Monitor.html">RubyBreaker::Runtime::Monitor</a>
|
|
124
|
+
|
|
125
|
+
<li><a href="../RubyBreaker/Runtime/MonitorInstaller.html">RubyBreaker::Runtime::MonitorInstaller</a>
|
|
126
|
+
|
|
127
|
+
<li><a href="../RubyBreaker/Runtime/MonitorSwitch.html">RubyBreaker::Runtime::MonitorSwitch</a>
|
|
128
|
+
|
|
129
|
+
<li><a href="../RubyBreaker/Runtime/MonitorUtils.html">RubyBreaker::Runtime::MonitorUtils</a>
|
|
130
|
+
|
|
131
|
+
<li><a href="../RubyBreaker/Runtime/ObjectWrapper.html">RubyBreaker::Runtime::ObjectWrapper</a>
|
|
132
|
+
|
|
133
|
+
<li><a href="../RubyBreaker/Runtime/Pluggable.html">RubyBreaker::Runtime::Pluggable</a>
|
|
134
|
+
|
|
135
|
+
<li><a href="../RubyBreaker/Runtime/TypeSigParser.html">RubyBreaker::Runtime::TypeSigParser</a>
|
|
136
|
+
|
|
137
|
+
<li><a href="../RubyBreaker/Runtime/TypeSigUnparser.html">RubyBreaker::Runtime::TypeSigUnparser</a>
|
|
138
|
+
|
|
139
|
+
<li><a href="../RubyBreaker/Runtime/TypeSystem.html">RubyBreaker::Runtime::TypeSystem</a>
|
|
140
|
+
|
|
141
|
+
<li><a href="../RubyBreaker/TypeComparer.html">RubyBreaker::TypeComparer</a>
|
|
142
|
+
|
|
143
|
+
<li><a href="../RubyBreaker/TypeDefs.html">RubyBreaker::TypeDefs</a>
|
|
144
|
+
|
|
145
|
+
<li><a href="../RubyBreaker/TypeDefs/AnyType.html">RubyBreaker::TypeDefs::AnyType</a>
|
|
146
|
+
|
|
147
|
+
<li><a href="../RubyBreaker/TypeDefs/BlockType.html">RubyBreaker::TypeDefs::BlockType</a>
|
|
148
|
+
|
|
149
|
+
<li><a href="../RubyBreaker/TypeDefs/DuckType.html">RubyBreaker::TypeDefs::DuckType</a>
|
|
150
|
+
|
|
151
|
+
<li><a href="../RubyBreaker/TypeDefs/FusionType.html">RubyBreaker::TypeDefs::FusionType</a>
|
|
152
|
+
|
|
153
|
+
<li><a href="../RubyBreaker/TypeDefs/MethodListType.html">RubyBreaker::TypeDefs::MethodListType</a>
|
|
154
|
+
|
|
155
|
+
<li><a href="../RubyBreaker/TypeDefs/MethodType.html">RubyBreaker::TypeDefs::MethodType</a>
|
|
156
|
+
|
|
157
|
+
<li><a href="../RubyBreaker/TypeDefs/NilType.html">RubyBreaker::TypeDefs::NilType</a>
|
|
158
|
+
|
|
159
|
+
<li><a href="../RubyBreaker/TypeDefs/NominalType.html">RubyBreaker::TypeDefs::NominalType</a>
|
|
160
|
+
|
|
161
|
+
<li><a href="../RubyBreaker/TypeDefs/OptionalType.html">RubyBreaker::TypeDefs::OptionalType</a>
|
|
162
|
+
|
|
163
|
+
<li><a href="../RubyBreaker/TypeDefs/OrType.html">RubyBreaker::TypeDefs::OrType</a>
|
|
164
|
+
|
|
165
|
+
<li><a href="../RubyBreaker/TypeDefs/SelfType.html">RubyBreaker::TypeDefs::SelfType</a>
|
|
166
|
+
|
|
167
|
+
<li><a href="../RubyBreaker/TypeDefs/Type.html">RubyBreaker::TypeDefs::Type</a>
|
|
168
|
+
|
|
169
|
+
<li><a href="../RubyBreaker/TypeDefs/VarLengthType.html">RubyBreaker::TypeDefs::VarLengthType</a>
|
|
170
|
+
|
|
171
|
+
<li><a href="../RubyBreaker/TypeUnparser.html">RubyBreaker::TypeUnparser</a>
|
|
172
|
+
|
|
173
|
+
<li><a href="../RubyBreaker/Typing.html">RubyBreaker::Typing</a>
|
|
174
|
+
|
|
175
|
+
<li><a href="../RubyBreaker/Util.html">RubyBreaker::Util</a>
|
|
176
|
+
|
|
177
|
+
<li><a href="../Test.html">Test</a>
|
|
178
|
+
|
|
179
|
+
<li><a href="../Test/Unit.html">Test::Unit</a>
|
|
180
|
+
|
|
181
|
+
<li><a href="../Test/Unit/TestCase.html">Test::Unit::TestCase</a>
|
|
182
|
+
|
|
183
|
+
<li><a href="../Rake.html">Rake</a>
|
|
184
|
+
|
|
185
|
+
<li><a href="../Rake/RubyBreakerTestTask.html">Rake::RubyBreakerTestTask</a>
|
|
186
|
+
|
|
187
|
+
<li><a href="../Kernel.html">Kernel</a>
|
|
188
|
+
|
|
189
|
+
<li><a href="../Object.html">Object</a>
|
|
190
|
+
|
|
191
|
+
</ul>
|
|
192
|
+
</nav>
|
|
193
|
+
|
|
194
|
+
</div>
|
|
195
|
+
</nav>
|
|
196
|
+
|
|
197
|
+
<div id="documentation">
|
|
198
|
+
<h1 class="class">class Rake::RubyBreakerTestTask</h1>
|
|
199
|
+
|
|
200
|
+
<div id="description" class="description">
|
|
201
|
+
|
|
202
|
+
<p>This class can be used as a replacement for Rake::TestTask. It is a
|
|
203
|
+
subclass of Rake::TestTask and maintains additional information for running
|
|
204
|
+
<a href="../RubyBreaker.html">RubyBreaker</a> as a <a
|
|
205
|
+
href="../Rake.html">Rake</a> test task.</p>
|
|
206
|
+
|
|
207
|
+
<p>For example, the following shows how to run <a
|
|
208
|
+
href="../RubyBreaker.html">RubyBreaker</a> in a test task:</p>
|
|
209
|
+
|
|
210
|
+
<p>desc “Run testtask test” <a
|
|
211
|
+
href="RubyBreakerTestTask.html#method-c-new">::new</a>(:“testtask_test”) do
|
|
212
|
+
|t|</p>
|
|
213
|
+
|
|
214
|
+
<pre>t.libs << "lib"
|
|
215
|
+
t.test_files = ["test/testtask/tc_testtask.rb"]
|
|
216
|
+
t.breakable = ["SampleClassA"]</pre>
|
|
217
|
+
|
|
218
|
+
<p>end</p>
|
|
219
|
+
|
|
220
|
+
</div><!-- description -->
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
<!-- Attributes -->
|
|
234
|
+
<section id="attribute-method-details" class="method-section section">
|
|
235
|
+
<h3 class="section-header">Attributes</h3>
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
<div id="attribute-i-breakable" class="method-detail">
|
|
239
|
+
<div class="method-heading attribute-method-heading">
|
|
240
|
+
<span class="method-name">breakable</span><span
|
|
241
|
+
class="attribute-access-type">[RW]</span>
|
|
242
|
+
</div>
|
|
243
|
+
|
|
244
|
+
<div class="method-description">
|
|
245
|
+
|
|
246
|
+
<p>List of Breakable modules/classes</p>
|
|
247
|
+
|
|
248
|
+
</div>
|
|
249
|
+
</div>
|
|
250
|
+
|
|
251
|
+
<div id="attribute-i-rubybreaker_opts" class="method-detail">
|
|
252
|
+
<div class="method-heading attribute-method-heading">
|
|
253
|
+
<span class="method-name">rubybreaker_opts</span><span
|
|
254
|
+
class="attribute-access-type">[RW]</span>
|
|
255
|
+
</div>
|
|
256
|
+
|
|
257
|
+
<div class="method-description">
|
|
258
|
+
|
|
259
|
+
<p><a href="../RubyBreaker.html">RubyBreaker</a> options</p>
|
|
260
|
+
|
|
261
|
+
</div>
|
|
262
|
+
</div>
|
|
263
|
+
|
|
264
|
+
</section><!-- attribute-method-details -->
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
<!-- Methods -->
|
|
268
|
+
|
|
269
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
|
270
|
+
<h3 class="section-header">Public Class Methods</h3>
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
<div id="method-c-new" class="method-detail ">
|
|
274
|
+
|
|
275
|
+
<div class="method-heading">
|
|
276
|
+
<span class="method-name">new</span><span
|
|
277
|
+
class="method-args">(taskname="", *args, &blk)</span>
|
|
278
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
279
|
+
</div>
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
<div class="method-description">
|
|
283
|
+
|
|
284
|
+
<p>This overrides the testtask’s constructor. In addition to the original
|
|
285
|
+
behavior, it keeps track of <a href="../RubyBreaker.html">RubyBreaker</a>
|
|
286
|
+
options and store them in a yaml file.</p>
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
<div class="method-source-code" id="new-source">
|
|
291
|
+
<pre><span class="ruby-comment"># File lib/rubybreaker/task.rb, line 33</span>
|
|
292
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">taskname</span>=<span class="ruby-string">""</span>, *<span class="ruby-identifier">args</span>, &<span class="ruby-identifier">blk</span>)
|
|
293
|
+
|
|
294
|
+
<span class="ruby-comment"># Initialize extra instance variables</span>
|
|
295
|
+
<span class="ruby-ivar">@rubybreaker_opts</span> = []
|
|
296
|
+
<span class="ruby-ivar">@breakable</span> = <span class="ruby-keyword">nil</span>
|
|
297
|
+
|
|
298
|
+
<span class="ruby-comment"># Call the original constructor first</span>
|
|
299
|
+
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">taskname</span>, *<span class="ruby-identifier">args</span>, &<span class="ruby-identifier">blk</span>)
|
|
300
|
+
|
|
301
|
+
<span class="ruby-comment"># Parse the RubyBreaker options</span>
|
|
302
|
+
<span class="ruby-keyword">case</span> <span class="ruby-ivar">@rubybreaker_opts</span>
|
|
303
|
+
<span class="ruby-keyword">when</span> <span class="ruby-constant">Array</span>
|
|
304
|
+
<span class="ruby-identifier">opts</span> = <span class="ruby-ivar">@rubybreaker_opts</span>
|
|
305
|
+
<span class="ruby-keyword">when</span> <span class="ruby-constant">String</span>
|
|
306
|
+
<span class="ruby-identifier">opts</span> = <span class="ruby-ivar">@rubybreaker_opts</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">" "</span>).<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">v</span> <span class="ruby-operator">!=</span> <span class="ruby-string">""</span>}
|
|
307
|
+
<span class="ruby-keyword">else</span>
|
|
308
|
+
<span class="ruby-identifier">opts</span> = []
|
|
309
|
+
<span class="ruby-keyword">end</span>
|
|
310
|
+
|
|
311
|
+
<span class="ruby-comment"># Construct the task configuration hash</span>
|
|
312
|
+
<span class="ruby-identifier">config</span> = {
|
|
313
|
+
<span class="ruby-identifier">name</span><span class="ruby-operator">:</span> <span class="ruby-identifier">taskname</span>,
|
|
314
|
+
<span class="ruby-identifier">rubybreaker_opts</span><span class="ruby-operator">:</span> <span class="ruby-identifier">opts</span>,
|
|
315
|
+
<span class="ruby-identifier">breakable</span><span class="ruby-operator">:</span> [], <span class="ruby-comment"># Set doesn't work well with YAML; just use an array</span>
|
|
316
|
+
<span class="ruby-identifier">test_files</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@test_files</span>,
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
<span class="ruby-comment"># This allows a bulk declaration of Breakable modules/classes</span>
|
|
320
|
+
<span class="ruby-ivar">@breakable</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">config</span>[<span class="ruby-value">:breakable</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">b</span> } <span class="ruby-keyword">if</span> <span class="ruby-ivar">@breakable</span>
|
|
321
|
+
|
|
322
|
+
<span class="ruby-comment"># This code segment is a clever way to store yaml data in a ruby file</span>
|
|
323
|
+
<span class="ruby-comment"># that reads its own yaml data after __END__ when loaded.</span>
|
|
324
|
+
<span class="ruby-identifier">code_data</span> = <span class="ruby-string">"require "yaml"
|
|
325
|
+
f = File.new(__FILE__, "r")
|
|
326
|
+
while !(f.readline.match("^__END__.*$"))
|
|
327
|
+
# do nothing
|
|
328
|
+
end
|
|
329
|
+
data = f.read
|
|
330
|
+
$__rubybreaker_task = YAML.load(data)
|
|
331
|
+
__END__
|
|
332
|
+
#{YAML.dump(config)}
|
|
333
|
+
"</span>
|
|
334
|
+
|
|
335
|
+
<span class="ruby-identifier">tmp_path</span> = <span class="ruby-string">""</span>
|
|
336
|
+
<span class="ruby-comment"># Tests are run different processes, so we must export this</span>
|
|
337
|
+
<span class="ruby-comment"># information to an external yaml file.</span>
|
|
338
|
+
<span class="ruby-identifier">f</span> = <span class="ruby-constant">Tempfile</span>.<span class="ruby-identifier">new</span>([<span class="ruby-node">"#{taskname}"</span>,<span class="ruby-string">".rb"</span>])
|
|
339
|
+
<span class="ruby-identifier">tmp_path</span> = <span class="ruby-identifier">f</span>.<span class="ruby-identifier">path</span>
|
|
340
|
+
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">code_data</span>)
|
|
341
|
+
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">close</span>()
|
|
342
|
+
|
|
343
|
+
<span class="ruby-comment"># Inject the -r option to load this yaml file</span>
|
|
344
|
+
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@ruby_opts</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@ruby_opts</span>.<span class="ruby-identifier">empty?</span>
|
|
345
|
+
<span class="ruby-ivar">@ruby_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-string">"-r"</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">tmp_path</span>
|
|
346
|
+
<span class="ruby-keyword">else</span>
|
|
347
|
+
<span class="ruby-ivar">@ruby_opts</span> = [<span class="ruby-string">"-r"</span>, <span class="ruby-identifier">tmp_path</span>]
|
|
348
|
+
<span class="ruby-keyword">end</span>
|
|
349
|
+
|
|
350
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">self</span>
|
|
351
|
+
<span class="ruby-keyword">end</span></pre>
|
|
352
|
+
</div><!-- new-source -->
|
|
353
|
+
|
|
354
|
+
</div>
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
</div><!-- new-method -->
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
</section><!-- public-class-method-details -->
|
|
363
|
+
|
|
364
|
+
</section><!-- 5Buntitled-5D -->
|
|
365
|
+
|
|
366
|
+
</div><!-- documentation -->
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
<footer id="validator-badges">
|
|
370
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
|
371
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
|
372
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
|
373
|
+
</footer>
|
|
374
|
+
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
|
6
|
+
|
|
7
|
+
<title>module Rake - RDoc Documentation</title>
|
|
8
|
+
|
|
9
|
+
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
|
|
10
|
+
|
|
11
|
+
<script type="text/javascript">
|
|
12
|
+
var rdoc_rel_prefix = "./";
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
|
|
16
|
+
<script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
|
|
17
|
+
<script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
|
|
18
|
+
<script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
|
|
19
|
+
<script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
|
|
20
|
+
<script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<body id="top" class="module">
|
|
24
|
+
<nav id="metadata">
|
|
25
|
+
<nav id="home-section" class="section">
|
|
26
|
+
<h3 class="section-header">
|
|
27
|
+
<a href="./index.html">Home</a>
|
|
28
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
|
29
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
|
30
|
+
</h3>
|
|
31
|
+
</nav>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
|
36
|
+
<h3 class="section-header">
|
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
|
39
|
+
</h3>
|
|
40
|
+
</form>
|
|
41
|
+
|
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
|
43
|
+
</nav>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div id="file-metadata">
|
|
47
|
+
<nav id="file-list-section" class="section">
|
|
48
|
+
<h3 class="section-header">Defined In</h3>
|
|
49
|
+
<ul>
|
|
50
|
+
<li>lib/rubybreaker/task.rb
|
|
51
|
+
</ul>
|
|
52
|
+
</nav>
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div id="class-metadata">
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div id="project-metadata">
|
|
65
|
+
|
|
66
|
+
<nav id="classindex-section" class="section project-section">
|
|
67
|
+
<h3 class="section-header">Class and Module Index</h3>
|
|
68
|
+
|
|
69
|
+
<ul class="link-list">
|
|
70
|
+
|
|
71
|
+
<li><a href="./RubyBreaker.html">RubyBreaker</a>
|
|
72
|
+
|
|
73
|
+
<li><a href="./RubyBreaker/Breakable.html">RubyBreaker::Breakable</a>
|
|
74
|
+
|
|
75
|
+
<li><a href="./RubyBreaker/Broken.html">RubyBreaker::Broken</a>
|
|
76
|
+
|
|
77
|
+
<li><a href="./RubyBreaker/Context.html">RubyBreaker::Context</a>
|
|
78
|
+
|
|
79
|
+
<li><a href="./RubyBreaker/Errors.html">RubyBreaker::Errors</a>
|
|
80
|
+
|
|
81
|
+
<li><a href="./RubyBreaker/Errors/InternalError.html">RubyBreaker::Errors::InternalError</a>
|
|
82
|
+
|
|
83
|
+
<li><a href="./RubyBreaker/Errors/InvalidSubtypeCheck.html">RubyBreaker::Errors::InvalidSubtypeCheck</a>
|
|
84
|
+
|
|
85
|
+
<li><a href="./RubyBreaker/Errors/InvalidTypeConstruction.html">RubyBreaker::Errors::InvalidTypeConstruction</a>
|
|
86
|
+
|
|
87
|
+
<li><a href="./RubyBreaker/Errors/SubtypeFailure.html">RubyBreaker::Errors::SubtypeFailure</a>
|
|
88
|
+
|
|
89
|
+
<li><a href="./RubyBreaker/Errors/TypeError.html">RubyBreaker::Errors::TypeError</a>
|
|
90
|
+
|
|
91
|
+
<li><a href="./RubyBreaker/Errors/UserError.html">RubyBreaker::Errors::UserError</a>
|
|
92
|
+
|
|
93
|
+
<li><a href="./RubyBreaker/ObjectPosition.html">RubyBreaker::ObjectPosition</a>
|
|
94
|
+
|
|
95
|
+
<li><a href="./RubyBreaker/Position.html">RubyBreaker::Position</a>
|
|
96
|
+
|
|
97
|
+
<li><a href="./RubyBreaker/RDocSupport.html">RubyBreaker::RDocSupport</a>
|
|
98
|
+
|
|
99
|
+
<li><a href="./RubyBreaker/RubyTypeUtils.html">RubyBreaker::RubyTypeUtils</a>
|
|
100
|
+
|
|
101
|
+
<li><a href="./RubyBreaker/Runtime.html">RubyBreaker::Runtime</a>
|
|
102
|
+
|
|
103
|
+
<li><a href="./RubyBreaker/Runtime/Inspector.html">RubyBreaker::Runtime::Inspector</a>
|
|
104
|
+
|
|
105
|
+
<li><a href="./RubyBreaker/Runtime/MethodInfo.html">RubyBreaker::Runtime::MethodInfo</a>
|
|
106
|
+
|
|
107
|
+
<li><a href="./RubyBreaker/Runtime/Monitor.html">RubyBreaker::Runtime::Monitor</a>
|
|
108
|
+
|
|
109
|
+
<li><a href="./RubyBreaker/Runtime/MonitorInstaller.html">RubyBreaker::Runtime::MonitorInstaller</a>
|
|
110
|
+
|
|
111
|
+
<li><a href="./RubyBreaker/Runtime/MonitorSwitch.html">RubyBreaker::Runtime::MonitorSwitch</a>
|
|
112
|
+
|
|
113
|
+
<li><a href="./RubyBreaker/Runtime/MonitorUtils.html">RubyBreaker::Runtime::MonitorUtils</a>
|
|
114
|
+
|
|
115
|
+
<li><a href="./RubyBreaker/Runtime/ObjectWrapper.html">RubyBreaker::Runtime::ObjectWrapper</a>
|
|
116
|
+
|
|
117
|
+
<li><a href="./RubyBreaker/Runtime/Pluggable.html">RubyBreaker::Runtime::Pluggable</a>
|
|
118
|
+
|
|
119
|
+
<li><a href="./RubyBreaker/Runtime/TypeSigParser.html">RubyBreaker::Runtime::TypeSigParser</a>
|
|
120
|
+
|
|
121
|
+
<li><a href="./RubyBreaker/Runtime/TypeSigUnparser.html">RubyBreaker::Runtime::TypeSigUnparser</a>
|
|
122
|
+
|
|
123
|
+
<li><a href="./RubyBreaker/Runtime/TypeSystem.html">RubyBreaker::Runtime::TypeSystem</a>
|
|
124
|
+
|
|
125
|
+
<li><a href="./RubyBreaker/TypeComparer.html">RubyBreaker::TypeComparer</a>
|
|
126
|
+
|
|
127
|
+
<li><a href="./RubyBreaker/TypeDefs.html">RubyBreaker::TypeDefs</a>
|
|
128
|
+
|
|
129
|
+
<li><a href="./RubyBreaker/TypeDefs/AnyType.html">RubyBreaker::TypeDefs::AnyType</a>
|
|
130
|
+
|
|
131
|
+
<li><a href="./RubyBreaker/TypeDefs/BlockType.html">RubyBreaker::TypeDefs::BlockType</a>
|
|
132
|
+
|
|
133
|
+
<li><a href="./RubyBreaker/TypeDefs/DuckType.html">RubyBreaker::TypeDefs::DuckType</a>
|
|
134
|
+
|
|
135
|
+
<li><a href="./RubyBreaker/TypeDefs/FusionType.html">RubyBreaker::TypeDefs::FusionType</a>
|
|
136
|
+
|
|
137
|
+
<li><a href="./RubyBreaker/TypeDefs/MethodListType.html">RubyBreaker::TypeDefs::MethodListType</a>
|
|
138
|
+
|
|
139
|
+
<li><a href="./RubyBreaker/TypeDefs/MethodType.html">RubyBreaker::TypeDefs::MethodType</a>
|
|
140
|
+
|
|
141
|
+
<li><a href="./RubyBreaker/TypeDefs/NilType.html">RubyBreaker::TypeDefs::NilType</a>
|
|
142
|
+
|
|
143
|
+
<li><a href="./RubyBreaker/TypeDefs/NominalType.html">RubyBreaker::TypeDefs::NominalType</a>
|
|
144
|
+
|
|
145
|
+
<li><a href="./RubyBreaker/TypeDefs/OptionalType.html">RubyBreaker::TypeDefs::OptionalType</a>
|
|
146
|
+
|
|
147
|
+
<li><a href="./RubyBreaker/TypeDefs/OrType.html">RubyBreaker::TypeDefs::OrType</a>
|
|
148
|
+
|
|
149
|
+
<li><a href="./RubyBreaker/TypeDefs/SelfType.html">RubyBreaker::TypeDefs::SelfType</a>
|
|
150
|
+
|
|
151
|
+
<li><a href="./RubyBreaker/TypeDefs/Type.html">RubyBreaker::TypeDefs::Type</a>
|
|
152
|
+
|
|
153
|
+
<li><a href="./RubyBreaker/TypeDefs/VarLengthType.html">RubyBreaker::TypeDefs::VarLengthType</a>
|
|
154
|
+
|
|
155
|
+
<li><a href="./RubyBreaker/TypeUnparser.html">RubyBreaker::TypeUnparser</a>
|
|
156
|
+
|
|
157
|
+
<li><a href="./RubyBreaker/Typing.html">RubyBreaker::Typing</a>
|
|
158
|
+
|
|
159
|
+
<li><a href="./RubyBreaker/Util.html">RubyBreaker::Util</a>
|
|
160
|
+
|
|
161
|
+
<li><a href="./Test.html">Test</a>
|
|
162
|
+
|
|
163
|
+
<li><a href="./Test/Unit.html">Test::Unit</a>
|
|
164
|
+
|
|
165
|
+
<li><a href="./Test/Unit/TestCase.html">Test::Unit::TestCase</a>
|
|
166
|
+
|
|
167
|
+
<li><a href="./Rake.html">Rake</a>
|
|
168
|
+
|
|
169
|
+
<li><a href="./Rake/RubyBreakerTestTask.html">Rake::RubyBreakerTestTask</a>
|
|
170
|
+
|
|
171
|
+
<li><a href="./Kernel.html">Kernel</a>
|
|
172
|
+
|
|
173
|
+
<li><a href="./Object.html">Object</a>
|
|
174
|
+
|
|
175
|
+
</ul>
|
|
176
|
+
</nav>
|
|
177
|
+
|
|
178
|
+
</div>
|
|
179
|
+
</nav>
|
|
180
|
+
|
|
181
|
+
<div id="documentation">
|
|
182
|
+
<h1 class="module">module Rake</h1>
|
|
183
|
+
|
|
184
|
+
<div id="description" class="description">
|
|
185
|
+
|
|
186
|
+
</div><!-- description -->
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
<!-- Methods -->
|
|
201
|
+
|
|
202
|
+
</section><!-- 5Buntitled-5D -->
|
|
203
|
+
|
|
204
|
+
</div><!-- documentation -->
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
<footer id="validator-badges">
|
|
208
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
|
209
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
|
210
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
|
211
|
+
</footer>
|
|
212
|
+
|