lite-memoize 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8566d89da1a0587757247128cad2d44710a0b5443f38096aa86adb1c3831ca2
4
- data.tar.gz: 7ba2066061818174366939dfc8f1ccd9852f7a4a47cf59222685ed0d304b65ee
3
+ metadata.gz: f1bed3353173a17cfd361b54629f1cd4a4174f95ad5e757c9c71a058a61355c9
4
+ data.tar.gz: 0a7a50e56a3fb2a4094b0bd3383a68e5f121ffaf3717cf78778a264dd779bdac
5
5
  SHA512:
6
- metadata.gz: 87ad520b87e2bbb2b14f2eef90da0ac78b229bfb9d06b458864be3afb80a0991d54323e46bdbec2d55a22961932e82182f8cde1df28ba8bbba0a6be3b4be503b
7
- data.tar.gz: c6e0e36cbcab478865a34d2fb8ae2bae0ccabe9a012270370e46ed58ec2bd1e50163bd196753555ba06497b0099581acd63eda617368f5d09eed3cd45e960405
6
+ metadata.gz: 37129e4677527b7c111da8e628bc7ff4fc12b52b3ace6e5beb9bcf8c44239969ea65dc3218e1e50138887702e78991f0b1efb83655c405074367dff30aeeeb44
7
+ data.tar.gz: 5bd93062875c442c8a84110c574cc068e9970ebd4eb2619e085df34b706c86a1161ed94e479af76938e43b2c18e2ef1908b9d741529c7994896456f9405f8663
data/.rubocop.yml CHANGED
@@ -2,11 +2,14 @@ require:
2
2
  - rubocop-performance
3
3
  - rubocop-rspec
4
4
  AllCops:
5
- TargetRubyVersion: 2.6
5
+ TargetRubyVersion: 2.7
6
+ NewCops: enable
6
7
  DisplayCopNames: true
7
8
  DisplayStyleGuide: true
8
- LineLength:
9
- Max: 100
9
+ Gemspec/RequiredRubyVersion:
10
+ Enabled: false
11
+ Layout/EmptyLinesAroundAttributeAccessor:
12
+ Enabled: true
10
13
  Layout/EmptyLinesAroundBlockBody:
11
14
  Exclude:
12
15
  - 'spec/**/**/*'
@@ -14,6 +17,14 @@ Layout/EmptyLinesAroundClassBody:
14
17
  EnforcedStyle: empty_lines_except_namespace
15
18
  Layout/EmptyLinesAroundModuleBody:
16
19
  EnforcedStyle: empty_lines_except_namespace
20
+ Layout/LineLength:
21
+ Max: 100
22
+ Layout/SpaceAroundMethodCallOperator:
23
+ Enabled: true
24
+ Lint/RaiseException:
25
+ Enabled: true
26
+ Lint/StructNewOverride:
27
+ Enabled: true
17
28
  Metrics/BlockLength:
18
29
  Exclude:
19
30
  - 'spec/**/**/*'
@@ -24,11 +35,13 @@ Naming/FileName:
24
35
  Enabled: false
25
36
  Naming/MemoizedInstanceVariableName:
26
37
  Enabled: false
27
- Naming/UncommunicativeMethodParamName:
38
+ Naming/MethodParameterName:
28
39
  Enabled: false
29
40
  Style/AccessModifierDeclarations:
30
41
  Enabled: false
31
42
  Style/Documentation:
32
43
  Enabled: false
44
+ Style/DocumentDynamicEvalDefinition:
45
+ Enabled: false
33
46
  Style/ExpandPathArguments:
34
47
  Enabled: false
data/.travis.yml CHANGED
@@ -4,6 +4,7 @@ cache: bundler
4
4
  rvm:
5
5
  - 2.5
6
6
  - 2.6
7
+ - 2.7
7
8
  - ruby-head
8
9
  matrix:
9
10
  fast_finish: true
data/CHANGELOG.md CHANGED
@@ -6,8 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.4] - 2021-05-07
10
+ ### Changed
11
+ - Performance bind call
12
+
9
13
  ## [1.0.3] - 2019-08-13
10
14
  ### Added
15
+ - Added ruby 2.7 support
11
16
  - Added clear alias from clear_cache on Alias
12
17
 
13
18
  ## [1.0.2] - 2019-08-07
data/Gemfile.lock CHANGED
@@ -1,52 +1,59 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-memoize (1.0.3)
4
+ lite-memoize (1.0.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- ast (2.4.0)
9
+ ast (2.4.2)
10
10
  colorize (0.8.1)
11
- diff-lcs (1.3)
12
- fasterer (0.6.0)
11
+ diff-lcs (1.4.4)
12
+ fasterer (0.9.0)
13
13
  colorize (~> 0.7)
14
- ruby_parser (>= 3.13.0)
15
- jaro_winkler (1.5.3)
16
- parallel (1.17.0)
17
- parser (2.6.3.0)
18
- ast (~> 2.4.0)
14
+ ruby_parser (>= 3.14.1)
15
+ parallel (1.20.1)
16
+ parser (3.0.1.1)
17
+ ast (~> 2.4.1)
19
18
  rainbow (3.0.0)
20
- rake (12.3.3)
21
- rspec (3.8.0)
22
- rspec-core (~> 3.8.0)
23
- rspec-expectations (~> 3.8.0)
24
- rspec-mocks (~> 3.8.0)
25
- rspec-core (3.8.2)
26
- rspec-support (~> 3.8.0)
27
- rspec-expectations (3.8.4)
19
+ rake (13.0.3)
20
+ regexp_parser (2.1.1)
21
+ rexml (3.2.5)
22
+ rspec (3.10.0)
23
+ rspec-core (~> 3.10.0)
24
+ rspec-expectations (~> 3.10.0)
25
+ rspec-mocks (~> 3.10.0)
26
+ rspec-core (3.10.1)
27
+ rspec-support (~> 3.10.0)
28
+ rspec-expectations (3.10.1)
28
29
  diff-lcs (>= 1.2.0, < 2.0)
29
- rspec-support (~> 3.8.0)
30
- rspec-mocks (3.8.1)
30
+ rspec-support (~> 3.10.0)
31
+ rspec-mocks (3.10.2)
31
32
  diff-lcs (>= 1.2.0, < 2.0)
32
- rspec-support (~> 3.8.0)
33
- rspec-support (3.8.2)
34
- rubocop (0.74.0)
35
- jaro_winkler (~> 1.5.1)
33
+ rspec-support (~> 3.10.0)
34
+ rspec-support (3.10.2)
35
+ rubocop (1.14.0)
36
36
  parallel (~> 1.10)
37
- parser (>= 2.6)
37
+ parser (>= 3.0.0.0)
38
38
  rainbow (>= 2.2.2, < 4.0)
39
+ regexp_parser (>= 1.8, < 3.0)
40
+ rexml
41
+ rubocop-ast (>= 1.5.0, < 2.0)
39
42
  ruby-progressbar (~> 1.7)
40
- unicode-display_width (>= 1.4.0, < 1.7)
41
- rubocop-performance (1.4.1)
42
- rubocop (>= 0.71.0)
43
- rubocop-rspec (1.35.0)
44
- rubocop (>= 0.60.0)
45
- ruby-progressbar (1.10.1)
46
- ruby_parser (3.13.1)
43
+ unicode-display_width (>= 1.4.0, < 3.0)
44
+ rubocop-ast (1.5.0)
45
+ parser (>= 3.0.1.1)
46
+ rubocop-performance (1.11.3)
47
+ rubocop (>= 1.7.0, < 2.0)
48
+ rubocop-ast (>= 0.4.0)
49
+ rubocop-rspec (2.3.0)
50
+ rubocop (~> 1.0)
51
+ rubocop-ast (>= 1.1.0)
52
+ ruby-progressbar (1.11.0)
53
+ ruby_parser (3.15.1)
47
54
  sexp_processor (~> 4.9)
48
- sexp_processor (4.12.1)
49
- unicode-display_width (1.6.0)
55
+ sexp_processor (4.15.2)
56
+ unicode-display_width (2.0.0)
50
57
 
51
58
  PLATFORMS
52
59
  ruby
@@ -62,4 +69,4 @@ DEPENDENCIES
62
69
  rubocop-rspec
63
70
 
64
71
  BUNDLED WITH
65
- 2.0.1
72
+ 2.2.17
@@ -41,7 +41,6 @@ module Lite
41
41
 
42
42
  class << self
43
43
 
44
- # rubocop:disable Lint/NestedMethodDefinition
45
44
  def extended(extender)
46
45
  Lite::Memoize::Alias.memoist_eval(extender) do
47
46
  return if singleton_class.method_defined?(:memoized_methods)
@@ -51,7 +50,6 @@ module Lite
51
50
  end
52
51
  end
53
52
  end
54
- # rubocop:enable Lint/NestedMethodDefinition
55
53
 
56
54
  def memoized_ivar_for(method_name, as = nil)
57
55
  "@#{memoized_prefix(as)}_#{escape_punctuation(method_name)}"
@@ -26,11 +26,11 @@ module Lite
26
26
  store.delete(key)
27
27
  end
28
28
 
29
- # :nocov:
29
+ # rubocop:disable Style/ExplicitBlockArgument
30
30
  def each
31
31
  store.each { |key, val| yield(key, val) }
32
32
  end
33
- # :nocov:
33
+ # rubocop:enable Style/ExplicitBlockArgument
34
34
 
35
35
  def empty?
36
36
  store.empty?
@@ -12,7 +12,7 @@ module Lite
12
12
  define_method(method_name) do |*args|
13
13
  key = self.class.caller_key(args, as: as || method_name)
14
14
 
15
- self.class.store[key] ||= inner_method.bind(self).call(*args)
15
+ self.class.store[key] ||= inner_method.bind_call(self, *args)
16
16
  end
17
17
  end
18
18
 
@@ -3,7 +3,7 @@
3
3
  module Lite
4
4
  module Memoize
5
5
 
6
- VERSION ||= '1.0.3'
6
+ VERSION = '1.0.4'
7
7
 
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lite-memoize
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-13 00:00:00.000000000 Z
11
+ date: 2021-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,7 +108,7 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
- description:
111
+ description:
112
112
  email:
113
113
  - j.gomez@drexed.com
114
114
  executables: []
@@ -151,7 +151,7 @@ homepage: http://drexed.github.io/lite-memoize
151
151
  licenses:
152
152
  - MIT
153
153
  metadata: {}
154
- post_install_message:
154
+ post_install_message:
155
155
  rdoc_options: []
156
156
  require_paths:
157
157
  - lib
@@ -166,8 +166,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  - !ruby/object:Gem::Version
167
167
  version: '0'
168
168
  requirements: []
169
- rubygems_version: 3.0.4
170
- signing_key:
169
+ rubygems_version: 3.2.17
170
+ signing_key:
171
171
  specification_version: 4
172
172
  summary: Cache and memoization helpers for ruby Ruby classes
173
173
  test_files: []