memo_wise 1.10.0 → 1.11.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -16
- data/README.md +28 -28
- data/lib/memo_wise/internal_api.rb +1 -1
- data/lib/memo_wise/version.rb +1 -1
- data/lib/memo_wise.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 580c75382ed661927635d86573723585ac070bb1b173684ca58d7c47250cdeeb
|
4
|
+
data.tar.gz: 8fa8aadd0eeb70bedb7e7f149942b1959ce3b807ad24c99e4b5558fe283fc669
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f12681421e4994476929d36d6ee7d16c7a67f4641540a8291b8fa1c939bc9d4877930ace711544ed8f9ec80d2db92ac266c3155e1e0a6fa05e4cea75630c704
|
7
|
+
data.tar.gz: 82094910c30c4bfbb317b285f3a7f6bd7c03c34d427d0788c58c2e7cf329ab03e37862d817b3686edcf4b03d55c084a834964aca5957137f2199927155611fe6
|
data/CHANGELOG.md
CHANGED
@@ -5,58 +5,74 @@ follows a format inspired by [Keep a Changelog](https://keepachangelog.com/en/1.
|
|
5
5
|
|
6
6
|
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
-
## [Unreleased](https://github.com/panorama-ed/memo_wise/compare/v1.
|
8
|
+
## [Unreleased](https://github.com/panorama-ed/memo_wise/compare/v1.11.0...HEAD)
|
9
9
|
|
10
|
-
**Gem enhancements:**
|
10
|
+
**Gem enhancements:** none
|
11
11
|
|
12
12
|
_No breaking changes!_
|
13
13
|
|
14
|
+
**Project enhancements:** none
|
15
|
+
|
16
|
+
## [v1.11.0](https://github.com/panorama-ed/memo_wise/compare/v1.10.0...v1.11.0)
|
17
|
+
|
18
|
+
**Gem enhancements:**
|
19
|
+
|
20
|
+
- Stopped `preset_memo_wise` (and `reset_memo_wise` with an argument) from raising errors when called on module methods [[#377]](https://github.com/panorama-ed/memo_wise/pull/377)
|
21
|
+
- Changed internal `require`s to `require_relative` to make code less dependent on the load path [[#350](https://github.com/panorama-ed/memo_wise/pull/350)]
|
22
|
+
|
23
|
+
_Breaking changes:_
|
24
|
+
- Removed Ruby 2.5 (EOL) and 2.6 (EOL) support to allow upgrading rexml dependency version from a version that includes a [CVE](https://www.ruby-lang.org/en/news/2024/10/28/redos-rexml-cve-2024-49761/) [[#362]](https://github.com/panorama-ed/memo_wise/pull/362)
|
25
|
+
|
14
26
|
**Project enhancements:**
|
15
27
|
|
28
|
+
- Updated `webrick` in `Gemfile.lock` to resolve CVE-2024-47220. This vulnerability does not impact `memo_wise` users.
|
29
|
+
- Allowed more tests to run on JRuby [[#377]](https://github.com/panorama-ed/memo_wise/pull/377)
|
30
|
+
|
16
31
|
## [v1.10.0](https://github.com/panorama-ed/memo_wise/compare/v1.9.0...v1.10.0)
|
17
32
|
|
18
33
|
**Gem enhancements:**
|
19
34
|
|
20
|
-
- Reduced gem size from 173 kB compressed (312 kB unpacked) to
|
35
|
+
- Reduced gem size from 173 kB compressed (312 kB unpacked) to 18.5 kB (68 kB unpacked) [[#345](https://github.com/panorama-ed/memo_wise/pull/345)]
|
21
36
|
|
22
37
|
_No breaking changes!_
|
23
38
|
|
24
39
|
**Project enhancements:**
|
25
40
|
|
26
41
|
- Updated official test coverage to support Ruby 3.3 [[#335](https://github.com/panorama-ed/memo_wise/pull/335)]
|
42
|
+
- Added `alt_memery` and `memoist3` to benchmarks [[#339](https://github.com/panorama-ed/memo_wise/pull/339)]
|
43
|
+
- Updated benchmark results in `README.md` to Ruby 3.3.5 [[#339](https://github.com/panorama-ed/memo_wise/pull/339)]
|
27
44
|
|
28
45
|
## [v1.9.0](https://github.com/panorama-ed/memo_wise/compare/v1.8.0...v1.9.0)
|
29
46
|
|
30
47
|
**Gem enhancements:**
|
31
48
|
|
32
|
-
- Fixed a bug that overwrote existing self.extended method definitions. [[#324]
|
33
|
-
- Fixed a bug that overwrote existing self.inherited method definitions. [[#325]
|
49
|
+
- Fixed a bug that overwrote existing self.extended method definitions. [[#324](https://github.com/panorama-ed/memo_wise/pull/314)]
|
50
|
+
- Fixed a bug that overwrote existing self.inherited method definitions. [[#325](https://github.com/panorama-ed/memo_wise/pull/315)]
|
34
51
|
|
35
52
|
_Breaking changes:_
|
36
|
-
- Removed Ruby 2.4 (EOL) support to allow upgrading rexml dependency version from a version that includes a [CVE](https://www.ruby-lang.org/en/news/2024/05/16/dos-rexml-cve-2024-35176/) [[#336]
|
53
|
+
- Removed Ruby 2.4 (EOL) support to allow upgrading rexml dependency version from a version that includes a [CVE](https://www.ruby-lang.org/en/news/2024/05/16/dos-rexml-cve-2024-35176/) [[#336](https://github.com/panorama-ed/memo_wise/pull/336)]
|
37
54
|
|
38
55
|
**Project enhancements:**
|
39
56
|
|
40
|
-
- Fixed `bundle exec yard server --reload` and related documentation [[#333]
|
41
|
-
- Fixed Codecov rate limiting errors affecting pull requests by upgrading `codecov/codecov-action` and using a Codecov token [[#317]
|
57
|
+
- Fixed `bundle exec yard server --reload` and related documentation [[#333](https://github.com/panorama-ed/memo_wise/pull/333)]
|
58
|
+
- Fixed Codecov rate limiting errors affecting pull requests by upgrading `codecov/codecov-action` and using a Codecov token [[#317](https://github.com/panorama-ed/memo_wise/pull/317)]
|
42
59
|
|
43
60
|
## [v1.8.0](https://github.com/panorama-ed/memo_wise/compare/v1.7.0...v1.8.0) - 2023-10-25
|
44
61
|
|
45
62
|
**Gem enhancements:**
|
46
63
|
|
47
|
-
- In Ruby3.2+, for singleton classes, use `#attached_object` instead of `ObjectSpace` [[#318]
|
64
|
+
- In Ruby3.2+, for singleton classes, use `#attached_object` instead of `ObjectSpace` [[#318](https://github.com/panorama-ed/memo_wise/pull/318)]
|
48
65
|
|
49
66
|
_No breaking changes!_
|
50
67
|
|
51
68
|
**Project enhancements:**
|
52
69
|
|
53
|
-
- Switched RuboCop configuration from `panolint` to `panolint-ruby` [[#312]
|
54
|
-
- Updated benchmark results in `README.md` to Ruby 3.2.2 and 2.7.8 [[#313]
|
55
|
-
- Updated `Dry::Core` gem version to 1.0.0 in benchmarks [[#297]
|
56
|
-
- Updated `Memery` gem version to 1.5.0 in benchmarks [[#313]
|
57
|
-
- Updated `Memoized` gem version to 1.1.1 in benchmarks [[#288]
|
58
|
-
- Reorganized `CHANGELOG.md` for improved clarity and completeness
|
59
|
-
[[#282](https://github.com/panorama-ed/memo_wise/pull/282)]
|
70
|
+
- Switched RuboCop configuration from `panolint` to `panolint-ruby` [[#312](https://github.com/panorama-ed/memo_wise/pull/312)]
|
71
|
+
- Updated benchmark results in `README.md` to Ruby 3.2.2 and 2.7.8 [[#313](https://github.com/panorama-ed/memo_wise/pull/297)]
|
72
|
+
- Updated `Dry::Core` gem version to 1.0.0 in benchmarks [[#297](https://github.com/panorama-ed/memo_wise/pull/297)]
|
73
|
+
- Updated `Memery` gem version to 1.5.0 in benchmarks [[#313](https://github.com/panorama-ed/memo_wise/pull/313)]
|
74
|
+
- Updated `Memoized` gem version to 1.1.1 in benchmarks [[#288](https://github.com/panorama-ed/memo_wise/pull/288)]
|
75
|
+
- Reorganized `CHANGELOG.md` for improved clarity and completeness [[#282](https://github.com/panorama-ed/memo_wise/pull/282)]
|
60
76
|
|
61
77
|
## [v1.7.0](https://github.com/panorama-ed/memo_wise/compare/v1.6.0...v1.7.0) - 2022-04-04
|
62
78
|
|
data/README.md
CHANGED
@@ -112,38 +112,38 @@ For more usage details, see our detailed [documentation](#documentation).
|
|
112
112
|
|
113
113
|
## Benchmarks
|
114
114
|
|
115
|
-
Benchmarks are run in GitHub Actions, and the tables below are updated with every code change. **Values >1.00x represent how much _slower_ each gem’s memoized value retrieval is than the latest commit of `MemoWise`**, according to [`benchmark-ips`](https://github.com/evanphx/benchmark-ips) (2.
|
116
|
-
|
117
|
-
Results using Ruby 3.3.
|
118
|
-
|
119
|
-
|Method arguments|`
|
120
|
-
|
121
|
-
|`()` (none)|0.
|
122
|
-
|`(a)`|
|
123
|
-
|`(a, b)`|0.85x|
|
124
|
-
|`(a:)`|1.
|
125
|
-
|`(a:, b:)`|0.
|
126
|
-
|`(a, b:)`|0.
|
127
|
-
|`(a, *args)`|0.
|
128
|
-
|`(a:, **kwargs)`|0.
|
129
|
-
|`(a, *args, b:, **kwargs)`|0.
|
130
|
-
|
131
|
-
\* `
|
115
|
+
Benchmarks are run in GitHub Actions, and the tables below are updated with every code change. **Values >1.00x represent how much _slower_ each gem’s memoized value retrieval is than the latest commit of `MemoWise`**, according to [`benchmark-ips`](https://github.com/evanphx/benchmark-ips) (2.14.0).
|
116
|
+
|
117
|
+
Results using Ruby 3.3.6:
|
118
|
+
|
119
|
+
|Method arguments|`alt_memery` (2.1.0)|`dry-core`\* (1.0.2)|`memery` (1.6.0)|`memoist3` (1.0.0)|
|
120
|
+
|--|--|--|--|--|
|
121
|
+
|`()` (none)|12.97x|0.63x|3.31x|2.62x|
|
122
|
+
|`(a)`|9.62x|0.99x|3.86x|14.61x|
|
123
|
+
|`(a, b)`|7.82x|0.85x|3.12x|11.75x|
|
124
|
+
|`(a:)`|15.36x|1.01x|6.72x|19.70x|
|
125
|
+
|`(a:, b:)`|13.07x|0.90x|5.61x|20.64x|
|
126
|
+
|`(a, b:)`|12.68x|0.89x|5.63x|16.27x|
|
127
|
+
|`(a, *args)`|1.93x|0.74x|0.78x|2.85x|
|
128
|
+
|`(a:, **kwargs)`|2.81x|0.72x|1.19x|4.48x|
|
129
|
+
|`(a, *args, b:, **kwargs)`|1.75x|0.66x|0.87x|2.82x|
|
130
|
+
|
131
|
+
\* `dry-core`
|
132
132
|
[may cause incorrect behavior caused by hash collisions](https://github.com/dry-rb/dry-core/issues/63).
|
133
133
|
|
134
134
|
Results using Ruby 2.7.8 (because these gems raise errors in Ruby 3.x):
|
135
135
|
|
136
|
-
|Method arguments|`
|
136
|
+
|Method arguments|`ddmemoize` (1.0.0)|`memoist` (0.16.2)|`memoized` (1.1.1)|`memoizer` (1.0.3)|
|
137
137
|
|--|--|--|--|--|
|
138
|
-
|`()` (none)|
|
139
|
-
|`(a)`|
|
140
|
-
|`(a, b)`|
|
141
|
-
|`(a:)`|30.
|
142
|
-
|`(a:, b:)`|27.
|
143
|
-
|`(a, b:)`|26.
|
144
|
-
|`(a, *args)`|3.
|
145
|
-
|`(a:, **kwargs)`|2.
|
146
|
-
|`(a, *args, b:, **kwargs)`|2.
|
138
|
+
|`()` (none)|24.14x|2.44x|23.84x|2.59x|
|
139
|
+
|`(a)`|22.16x|14.80x|20.70x|11.67x|
|
140
|
+
|`(a, b)`|19.39x|13.66x|18.03x|11.46x|
|
141
|
+
|`(a:)`|30.54x|23.68x|25.21x|21.20x|
|
142
|
+
|`(a:, b:)`|27.75x|22.59x|23.47x|20.65x|
|
143
|
+
|`(a, b:)`|26.72x|21.39x|21.73x|19.43x|
|
144
|
+
|`(a, *args)`|3.26x|2.31x|3.09x|1.93x|
|
145
|
+
|`(a:, **kwargs)`|2.87x|2.29x|2.51x|2.10x|
|
146
|
+
|`(a, *args, b:, **kwargs)`|2.23x|1.88x|1.97x|1.73x|
|
147
147
|
|
148
148
|
You can run benchmarks yourself with:
|
149
149
|
|
@@ -195,7 +195,7 @@ To edit documentation locally and see it rendered in your browser
|
|
195
195
|
using hot reloading, run:
|
196
196
|
|
197
197
|
```bash
|
198
|
-
bundle exec yard server --reload
|
198
|
+
BUNDLE_WITH=docs bundle exec yard server --reload
|
199
199
|
```
|
200
200
|
|
201
201
|
You can then open your web browser to `http://127.0.0.1:8808/`. As you
|
@@ -188,7 +188,7 @@ module MemoWise
|
|
188
188
|
# The class to which we are prepending MemoWise to provide memoization.
|
189
189
|
# @return [Class] where we look for method definitions
|
190
190
|
def self.target_class(target)
|
191
|
-
if target.instance_of?(Class)
|
191
|
+
if target.instance_of?(Class) || target.instance_of?(Module)
|
192
192
|
# A class's methods are defined in its singleton class
|
193
193
|
target.singleton_class
|
194
194
|
else
|
data/lib/memo_wise/version.rb
CHANGED
data/lib/memo_wise.rb
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
require "set" # Ruby < 3.2 does not load `set` by default.
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
require_relative "memo_wise/internal_api"
|
6
|
+
require_relative "memo_wise/version"
|
7
7
|
|
8
8
|
# MemoWise is the wise choice for memoization in Ruby.
|
9
9
|
#
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: memo_wise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Panorama Education
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2025-02-26 00:00:00.000000000 Z
|
15
15
|
dependencies: []
|
16
16
|
description:
|
17
17
|
email:
|
@@ -44,14 +44,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.
|
47
|
+
version: 2.7.0
|
48
48
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
49
49
|
requirements:
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '0'
|
53
53
|
requirements: []
|
54
|
-
rubygems_version: 3.5.
|
54
|
+
rubygems_version: 3.5.16
|
55
55
|
signing_key:
|
56
56
|
specification_version: 4
|
57
57
|
summary: The wise choice for Ruby memoization
|