Skip to content

Commit 35212b8

Browse files
authored
prep v2.0.1 release (#79)
* update CHANGELOG * bump version to 2.0.1 * build docs
1 parent 6814790 commit 35212b8

File tree

16 files changed

+70
-44
lines changed

16 files changed

+70
-44
lines changed

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,25 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
88

99
None
1010

11+
## [2.0.1](https://github.com/clarkedb/grift/releases/tag/v2.0.1) - 2022-03-27
12+
13+
### Fixed
14+
15+
* When spying on a method that takes a block, the block now gets forwarded to the original method ([#78](https://github.com/clarkedb/grift/pull/78))
16+
* When mocking the implementation, if a block is not provided a `Grift::Error` is raised instead of a `LocalJumpError` ([#77](https://github.com/clarkedb/grift/pull/77))
17+
1118
## [2.0.0](https://github.com/clarkedb/grift/releases/tag/v2.0.0) - 2022-03-14
1219

20+
This version adds true keyword argument support for Ruby 3. See below for how to handle breaking changes.
21+
1322
### Changed
1423

1524
* Dropped support for Ruby 2.5 ([#69](https://github.com/clarkedb/grift/pull/69))
1625
* Dropped support for Ruby 2.6 ([#72](https://github.com/clarkedb/grift/pull/72))
1726
* To support keyword arguments, records of call arguments are no longer stored in simple arrays but in a custom Enumerable ([#72](https://github.com/clarkedb/grift/pull/72))
1827
+ This changes the way that your tests will interact with mock calls
1928
+ When before `calls` returned an array, it returns a `Grift::MockMethod::MockExecutions::MockArguments` object
20-
+ Migrating to maintain previous behavior just requires appending `.args` to `calls`
29+
+ Migrating to maintain previous behavior just requires appending `.args` to `calls[i]`
2130

2231
### Added
2332

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
grift (2.0.0)
4+
grift (2.0.1)
55

66
GEM
77
remote: https://rubygems.org/
@@ -75,4 +75,4 @@ DEPENDENCIES
7575
simplecov (>= 0.21.2)
7676

7777
BUNDLED WITH
78-
2.1.4
78+
2.2.32

docs/Grift.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ <h2>
131131

132132
</div>
133133
</dt>
134-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>2.0.0</span><span class='tstring_end'>&#39;</span></span></pre></dd>
134+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>2.0.1</span><span class='tstring_end'>&#39;</span></span></pre></dd>
135135

136136
</dl>
137137

@@ -1494,9 +1494,9 @@ <h3 class="signature " id="spy_on-class_method">
14941494
</div>
14951495

14961496
<div id="footer">
1497-
Generated on Mon Mar 14 22:03:24 2022 by
1497+
Generated on Sun Mar 27 14:35:43 2022 by
14981498
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1499-
0.9.27 (ruby-2.7.5).
1499+
0.9.27 (ruby-3.0.3).
15001500
</div>
15011501

15021502
</div>

docs/Grift/Config.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,9 @@ <h3 class="signature first" id="restricted_methods-class_method">
215215
</div>
216216

217217
<div id="footer">
218-
Generated on Mon Mar 14 22:03:24 2022 by
218+
Generated on Sun Mar 27 14:35:43 2022 by
219219
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
220-
0.9.27 (ruby-2.7.5).
220+
0.9.27 (ruby-3.0.3).
221221
</div>
222222

223223
</div>

docs/Grift/Error.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ <h2>Overview</h2><div class="docstring">
125125
</div>
126126

127127
<div id="footer">
128-
Generated on Mon Mar 14 22:03:24 2022 by
128+
Generated on Sun Mar 27 14:35:43 2022 by
129129
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
130-
0.9.27 (ruby-2.7.5).
130+
0.9.27 (ruby-3.0.3).
131131
</div>
132132

133133
</div>

docs/Grift/MinitestPlugin.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ <h3 class="signature first" id="after_teardown-instance_method">
210210
</div>
211211

212212
<div id="footer">
213-
Generated on Mon Mar 14 22:03:24 2022 by
213+
Generated on Sun Mar 27 14:35:43 2022 by
214214
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
215-
0.9.27 (ruby-2.7.5).
215+
0.9.27 (ruby-3.0.3).
216216
</div>
217217

218218
</div>

docs/Grift/MockMethod.html

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -922,12 +922,12 @@ <h3 class="signature first" id="hash_key-class_method">
922922
<pre class="lines">
923923

924924

925-
206
926-
207
927-
208</pre>
925+
208
926+
209
927+
210</pre>
928928
</td>
929929
<td>
930-
<pre class="code"><span class="info file"># File 'lib/grift/mock_method.rb', line 206</span>
930+
<pre class="code"><span class="info file"># File 'lib/grift/mock_method.rb', line 208</span>
931931

932932
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_hash_key'>hash_key</span><span class='lparen'>(</span><span class='id identifier rubyid_klass'>klass</span><span class='comma'>,</span> <span class='id identifier rubyid_method_name'>method_name</span><span class='rparen'>)</span>
933933
<span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_klass'>klass</span><span class='embexpr_end'>}</span><span class='tstring_content'>\#</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_method_name'>method_name</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
@@ -1128,6 +1128,19 @@ <h3 class="signature " id="mock_implementation-instance_method">
11281128
<p>the mock itself</p>
11291129
</div>
11301130

1131+
</li>
1132+
1133+
</ul>
1134+
<p class="tag_title">Raises:</p>
1135+
<ul class="raise">
1136+
1137+
<li>
1138+
1139+
1140+
<span class='type'>(<tt><span class='object_link'><a href="Error.html" title="Grift::Error (class)">Grift::Error</a></span></tt>)</span>
1141+
1142+
1143+
11311144
</li>
11321145

11331146
</ul>
@@ -1153,12 +1166,16 @@ <h3 class="signature " id="mock_implementation-instance_method">
11531166
148
11541167
149
11551168
150
1156-
151</pre>
1169+
151
1170+
152
1171+
153</pre>
11571172
</td>
11581173
<td>
11591174
<pre class="code"><span class="info file"># File 'lib/grift/mock_method.rb', line 136</span>
11601175

11611176
<span class='kw'>def</span> <span class='id identifier rubyid_mock_implementation'>mock_implementation</span><span class='lparen'>(</span><span class='op'>*</span><span class='rparen'>)</span>
1177+
<span class='id identifier rubyid_raise'>raise</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../Grift.html" title="Grift (module)">Grift</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Error.html" title="Grift::Error (class)">Error</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Must provide a block for the new implementation</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1178+
11621179
<span class='id identifier rubyid_premock_setup'>premock_setup</span>
11631180
<span class='id identifier rubyid_mock_executions'>mock_executions</span> <span class='op'>=</span> <span class='ivar'>@mock_executions</span> <span class='comment'># required to access inside class instance block
11641181
</span>
@@ -1402,8 +1419,6 @@ <h3 class="signature " id="mock_return_value-instance_method">
14021419
<pre class="lines">
14031420

14041421

1405-
168
1406-
169
14071422
170
14081423
171
14091424
172
@@ -1415,10 +1430,12 @@ <h3 class="signature " id="mock_return_value-instance_method">
14151430
178
14161431
179
14171432
180
1418-
181</pre>
1433+
181
1434+
182
1435+
183</pre>
14191436
</td>
14201437
<td>
1421-
<pre class="code"><span class="info file"># File 'lib/grift/mock_method.rb', line 168</span>
1438+
<pre class="code"><span class="info file"># File 'lib/grift/mock_method.rb', line 170</span>
14221439

14231440
<span class='kw'>def</span> <span class='id identifier rubyid_mock_return_value'>mock_return_value</span><span class='lparen'>(</span><span class='id identifier rubyid_return_value'>return_value</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
14241441
<span class='id identifier rubyid_premock_setup'>premock_setup</span>
@@ -1485,12 +1502,12 @@ <h3 class="signature " id="to_s-instance_method">
14851502
<pre class="lines">
14861503

14871504

1488-
190
1489-
191
1490-
192</pre>
1505+
192
1506+
193
1507+
194</pre>
14911508
</td>
14921509
<td>
1493-
<pre class="code"><span class="info file"># File 'lib/grift/mock_method.rb', line 190</span>
1510+
<pre class="code"><span class="info file"># File 'lib/grift/mock_method.rb', line 192</span>
14941511

14951512
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
14961513
<span class='const'><span class='object_link'><a href="../Grift.html" title="Grift (module)">Grift</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Grift::MockMethod (class)">MockMethod</a></span></span><span class='period'>.</span><span class='id identifier rubyid_hash_key'><span class='object_link'><a href="#hash_key-class_method" title="Grift::MockMethod.hash_key (method)">hash_key</a></span></span><span class='lparen'>(</span><span class='ivar'>@klass</span><span class='comma'>,</span> <span class='ivar'>@method_name</span><span class='rparen'>)</span>
@@ -1505,9 +1522,9 @@ <h3 class="signature " id="to_s-instance_method">
15051522
</div>
15061523

15071524
<div id="footer">
1508-
Generated on Mon Mar 14 22:03:24 2022 by
1525+
Generated on Sun Mar 27 14:35:43 2022 by
15091526
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1510-
0.9.27 (ruby-2.7.5).
1527+
0.9.27 (ruby-3.0.3).
15111528
</div>
15121529

15131530
</div>

docs/Grift/MockMethod/MockExecutions.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -762,9 +762,9 @@ <h3 class="signature " id="store-instance_method">
762762
</div>
763763

764764
<div id="footer">
765-
Generated on Mon Mar 14 22:03:24 2022 by
765+
Generated on Sun Mar 27 14:35:43 2022 by
766766
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
767-
0.9.27 (ruby-2.7.5).
767+
0.9.27 (ruby-3.0.3).
768768
</div>
769769

770770
</div>

docs/Grift/MockMethod/MockExecutions/MockArguments.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,9 +1076,9 @@ <h3 class="signature " id="values-instance_method">
10761076
</div>
10771077

10781078
<div id="footer">
1079-
Generated on Mon Mar 14 22:03:24 2022 by
1079+
Generated on Sun Mar 27 14:35:43 2022 by
10801080
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1081-
0.9.27 (ruby-2.7.5).
1081+
0.9.27 (ruby-3.0.3).
10821082
</div>
10831083

10841084
</div>

docs/Grift/MockStore.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -946,9 +946,9 @@ <h3 class="signature " id="store-instance_method">
946946
</div>
947947

948948
<div id="footer">
949-
Generated on Mon Mar 14 22:03:24 2022 by
949+
Generated on Sun Mar 27 14:35:43 2022 by
950950
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
951-
0.9.27 (ruby-2.7.5).
951+
0.9.27 (ruby-3.0.3).
952952
</div>
953953

954954
</div>

0 commit comments

Comments
 (0)