short_circu_it 0.25.6 → 0.25.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/short_circu_it.rb +8 -3
- data/lib/short_circu_it/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91e522f9a3f392910689672c9c8983e9d75326b1d45fef23216b54ae15ba34c0
|
4
|
+
data.tar.gz: b416a2d5f46fb1a63f59136118ae3b1f16c2235cd647cada683f14f5635e5071
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2c57b6c7fd6089b04f922dadc4a72c5cdd18614d5bb9c56dac17fb38d418422c2356b5b19980a9ba280956450e4993571016f3bbba8e77c6910315227ea6b06
|
7
|
+
data.tar.gz: 0f8a54f23d75cda9796964bcdd40b9e3b1223a422e92523ddc595e7d91387746d05ed06ff5520764020a0da61c6927a4aa243765cfc8b7f8a2c499a0f325bfd8
|
data/lib/short_circu_it.rb
CHANGED
@@ -79,9 +79,14 @@ module ShortCircuIt
|
|
79
79
|
around_method(
|
80
80
|
method_name,
|
81
81
|
prevent_double_wrapping_for: ShortCircuIt,
|
82
|
-
) do |*args|
|
83
|
-
memoization_store.memoize(method_name, args.hash) do
|
84
|
-
super(*args)
|
82
|
+
) do |*args, **opts|
|
83
|
+
memoization_store.memoize(method_name, (args + [ opts ]).hash) do
|
84
|
+
# TODO: replace with `super(*args, **opts)` when <= 2.6 support is dropped
|
85
|
+
if RUBY_VERSION < "2.7" && opts.blank?
|
86
|
+
super(*args)
|
87
|
+
else
|
88
|
+
super(*args, **opts)
|
89
|
+
end
|
85
90
|
end
|
86
91
|
end
|
87
92
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: short_circu_it
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.25.
|
4
|
+
version: 0.25.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Allen Rettberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.25.
|
33
|
+
version: 0.25.7
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.25.
|
40
|
+
version: 0.25.7
|
41
41
|
description: Memoize methods safely with parameter and dependency observation
|
42
42
|
email:
|
43
43
|
- allen.rettberg@freshly.com
|
@@ -59,7 +59,7 @@ metadata:
|
|
59
59
|
homepage_uri: https://github.com/Freshly/spicerack/tree/master/short_circu_it
|
60
60
|
source_code_uri: https://github.com/Freshly/spicerack/tree/master/short_circu_it
|
61
61
|
changelog_uri: https://github.com/Freshly/spicerack/blob/master/short_circu_it/CHANGELOG.md
|
62
|
-
documentation_uri: https://www.rubydoc.info/gems/short_circu_it/0.25.
|
62
|
+
documentation_uri: https://www.rubydoc.info/gems/short_circu_it/0.25.7
|
63
63
|
post_install_message:
|
64
64
|
rdoc_options: []
|
65
65
|
require_paths:
|