Skip to content

Commit 5563dfa

Browse files
authored
chore: prep v3.0.0 release (#259)
* update CHANGELOG * bump version * fix code refs in docstrings * build docs
1 parent 44e690c commit 5563dfa

26 files changed

+1092
-578
lines changed

CHANGELOG.md

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,88 +8,101 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
88

99
None
1010

11+
## [3.0.0](https://github.com/clarkedb/grift/releases/tag/v3.0.0) - 2024-12-26
12+
13+
### Breaking
14+
15+
- All mocks are now scoped to the current thread for thread-safety ([#256](https://github.com/clarkedb/grift/pull/256))
16+
- For parallelized test suites using processes this is not a breaking change
17+
- This fixes intermittent test failures sometimes seen when codebases have threads calling mocked methods
18+
19+
### Added
20+
21+
- Official support for Ruby 3.4 ([#257](https://github.com/clarkedb/grift/pull/257))
22+
- Direct access to mock results/calls without calling `mock` ([#258](https://github.com/clarkedb/grift/pull/258))
23+
1124
## [2.2.0](https://github.com/clarkedb/grift/releases/tag/v2.2.0) - 2024-01-13
1225

1326
### Added
1427

15-
* Official support for Ruby 3.3 ([#203](https://github.com/clarkedb/grift/pull/203))
28+
- Official support for Ruby 3.3 ([#203](https://github.com/clarkedb/grift/pull/203))
1629

1730
## [2.1.0](https://github.com/clarkedb/grift/releases/tag/v2.1.0) - 2022-12-27
1831

1932
### Added
2033

21-
* Official support for Ruby 3.2 ([#126](https://github.com/clarkedb/grift/pull/126))
22-
* Support for finite/self-terminating mocking for more precision in testing where a method may get called multiple times
23-
+ The Grift API now supports `mock_return_value_once`, `mock_return_value_n_times`, and `mock_return_values_in_order` ([#135](https://github.com/clarkedb/grift/pull/135))
24-
+ The Grift API now supports `mock_implementation_once` and `mock_implementation_n_times` ([#136](https://github.com/clarkedb/grift/pull/136))
34+
- Official support for Ruby 3.2 ([#126](https://github.com/clarkedb/grift/pull/126))
35+
- Support for finite/self-terminating mocking for more precision in testing where a method may get called multiple times
36+
- The Grift API now supports `mock_return_value_once`, `mock_return_value_n_times`, and `mock_return_values_in_order` ([#135](https://github.com/clarkedb/grift/pull/135))
37+
- The Grift API now supports `mock_implementation_once` and `mock_implementation_n_times` ([#136](https://github.com/clarkedb/grift/pull/136))
2538

2639
## [2.0.1](https://github.com/clarkedb/grift/releases/tag/v2.0.1) - 2022-03-27
2740

2841
### Fixed
2942

30-
* 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))
31-
* 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))
43+
- 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))
44+
- 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))
3245

3346
## [2.0.0](https://github.com/clarkedb/grift/releases/tag/v2.0.0) - 2022-03-14
3447

3548
This version adds true keyword argument support for Ruby 3. See below for how to handle breaking changes.
3649

3750
### Changed
3851

39-
* Dropped support for Ruby 2.5 ([#69](https://github.com/clarkedb/grift/pull/69))
40-
* Dropped support for Ruby 2.6 ([#72](https://github.com/clarkedb/grift/pull/72))
41-
* 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))
42-
+ This changes the way that your tests will interact with mock calls
43-
+ When before `calls` returned an array, it returns a `Grift::MockMethod::MockExecutions::MockArguments` object
44-
+ Migrating to maintain previous behavior just requires appending `.args` to `calls[i]`
52+
- Dropped support for Ruby 2.5 ([#69](https://github.com/clarkedb/grift/pull/69))
53+
- Dropped support for Ruby 2.6 ([#72](https://github.com/clarkedb/grift/pull/72))
54+
- 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))
55+
- This changes the way that your tests will interact with mock calls
56+
- When before `calls` returned an array, it returns a `Grift::MockMethod::MockExecutions::MockArguments` object
57+
- Migrating to maintain previous behavior just requires appending `.args` to `calls[i]`
4558

4659
### Added
4760

48-
* Support for mocking private instance and class methods ([#68](https://github.com/clarkedb/grift/pull/68))
49-
* Support for mocking methods that take positional and keyword arguments ([#72](https://github.com/clarkedb/grift/pull/72))
61+
- Support for mocking private instance and class methods ([#68](https://github.com/clarkedb/grift/pull/68))
62+
- Support for mocking methods that take positional and keyword arguments ([#72](https://github.com/clarkedb/grift/pull/72))
5063

5164
### Fixed
5265

53-
* When mocking protected methods, the method now remains protected while mocked and after unmocking ([#68](https://github.com/clarkedb/grift/pull/68))
54-
* When mocking inherited methods, the method goes back to the ancestor's definition after unmocking ([#69](https://github.com/clarkedb/grift/pull/69))
55-
* When mocking methods with keyword arugments in Ruby 3.x, no error is thrown ([#72](https://github.com/clarkedb/grift/pull/72))
66+
- When mocking protected methods, the method now remains protected while mocked and after unmocking ([#68](https://github.com/clarkedb/grift/pull/68))
67+
- When mocking inherited methods, the method goes back to the ancestor's definition after unmocking ([#69](https://github.com/clarkedb/grift/pull/69))
68+
- When mocking methods with keyword arugments in Ruby 3.x, no error is thrown ([#72](https://github.com/clarkedb/grift/pull/72))
5669

5770
## [1.1.0](https://github.com/clarkedb/grift/releases/tag/v1.1.0) - 2022-02-03
5871

5972
This version adds support for Ruby 3.1 and updates various dependencies.
6073

6174
### Added
6275

63-
* Support Ruby 3.1 ([#52](https://github.com/clarkedb/grift/pull/52))
76+
- Support Ruby 3.1 ([#52](https://github.com/clarkedb/grift/pull/52))
6477

6578
## [1.0.2](https://github.com/clarkedb/grift/releases/tag/v1.0.2) - 2021-11-11
6679

6780
This version fixes a bug that prevented the mocking of methods defined by a class's super class.
6881

6982
### Fixed
7083

71-
* Allow mocks of inherited methods ([#34](https://github.com/clarkedb/grift/pull/34))
84+
- Allow mocks of inherited methods ([#34](https://github.com/clarkedb/grift/pull/34))
7285

7386
## [1.0.1](https://github.com/clarkedb/grift/releases/tag/v1.0.1) - 2021-11-10
7487

7588
This version fixes a bug that prevented most mocking features in Grift from functioning as expected.
7689

7790
### Fixed
7891

79-
* Uses relative path for yaml config files ([#28](https://github.com/clarkedb/grift/pull/28))
92+
- Uses relative path for yaml config files ([#28](https://github.com/clarkedb/grift/pull/28))
8093

8194
## [1.0.0](https://github.com/clarkedb/grift/releases/tag/v1.0.0) - 2021-11-06
8295

8396
The first major version of Grift! 100% documentation and 100% code coverage.
8497

8598
### Added
8699

87-
* Spying on method ([#9](https://github.com/clarkedb/grift/pull/9))
88-
* Mocking method return values ([#9](https://github.com/clarkedb/grift/pull/9))
89-
* Mocking method implementation ([#13](https://github.com/clarkedb/grift/pull/13))
90-
* Restricted methods that cannot be mocked ([#20](https://github.com/clarkedb/grift/pull/20))
91-
* MiniTest Plugin to use hooks and clean up after tests ([#17](https://github.com/clarkedb/grift/pull/17))
92-
* Documentation! ([#23](https://github.com/clarkedb/grift/pull/23))
100+
- Spying on method ([#9](https://github.com/clarkedb/grift/pull/9))
101+
- Mocking method return values ([#9](https://github.com/clarkedb/grift/pull/9))
102+
- Mocking method implementation ([#13](https://github.com/clarkedb/grift/pull/13))
103+
- Restricted methods that cannot be mocked ([#20](https://github.com/clarkedb/grift/pull/20))
104+
- MiniTest Plugin to use hooks and clean up after tests ([#17](https://github.com/clarkedb/grift/pull/17))
105+
- Documentation! ([#23](https://github.com/clarkedb/grift/pull/23))
93106

94107
## [0.1.0](https://github.com/clarkedb/grift/releases/tag/v0.1.0) - 2021-10-12
95108

0 commit comments

Comments
 (0)