dfect 1.0.0 → 1.1.0

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/CREDITS CHANGED
@@ -1 +1,2 @@
1
1
  * [François Beausoleil](http://github.com/francois)
2
+ * [Iñaki Baz Castillo](http://github.com/ibc)
Binary file
@@ -98,6 +98,15 @@
98
98
  </ul>
99
99
  </dd>
100
100
 
101
+ <dt>S</dt>
102
+ <dd>
103
+ <ul>
104
+
105
+ <li><a href="#M000022">S</a></li>
106
+
107
+ </ul>
108
+ </dd>
109
+
101
110
  <dt>T</dt>
102
111
  <dd>
103
112
  <ul>
@@ -115,7 +124,7 @@
115
124
  <dd>
116
125
  <ul>
117
126
 
118
- <li><a href="#M000022">run</a></li>
127
+ <li><a href="#M000023">run</a></li>
119
128
 
120
129
  </ul>
121
130
  </dd>
@@ -124,7 +133,7 @@
124
133
  <dd>
125
134
  <ul>
126
135
 
127
- <li><a href="#M000023">stop</a></li>
136
+ <li><a href="#M000024">stop</a></li>
128
137
 
129
138
  </ul>
130
139
  </dd>
@@ -155,9 +164,9 @@ Allows before and after hooks to be specified via the D() method syntax
155
164
  when this module is mixed-in:
156
165
  </p>
157
166
  <pre>
167
+ D .&lt;&lt; { puts &quot;before all nested tests&quot; }
158
168
  D .&lt; { puts &quot;before each nested test&quot; }
159
169
  D .&gt; { puts &quot;after each nested test&quot; }
160
- D .&lt;&lt; { puts &quot;before all nested tests&quot; }
161
170
  D .&gt;&gt; { puts &quot;after all nested tests&quot; }
162
171
  </pre>
163
172
  </td>
@@ -177,7 +186,7 @@ when this module is mixed-in:
177
186
  </td>
178
187
  <td class='attr-name'>report</td>
179
188
  <td class='attr-desc'><p>
180
- Hash of test results, assembled by <a href="Dfect.html#M000022">run</a>.
189
+ Hash of test results, assembled by <a href="Dfect.html#M000023">run</a>.
181
190
  </p>
182
191
  <dl>
183
192
  <dt>:execution</dt><dd>Hierarchical trace of all tests executed, where each test is represented by
@@ -281,7 +290,7 @@ this test.
281
290
  <p class="source-link">
282
291
  Source: <a href="javascript:toggleSource('M000008_source')" id="l_M000008_source">show</a>
283
292
 
284
- | <a href="http://github.com/sunaku/dfect/blob/2c7eb188cd22bed27ee01277bac4d40203bd93f2/lib/dfect.rb#L146" target="_blank" class="github_url">on GitHub</a>
293
+ | <a href="http://github.com/sunaku/dfect/blob/147e36e24957caf3763b5e28f7040f623e275625/lib/dfect.rb#L146" target="_blank" class="github_url">on GitHub</a>
285
294
 
286
295
  </p>
287
296
  <div id="M000008_source" class="dyn-source">
@@ -330,7 +339,7 @@ this test.
330
339
  <p class="source-link">
331
340
  Source: <a href="javascript:toggleSource('M000010_source')" id="l_M000010_source">show</a>
332
341
 
333
- | <a href="http://github.com/sunaku/dfect/blob/2c7eb188cd22bed27ee01277bac4d40203bd93f2/lib/dfect.rb#L185" target="_blank" class="github_url">on GitHub</a>
342
+ | <a href="http://github.com/sunaku/dfect/blob/147e36e24957caf3763b5e28f7040f623e275625/lib/dfect.rb#L185" target="_blank" class="github_url">on GitHub</a>
334
343
 
335
344
  </p>
336
345
  <div id="M000010_source" class="dyn-source">
@@ -374,7 +383,7 @@ test.
374
383
  <p class="source-link">
375
384
  Source: <a href="javascript:toggleSource('M000009_source')" id="l_M000009_source">show</a>
376
385
 
377
- | <a href="http://github.com/sunaku/dfect/blob/2c7eb188cd22bed27ee01277bac4d40203bd93f2/lib/dfect.rb#L168" target="_blank" class="github_url">on GitHub</a>
386
+ | <a href="http://github.com/sunaku/dfect/blob/147e36e24957caf3763b5e28f7040f623e275625/lib/dfect.rb#L168" target="_blank" class="github_url">on GitHub</a>
378
387
 
379
388
  </p>
380
389
  <div id="M000009_source" class="dyn-source">
@@ -418,7 +427,7 @@ test.
418
427
  <p class="source-link">
419
428
  Source: <a href="javascript:toggleSource('M000011_source')" id="l_M000011_source">show</a>
420
429
 
421
- | <a href="http://github.com/sunaku/dfect/blob/2c7eb188cd22bed27ee01277bac4d40203bd93f2/lib/dfect.rb#L202" target="_blank" class="github_url">on GitHub</a>
430
+ | <a href="http://github.com/sunaku/dfect/blob/147e36e24957caf3763b5e28f7040f623e275625/lib/dfect.rb#L202" target="_blank" class="github_url">on GitHub</a>
422
431
 
423
432
  </p>
424
433
  <div id="M000011_source" class="dyn-source">
@@ -481,7 +490,7 @@ Otherwise, nil is returned.
481
490
  <p class="source-link">
482
491
  Source: <a href="javascript:toggleSource('M000019_source')" id="l_M000019_source">show</a>
483
492
 
484
- | <a href="http://github.com/sunaku/dfect/blob/2c7eb188cd22bed27ee01277bac4d40203bd93f2/lib/dfect.rb#L464" target="_blank" class="github_url">on GitHub</a>
493
+ | <a href="http://github.com/sunaku/dfect/blob/147e36e24957caf3763b5e28f7040f623e275625/lib/dfect.rb#L464" target="_blank" class="github_url">on GitHub</a>
485
494
 
486
495
  </p>
487
496
  <div id="M000019_source" class="dyn-source">
@@ -540,7 +549,7 @@ Returns nil, always.
540
549
  <p class="source-link">
541
550
  Source: <a href="javascript:toggleSource('M000020_source')" id="l_M000020_source">show</a>
542
551
 
543
- | <a href="http://github.com/sunaku/dfect/blob/2c7eb188cd22bed27ee01277bac4d40203bd93f2/lib/dfect.rb#L495" target="_blank" class="github_url">on GitHub</a>
552
+ | <a href="http://github.com/sunaku/dfect/blob/147e36e24957caf3763b5e28f7040f623e275625/lib/dfect.rb#L495" target="_blank" class="github_url">on GitHub</a>
544
553
 
545
554
  </p>
546
555
  <div id="M000020_source" class="dyn-source">
@@ -596,7 +605,7 @@ executed. Otherwise, returns false.
596
605
  <p class="source-link">
597
606
  Source: <a href="javascript:toggleSource('M000021_source')" id="l_M000021_source">show</a>
598
607
 
599
- | <a href="http://github.com/sunaku/dfect/blob/2c7eb188cd22bed27ee01277bac4d40203bd93f2/lib/dfect.rb#L523" target="_blank" class="github_url">on GitHub</a>
608
+ | <a href="http://github.com/sunaku/dfect/blob/147e36e24957caf3763b5e28f7040f623e275625/lib/dfect.rb#L523" target="_blank" class="github_url">on GitHub</a>
600
609
 
601
610
  </p>
602
611
  <div id="M000021_source" class="dyn-source">
@@ -658,7 +667,7 @@ A test may contain nested tests.
658
667
  <p class="source-link">
659
668
  Source: <a href="javascript:toggleSource('M000007_source')" id="l_M000007_source">show</a>
660
669
 
661
- | <a href="http://github.com/sunaku/dfect/blob/2c7eb188cd22bed27ee01277bac4d40203bd93f2/lib/dfect.rb#L127" target="_blank" class="github_url">on GitHub</a>
670
+ | <a href="http://github.com/sunaku/dfect/blob/147e36e24957caf3763b5e28f7040f623e275625/lib/dfect.rb#L127" target="_blank" class="github_url">on GitHub</a>
662
671
 
663
672
  </p>
664
673
  <div id="M000007_source" class="dyn-source">
@@ -731,7 +740,7 @@ StandardError).
731
740
  <p class="source-link">
732
741
  Source: <a href="javascript:toggleSource('M000016_source')" id="l_M000016_source">show</a>
733
742
 
734
- | <a href="http://github.com/sunaku/dfect/blob/2c7eb188cd22bed27ee01277bac4d40203bd93f2/lib/dfect.rb#L352" target="_blank" class="github_url">on GitHub</a>
743
+ | <a href="http://github.com/sunaku/dfect/blob/147e36e24957caf3763b5e28f7040f623e275625/lib/dfect.rb#L352" target="_blank" class="github_url">on GitHub</a>
735
744
 
736
745
  </p>
737
746
  <div id="M000016_source" class="dyn-source">
@@ -803,7 +812,7 @@ StandardError).
803
812
  <p class="source-link">
804
813
  Source: <a href="javascript:toggleSource('M000017_source')" id="l_M000017_source">show</a>
805
814
 
806
- | <a href="http://github.com/sunaku/dfect/blob/2c7eb188cd22bed27ee01277bac4d40203bd93f2/lib/dfect.rb#L394" target="_blank" class="github_url">on GitHub</a>
815
+ | <a href="http://github.com/sunaku/dfect/blob/147e36e24957caf3763b5e28f7040f623e275625/lib/dfect.rb#L394" target="_blank" class="github_url">on GitHub</a>
807
816
 
808
817
  </p>
809
818
  <div id="M000017_source" class="dyn-source">
@@ -867,7 +876,7 @@ StandardError).
867
876
  <p class="source-link">
868
877
  Source: <a href="javascript:toggleSource('M000018_source')" id="l_M000018_source">show</a>
869
878
 
870
- | <a href="http://github.com/sunaku/dfect/blob/2c7eb188cd22bed27ee01277bac4d40203bd93f2/lib/dfect.rb#L429" target="_blank" class="github_url">on GitHub</a>
879
+ | <a href="http://github.com/sunaku/dfect/blob/147e36e24957caf3763b5e28f7040f623e275625/lib/dfect.rb#L429" target="_blank" class="github_url">on GitHub</a>
871
880
 
872
881
  </p>
873
882
  <div id="M000018_source" class="dyn-source">
@@ -920,7 +929,7 @@ Otherwise, returns false.
920
929
  <p class="source-link">
921
930
  Source: <a href="javascript:toggleSource('M000015_source')" id="l_M000015_source">show</a>
922
931
 
923
- | <a href="http://github.com/sunaku/dfect/blob/2c7eb188cd22bed27ee01277bac4d40203bd93f2/lib/dfect.rb#L309" target="_blank" class="github_url">on GitHub</a>
932
+ | <a href="http://github.com/sunaku/dfect/blob/147e36e24957caf3763b5e28f7040f623e275625/lib/dfect.rb#L309" target="_blank" class="github_url">on GitHub</a>
924
933
 
925
934
  </p>
926
935
  <div id="M000015_source" class="dyn-source">
@@ -933,6 +942,57 @@ Otherwise, returns false.
933
942
 
934
943
  </div>
935
944
 
945
+ <div class="method">
946
+ <div class="title" id="M000022">
947
+
948
+ <a name="M000022"></a><b>S</b>(*message)
949
+
950
+ </div>
951
+
952
+ <div class="description">
953
+ <p>
954
+ Adds the given message to the report inside the section of the currently
955
+ running test.
956
+ </p>
957
+ <p>
958
+ You can think of &#8220;S&#8221; as &#8220;say&#8221; or
959
+ &#8220;status&#8221;.
960
+ </p>
961
+ <h4>Parameters</h4>
962
+ <dl>
963
+ <dt>message</dt><dd>Objects to be added to the report.
964
+
965
+ </dd>
966
+ </dl>
967
+ <h4>Examples</h4>
968
+ <pre>
969
+ S &quot;establishing connection...&quot;
970
+
971
+ S &quot;beginning calculation...&quot;, Math::PI, [1, 2, 3, ['a', 'b', 'c']]
972
+ </pre>
973
+
974
+ </div>
975
+
976
+
977
+
978
+
979
+ <div class="sourcecode">
980
+ <p class="source-link">
981
+ Source: <a href="javascript:toggleSource('M000022_source')" id="l_M000022_source">show</a>
982
+
983
+ | <a href="http://github.com/sunaku/dfect/blob/147e36e24957caf3763b5e28f7040f623e275625/lib/dfect.rb#L544" target="_blank" class="github_url">on GitHub</a>
984
+
985
+ </p>
986
+ <div id="M000022_source" class="dyn-source">
987
+ <pre><span class="ruby-comment cmt"># File lib/dfect.rb, line 544</span>
988
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">S</span> <span class="ruby-operator">*</span><span class="ruby-identifier">message</span>
989
+ <span class="ruby-ivar">@exec_trace</span>.<span class="ruby-identifier">concat</span> <span class="ruby-identifier">message</span>
990
+ <span class="ruby-keyword kw">end</span></pre>
991
+ </div>
992
+ </div>
993
+
994
+ </div>
995
+
936
996
  <div class="method">
937
997
  <div class="title" id="M000012">
938
998
 
@@ -973,7 +1033,7 @@ returns that result.
973
1033
  <p class="source-link">
974
1034
  Source: <a href="javascript:toggleSource('M000012_source')" id="l_M000012_source">show</a>
975
1035
 
976
- | <a href="http://github.com/sunaku/dfect/blob/2c7eb188cd22bed27ee01277bac4d40203bd93f2/lib/dfect.rb#L229" target="_blank" class="github_url">on GitHub</a>
1036
+ | <a href="http://github.com/sunaku/dfect/blob/147e36e24957caf3763b5e28f7040f623e275625/lib/dfect.rb#L229" target="_blank" class="github_url">on GitHub</a>
977
1037
 
978
1038
  </p>
979
1039
  <div id="M000012_source" class="dyn-source">
@@ -1026,7 +1086,7 @@ returns that result.
1026
1086
  <p class="source-link">
1027
1087
  Source: <a href="javascript:toggleSource('M000013_source')" id="l_M000013_source">show</a>
1028
1088
 
1029
- | <a href="http://github.com/sunaku/dfect/blob/2c7eb188cd22bed27ee01277bac4d40203bd93f2/lib/dfect.rb#L255" target="_blank" class="github_url">on GitHub</a>
1089
+ | <a href="http://github.com/sunaku/dfect/blob/147e36e24957caf3763b5e28f7040f623e275625/lib/dfect.rb#L255" target="_blank" class="github_url">on GitHub</a>
1030
1090
 
1031
1091
  </p>
1032
1092
  <div id="M000013_source" class="dyn-source">
@@ -1079,7 +1139,7 @@ Otherwise, returns false.
1079
1139
  <p class="source-link">
1080
1140
  Source: <a href="javascript:toggleSource('M000014_source')" id="l_M000014_source">show</a>
1081
1141
 
1082
- | <a href="http://github.com/sunaku/dfect/blob/2c7eb188cd22bed27ee01277bac4d40203bd93f2/lib/dfect.rb#L280" target="_blank" class="github_url">on GitHub</a>
1142
+ | <a href="http://github.com/sunaku/dfect/blob/147e36e24957caf3763b5e28f7040f623e275625/lib/dfect.rb#L280" target="_blank" class="github_url">on GitHub</a>
1083
1143
 
1084
1144
  </p>
1085
1145
  <div id="M000014_source" class="dyn-source">
@@ -1093,9 +1153,9 @@ Otherwise, returns false.
1093
1153
  </div>
1094
1154
 
1095
1155
  <div class="method">
1096
- <div class="title" id="M000022">
1156
+ <div class="title" id="M000023">
1097
1157
 
1098
- <a name="M000022"></a><b>run</b>(continue = true)
1158
+ <a name="M000023"></a><b>run</b>(continue = true)
1099
1159
 
1100
1160
  </div>
1101
1161
 
@@ -1118,13 +1178,13 @@ href="Dfect.html#report">report</a>.
1118
1178
 
1119
1179
  <div class="sourcecode">
1120
1180
  <p class="source-link">
1121
- Source: <a href="javascript:toggleSource('M000022_source')" id="l_M000022_source">show</a>
1181
+ Source: <a href="javascript:toggleSource('M000023_source')" id="l_M000023_source">show</a>
1122
1182
 
1123
- | <a href="http://github.com/sunaku/dfect/blob/2c7eb188cd22bed27ee01277bac4d40203bd93f2/lib/dfect.rb#L535" target="_blank" class="github_url">on GitHub</a>
1183
+ | <a href="http://github.com/sunaku/dfect/blob/147e36e24957caf3763b5e28f7040f623e275625/lib/dfect.rb#L556" target="_blank" class="github_url">on GitHub</a>
1124
1184
 
1125
1185
  </p>
1126
- <div id="M000022_source" class="dyn-source">
1127
- <pre><span class="ruby-comment cmt"># File lib/dfect.rb, line 535</span>
1186
+ <div id="M000023_source" class="dyn-source">
1187
+ <pre><span class="ruby-comment cmt"># File lib/dfect.rb, line 556</span>
1128
1188
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span> <span class="ruby-identifier">continue</span> = <span class="ruby-keyword kw">true</span>
1129
1189
  <span class="ruby-comment cmt"># clear previous results</span>
1130
1190
  <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">continue</span>
@@ -1145,15 +1205,15 @@ href="Dfect.html#report">report</a>.
1145
1205
  </div>
1146
1206
 
1147
1207
  <div class="method">
1148
- <div class="title" id="M000023">
1208
+ <div class="title" id="M000024">
1149
1209
 
1150
- <a name="M000023"></a><b>stop</b>()
1210
+ <a name="M000024"></a><b>stop</b>()
1151
1211
 
1152
1212
  </div>
1153
1213
 
1154
1214
  <div class="description">
1155
1215
  <p>
1156
- Stops the execution of the <a href="Dfect.html#M000022">run</a> method or
1216
+ Stops the execution of the <a href="Dfect.html#M000023">run</a> method or
1157
1217
  raises an exception if that method is not currently executing.
1158
1218
  </p>
1159
1219
 
@@ -1164,13 +1224,13 @@ raises an exception if that method is not currently executing.
1164
1224
 
1165
1225
  <div class="sourcecode">
1166
1226
  <p class="source-link">
1167
- Source: <a href="javascript:toggleSource('M000023_source')" id="l_M000023_source">show</a>
1227
+ Source: <a href="javascript:toggleSource('M000024_source')" id="l_M000024_source">show</a>
1168
1228
 
1169
- | <a href="http://github.com/sunaku/dfect/blob/2c7eb188cd22bed27ee01277bac4d40203bd93f2/lib/dfect.rb#L554" target="_blank" class="github_url">on GitHub</a>
1229
+ | <a href="http://github.com/sunaku/dfect/blob/147e36e24957caf3763b5e28f7040f623e275625/lib/dfect.rb#L575" target="_blank" class="github_url">on GitHub</a>
1170
1230
 
1171
1231
  </p>
1172
- <div id="M000023_source" class="dyn-source">
1173
- <pre><span class="ruby-comment cmt"># File lib/dfect.rb, line 554</span>
1232
+ <div id="M000024_source" class="dyn-source">
1233
+ <pre><span class="ruby-comment cmt"># File lib/dfect.rb, line 575</span>
1174
1234
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stop</span>
1175
1235
  <span class="ruby-identifier">throw</span> <span class="ruby-identifier">:stop_dfect_execution</span>
1176
1236
  <span class="ruby-keyword kw">end</span></pre>
@@ -136,11 +136,11 @@
136
136
  <p class="source-link">
137
137
  Source: <a href="javascript:toggleSource('M000006_source')" id="l_M000006_source">show</a>
138
138
 
139
- | <a href="http://github.com/sunaku/dfect/blob/93bb95b353cf0667efbac81830d2bc83b2919a15/lib/dfect/spec.rb#L29" target="_blank" class="github_url">on GitHub</a>
139
+ | <a href="http://github.com/sunaku/dfect/blob/2e1421415bd1d89020c636b65c42653c334b0b94/lib/dfect/spec.rb#L28" target="_blank" class="github_url">on GitHub</a>
140
140
 
141
141
  </p>
142
142
  <div id="M000006_source" class="dyn-source">
143
- <pre><span class="ruby-comment cmt"># File lib/dfect/spec.rb, line 29</span>
143
+ <pre><span class="ruby-comment cmt"># File lib/dfect/spec.rb, line 28</span>
144
144
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">after</span> <span class="ruby-identifier">what</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>
145
145
  <span class="ruby-identifier">meth</span> =
146
146
  <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">what</span>
@@ -170,11 +170,11 @@
170
170
  <p class="source-link">
171
171
  Source: <a href="javascript:toggleSource('M000005_source')" id="l_M000005_source">show</a>
172
172
 
173
- | <a href="http://github.com/sunaku/dfect/blob/93bb95b353cf0667efbac81830d2bc83b2919a15/lib/dfect/spec.rb#L18" target="_blank" class="github_url">on GitHub</a>
173
+ | <a href="http://github.com/sunaku/dfect/blob/2e1421415bd1d89020c636b65c42653c334b0b94/lib/dfect/spec.rb#L17" target="_blank" class="github_url">on GitHub</a>
174
174
 
175
175
  </p>
176
176
  <div id="M000005_source" class="dyn-source">
177
- <pre><span class="ruby-comment cmt"># File lib/dfect/spec.rb, line 18</span>
177
+ <pre><span class="ruby-comment cmt"># File lib/dfect/spec.rb, line 17</span>
178
178
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">before</span> <span class="ruby-identifier">what</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>
179
179
  <span class="ruby-identifier">meth</span> =
180
180
  <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">what</span>
@@ -231,11 +231,11 @@ Alias for <a href="Kernel.html#M000002">describe</a>
231
231
  <p class="source-link">
232
232
  Source: <a href="javascript:toggleSource('M000002_source')" id="l_M000002_source">show</a>
233
233
 
234
- | <a href="http://github.com/sunaku/dfect/blob/93bb95b353cf0667efbac81830d2bc83b2919a15/lib/dfect/spec.rb#L11" target="_blank" class="github_url">on GitHub</a>
234
+ | <a href="http://github.com/sunaku/dfect/blob/2e1421415bd1d89020c636b65c42653c334b0b94/lib/dfect/spec.rb#L10" target="_blank" class="github_url">on GitHub</a>
235
235
 
236
236
  </p>
237
237
  <div id="M000002_source" class="dyn-source">
238
- <pre><span class="ruby-comment cmt"># File lib/dfect/spec.rb, line 11</span>
238
+ <pre><span class="ruby-comment cmt"># File lib/dfect/spec.rb, line 10</span>
239
239
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">describe</span> <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>
240
240
  <span class="ruby-constant">Dfect</span>.<span class="ruby-constant">D</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>), <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>
241
241
  <span class="ruby-keyword kw">end</span></pre>
@@ -276,7 +276,7 @@ Alias for <a href="Kernel.html#M000002">describe</a>
276
276
  <p class="source-link">
277
277
  Source: <a href="javascript:toggleSource('M000000_source')" id="l_M000000_source">show</a>
278
278
 
279
- | <a href="http://github.com/sunaku/dfect/blob/93bb95b353cf0667efbac81830d2bc83b2919a15/lib/dfect/unit.rb#L10" target="_blank" class="github_url">on GitHub</a>
279
+ | <a href="http://github.com/sunaku/dfect/blob/fca8da8696b52f21a88edde1d57dd25a484ba551/lib/dfect/unit.rb#L10" target="_blank" class="github_url">on GitHub</a>
280
280
 
281
281
  </p>
282
282
  <div id="M000000_source" class="dyn-source">
@@ -303,7 +303,7 @@ Alias for <a href="Kernel.html#M000002">describe</a>
303
303
  <p class="source-link">
304
304
  Source: <a href="javascript:toggleSource('M000001_source')" id="l_M000001_source">show</a>
305
305
 
306
- | <a href="http://github.com/sunaku/dfect/blob/93bb95b353cf0667efbac81830d2bc83b2919a15/lib/dfect/unit.rb#L14" target="_blank" class="github_url">on GitHub</a>
306
+ | <a href="http://github.com/sunaku/dfect/blob/fca8da8696b52f21a88edde1d57dd25a484ba551/lib/dfect/unit.rb#L14" target="_blank" class="github_url">on GitHub</a>
307
307
 
308
308
  </p>
309
309
  <div id="M000001_source" class="dyn-source">
@@ -49,7 +49,7 @@
49
49
 
50
50
  <li>
51
51
 
52
- <a href="Dfect.html">Dfect</a>
52
+ <a href="Kernel.html">Kernel</a>
53
53
 
54
54
  START:includes
55
55
  </li>
data/doc/api/created.rid CHANGED
@@ -1 +1 @@
1
- Mon, 04 May 2009 01:17:57 -0700
1
+ Tue, 27 Oct 2009 00:34:18 -0700
Binary file
@@ -19,7 +19,7 @@
19
19
  </h1>
20
20
  <ul class="files">
21
21
  <li>CREDITS</li>
22
- <li>Last modified: Tue Apr 28 22:21:44 -0700 2009</li>
22
+ <li>Last modified: 2009-10-27 00:21:31 -0700</li>
23
23
  </ul>
24
24
  </div>
25
25
 
@@ -31,6 +31,9 @@
31
31
  <li>[François Beausoleil](<a
32
32
  href="http://github.com/francois">github.com/francois</a>)
33
33
 
34
+ </li>
35
+ <li>[Iñaki Baz Castillo](<a href="http://github.com/ibc">github.com/ibc</a>)
36
+
34
37
  </li>
35
38
  </ul>
36
39
 
@@ -19,7 +19,7 @@
19
19
  </h1>
20
20
  <ul class="files">
21
21
  <li>LICENSE</li>
22
- <li>Last modified: Mon Apr 13 11:11:36 -0700 2009</li>
22
+ <li>Last modified: 2009-04-13 11:11:36 -0700</li>
23
23
  </ul>
24
24
  </div>
25
25
 
@@ -19,7 +19,7 @@
19
19
  </h1>
20
20
  <ul class="files">
21
21
  <li>lib/dfect/auto.rb</li>
22
- <li>Last modified: Mon Apr 13 11:11:36 -0700 2009</li>
22
+ <li>Last modified: 2009-10-03 21:11:21 -0700</li>
23
23
  </ul>
24
24
  </div>
25
25
 
@@ -19,7 +19,7 @@
19
19
  </h1>
20
20
  <ul class="files">
21
21
  <li>lib/dfect/mini.rb</li>
22
- <li>Last modified: Sun May 03 21:45:24 -0700 2009</li>
22
+ <li>Last modified: 2009-10-03 21:09:15 -0700</li>
23
23
  </ul>
24
24
  </div>
25
25
 
@@ -19,7 +19,7 @@
19
19
  </h1>
20
20
  <ul class="files">
21
21
  <li>lib/dfect/spec.rb</li>
22
- <li>Last modified: Sun May 03 21:45:24 -0700 2009</li>
22
+ <li>Last modified: 2009-10-26 23:19:21 -0700</li>
23
23
  </ul>
24
24
  </div>
25
25
 
@@ -40,8 +40,6 @@ RSpec emulation layer.
40
40
 
41
41
  <li>dfect</li>
42
42
 
43
- <li>delegate</li>
44
-
45
43
  </ul>
46
44
 
47
45
 
@@ -19,7 +19,7 @@
19
19
  </h1>
20
20
  <ul class="files">
21
21
  <li>lib/dfect/unit.rb</li>
22
- <li>Last modified: Sun May 03 21:45:24 -0700 2009</li>
22
+ <li>Last modified: 2009-10-03 21:16:18 -0700</li>
23
23
  </ul>
24
24
  </div>
25
25
 
@@ -19,7 +19,7 @@
19
19
  </h1>
20
20
  <ul class="files">
21
21
  <li>lib/dfect.rb</li>
22
- <li>Last modified: Sun May 03 22:25:18 -0700 2009</li>
22
+ <li>Last modified: 2009-10-27 00:21:02 -0700</li>
23
23
  </ul>
24
24
  </div>
25
25
 
@@ -28,6 +28,14 @@ Searchdoc.Navigation = new function() {
28
28
  case 38: //Event.KEY_UP:
29
29
  case 39: //Event.KEY_RIGHT:
30
30
  case 40: //Event.KEY_DOWN:
31
+ case 73: // i - qwerty
32
+ case 74: // j
33
+ case 75: // k
34
+ case 76: // l
35
+ case 67: // c - dvorak
36
+ case 72: // h
37
+ case 84: // t
38
+ case 78: // n
31
39
  this.clearMoveTimeout();
32
40
  break;
33
41
  }
@@ -37,28 +45,37 @@ Searchdoc.Navigation = new function() {
37
45
  if (!this.navigationActive) return;
38
46
  switch(e.keyCode) {
39
47
  case 37: //Event.KEY_LEFT:
40
- if (this.moveLeft())
41
- e.preventDefault();
48
+ case 74: // j (qwerty)
49
+ case 72: // h (dvorak)
50
+ if (this.moveLeft()) e.preventDefault();
42
51
  break;
43
52
  case 38: //Event.KEY_UP:
44
- if (this.moveUp())
45
- e.preventDefault();
46
- this.startMoveTimeout(false);
53
+ case 73: // i (qwerty)
54
+ case 67: // c (dvorak)
55
+ if (e.keyCode == 38 || e.ctrlKey) {
56
+ if (this.moveUp()) e.preventDefault();
57
+ this.startMoveTimeout(false);
58
+ }
47
59
  break;
48
60
  case 39: //Event.KEY_RIGHT:
49
- if (this.moveRight())
50
- e.preventDefault();
61
+ case 76: // l (qwerty)
62
+ case 78: // n (dvorak)
63
+ if (this.moveRight()) e.preventDefault();
51
64
  break;
52
65
  case 40: //Event.KEY_DOWN:
53
- if (this.moveDown())
54
- e.preventDefault();
55
- this.startMoveTimeout(true);
66
+ case 75: // k (qwerty)
67
+ case 84: // t (dvorak)
68
+ if (e.keyCode == 40 || e.ctrlKey) {
69
+ if (this.moveDown()) e.preventDefault();
70
+ this.startMoveTimeout(true);
71
+ }
56
72
  break;
57
73
  case 9: //Event.KEY_TAB:
58
74
  case 13: //Event.KEY_RETURN:
59
75
  if (this.$current) this.select(this.$current);
60
76
  break;
61
77
  }
78
+ if (e.ctrlKey && e.shiftKey) this.select(this.$current);
62
79
  }
63
80
 
64
81
  this.clearMoveTimeout = function() {
@@ -342,8 +359,9 @@ Searchdoc.Panel.prototype = $.extend({}, Searchdoc.Navigation, new function() {
342
359
  this.setNavigationActive(false);
343
360
  }
344
361
 
345
- this.search = function(value) {
362
+ this.search = function(value, selectFirstMatch) {
346
363
  value = jQuery.trim(value).toLowerCase();
364
+ this.selectFirstMatch = selectFirstMatch;
347
365
  if (value) {
348
366
  this.$element.removeClass('panel_tree').addClass('panel_results');
349
367
  this.tree.setNavigationActive(false);
@@ -373,6 +391,7 @@ Searchdoc.Panel.prototype = $.extend({}, Searchdoc.Navigation, new function() {
373
391
  this.firstRun = false;
374
392
  this.$current = $(target.firstChild);
375
393
  this.$current.addClass('current');
394
+ if (this.selectFirstMatch) this.select();
376
395
  scrollIntoView(this.$current[0], this.$view[0])
377
396
  }
378
397
  if (jQuery.browser.msie) this.$element[0].className += '';
@@ -462,10 +481,14 @@ Searchdoc.Tree.prototype = $.extend({}, Searchdoc.Navigation, new function() {
462
481
  }
463
482
 
464
483
  this.select = function($li) {
484
+ this.highlight($li);
465
485
  var path = $li[0].searchdoc_tree_data.path;
486
+ if (path) this.panel.open(path);
487
+ }
488
+
489
+ this.highlight = function($li) {
466
490
  if (this.$current) this.$current.removeClass('current');
467
491
  this.$current = $li.addClass('current');
468
- if (path) this.panel.open(path);
469
492
  }
470
493
 
471
494
  this.toggle = function($li) {
@@ -479,7 +502,7 @@ Searchdoc.Tree.prototype = $.extend({}, Searchdoc.Navigation, new function() {
479
502
 
480
503
  this.moveRight = function() {
481
504
  if (!this.$current) {
482
- this.select(this.$list.find('li:first'));
505
+ this.highlight(this.$list.find('li:first'));
483
506
  return;
484
507
  }
485
508
  if (this.$current.hasClass('closed')) {
@@ -489,7 +512,7 @@ Searchdoc.Tree.prototype = $.extend({}, Searchdoc.Navigation, new function() {
489
512
 
490
513
  this.moveLeft = function() {
491
514
  if (!this.$current) {
492
- this.select(this.$list.find('li:first'));
515
+ this.highlight(this.$list.find('li:first'));
493
516
  return;
494
517
  }
495
518
  if (!this.$current.hasClass('closed')) {
@@ -507,7 +530,7 @@ Searchdoc.Tree.prototype = $.extend({}, Searchdoc.Navigation, new function() {
507
530
 
508
531
  this.move = function(isDown) {
509
532
  if (!this.$current) {
510
- this.select(this.$list.find('li:first'));
533
+ this.highlight(this.$list.find('li:first'));
511
534
  return true;
512
535
  }
513
536
  var next = this.$current[0];