mem 0.2.0 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 79881023089840024f922fa73cfd349e4b4268d5f9653fafc889c7842552af6e
4
- data.tar.gz: 7b472ff4a10af6acd918d249da95126d4566f281969c4b5c4d0b67f5324b673f
3
+ metadata.gz: 12517b88fa07a5d76fd76e3871a6f9d7042cea0ae019172cd14e39d698deabec
4
+ data.tar.gz: cea58562f8eabcab1014f7b3c401ba4aa45f6e47ac0fb934ae4d98fe45168fda
5
5
  SHA512:
6
- metadata.gz: 2195bcf0d411fcbcb27de706d16ecb8305ad4cb3d3305bdccf274121383b094368408e14fe4de283866e657e9a2958a5d98ae785c41dd13cc40f5555927f424d
7
- data.tar.gz: 022e7927762eccc75c21f9e8c694785b430e31d37ce2f80ec6c3d2fbcaa4baed33210d427643e0cfa1dc747856a8b0660b1be738c3c95f57ce29266351fbeadf
6
+ metadata.gz: 5617a966b0890c574b2804171e908e669705c31922b0d938e12f0b9a9fb05d5ab76340dcac315d08ac690f9069f294c59a08aec2e7c0001cf2a7d6bd276133d0
7
+ data.tar.gz: 5b2a96288df93e35d3c58878c1a2147cde9645a0f2f50aff4c01e106c9e7641c9d003ccf5412cb09dfbc319e1a4128ca9e628b53006298899366782374c8f2b1
@@ -0,0 +1,57 @@
1
+ # This file is machine-generated by `gh actions-lock`.
2
+ # Do not edit by hand; run `gh actions-lock` to update.
3
+ # Docs: https://gh.io/actions-lockfile
4
+ version: 'v0.0.3'
5
+ workflows:
6
+ '.github/workflows/bump-request.yml':
7
+ - 'actions/checkout@v7.0.1'
8
+ - 'r7kamura/bump-request@v0.7.1'
9
+ - 'ruby/setup-ruby@v1.336.0'
10
+ '.github/workflows/ci.yml':
11
+ - 'actions/checkout@v7.0.1'
12
+ - 'ruby/setup-ruby@v1.336.0'
13
+ '.github/workflows/github-label-sync.yml':
14
+ - 'r7kamura/github-label-sync-action@v0.1.0'
15
+ '.github/workflows/release.yml': []
16
+ dependencies:
17
+ 'actions/checkout@v3':
18
+ ref: 'v3'
19
+ commit: 'sha1-a37ce9120846195fa4ece8f58b268e6043cb2f26'
20
+ owner_id: 44036562
21
+ repo_id: 197814629
22
+ 'actions/checkout@v7.0.1':
23
+ ref: 'v7.0.1'
24
+ commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
25
+ owner_id: 44036562
26
+ repo_id: 197814629
27
+ 'actions/setup-node@v3':
28
+ ref: 'v3'
29
+ commit: 'sha1-3235b876344d2a9aa001b8d1453c930bba69e610'
30
+ owner_id: 44036562
31
+ repo_id: 189476904
32
+ 'actions/setup-node@v7.1.0':
33
+ ref: 'v7.1.0'
34
+ commit: 'sha1-949feb2413d6458794dcd2491c4babbbce0c15c1'
35
+ owner_id: 44036562
36
+ repo_id: 189476904
37
+ 'r7kamura/bump-request@v0.7.1':
38
+ ref: 'v0.7.1'
39
+ commit: 'sha1-b27937188d404bc0c2fd442403e6de1d20f9b349'
40
+ owner_id: 111689
41
+ repo_id: 533135195
42
+ uses:
43
+ - 'actions/checkout@v7.0.1'
44
+ - 'actions/setup-node@v7.1.0'
45
+ 'r7kamura/github-label-sync-action@v0.1.0':
46
+ ref: 'v0.1.0'
47
+ commit: 'sha1-061649dd3b80eb5bafad0316466f72962e62c300'
48
+ owner_id: 111689
49
+ repo_id: 514711932
50
+ uses:
51
+ - 'actions/checkout@v3'
52
+ - 'actions/setup-node@v3'
53
+ 'ruby/setup-ruby@v1.336.0':
54
+ ref: 'v1.336.0'
55
+ commit: 'sha1-de492cf36cbab201753d720ce4f4e336cd688c94'
56
+ owner_id: 210414
57
+ repo_id: 231208785
@@ -12,13 +12,13 @@ jobs:
12
12
  run:
13
13
  runs-on: ubuntu-latest
14
14
  steps:
15
- - uses: actions/checkout@v4
15
+ - uses: actions/checkout@v7.0.1
16
16
  - name: Set up Ruby
17
- uses: ruby/setup-ruby@v1
17
+ uses: ruby/setup-ruby@v1.336.0
18
18
  with:
19
19
  ruby-version: 3.3
20
20
  bundler-cache: true
21
- - uses: r7kamura/bump-request@v0
21
+ - uses: r7kamura/bump-request@v0.7.1
22
22
  with:
23
23
  command: |
24
24
  sed -i -r 's/([0-9]+\.[0-9]+\.[0-9]+)/${{ inputs.version }}/' lib/mem/version.rb
@@ -14,11 +14,12 @@ jobs:
14
14
  fail-fast: false
15
15
  matrix:
16
16
  ruby:
17
- - '2.7'
18
17
  - '3.3'
18
+ - '3.4'
19
+ - '4.0'
19
20
  steps:
20
- - uses: actions/checkout@v4
21
- - uses: ruby/setup-ruby@v1
21
+ - uses: actions/checkout@v7.0.1
22
+ - uses: ruby/setup-ruby@v1.336.0
22
23
  with:
23
24
  ruby-version: ${{ matrix.ruby }}
24
25
  bundler-cache: true
@@ -12,7 +12,7 @@ jobs:
12
12
  build:
13
13
  runs-on: ubuntu-latest
14
14
  steps:
15
- - uses: r7kamura/github-label-sync-action@v0
15
+ - uses: r7kamura/github-label-sync-action@v0.1.0
16
16
  with:
17
17
  source_path: labels-keepachangelog.yml
18
18
  source_repository: r7kamura/github-label-presets
@@ -9,5 +9,3 @@ jobs:
9
9
  release:
10
10
  uses: r7kamura/workflows/.github/workflows/gem-release.yml@main
11
11
  if: github.repository_owner == 'r7kamura'
12
- secrets:
13
- rubygems-org-api-key: ${{ secrets.RUBYGEMS_ORG_API_KEY }}
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-rake
3
3
  - rubocop-rspec
4
4
 
@@ -8,12 +8,12 @@ inherit_mode:
8
8
 
9
9
  AllCops:
10
10
  NewCops: enable
11
- TargetRubyVersion: 2.7
11
+ TargetRubyVersion: 3.3
12
12
 
13
13
  Metrics:
14
14
  Enabled: false
15
15
 
16
- Naming/PredicateName:
16
+ Naming/PredicatePrefix:
17
17
  ForbiddenPrefixes:
18
18
  - have_
19
19
  - is_
data/Gemfile.lock CHANGED
@@ -1,25 +1,25 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mem (0.2.0)
4
+ mem (0.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- ast (2.4.2)
9
+ ast (2.4.3)
10
10
  diff-lcs (1.5.1)
11
- json (2.7.2)
12
- language_server-protocol (3.17.0.3)
13
- parallel (1.26.3)
14
- parser (3.3.4.2)
11
+ json (3.1.0)
12
+ language_server-protocol (3.17.0.6)
13
+ lint_roller (1.1.0)
14
+ parallel (2.3.0)
15
+ parser (3.3.13.0)
15
16
  ast (~> 2.4.1)
16
17
  racc
18
+ prism (1.9.0)
17
19
  racc (1.8.1)
18
20
  rainbow (3.1.1)
19
21
  rake (13.2.1)
20
- regexp_parser (2.9.2)
21
- rexml (3.3.6)
22
- strscan
22
+ regexp_parser (2.13.1)
23
23
  rspec (3.13.0)
24
24
  rspec-core (~> 3.13.0)
25
25
  rspec-expectations (~> 3.13.0)
@@ -33,26 +33,31 @@ GEM
33
33
  diff-lcs (>= 1.2.0, < 2.0)
34
34
  rspec-support (~> 3.13.0)
35
35
  rspec-support (3.13.1)
36
- rubocop (1.65.1)
37
- json (~> 2.3)
38
- language_server-protocol (>= 3.17.0)
39
- parallel (~> 1.10)
36
+ rubocop (1.92.2)
37
+ json (>= 2.3)
38
+ language_server-protocol (~> 3.17.0.2)
39
+ lint_roller (~> 1.1.0)
40
+ parallel (>= 1.10)
40
41
  parser (>= 3.3.0.2)
41
42
  rainbow (>= 2.2.2, < 4.0)
42
- regexp_parser (>= 2.4, < 3.0)
43
- rexml (>= 3.2.5, < 4.0)
44
- rubocop-ast (>= 1.31.1, < 2.0)
43
+ regexp_parser (>= 2.11.3, < 3.0)
44
+ rubocop-ast (>= 1.49.0, < 2.0)
45
45
  ruby-progressbar (~> 1.7)
46
- unicode-display_width (>= 2.4.0, < 3.0)
47
- rubocop-ast (1.32.1)
48
- parser (>= 3.3.1.0)
49
- rubocop-rake (0.6.0)
50
- rubocop (~> 1.0)
51
- rubocop-rspec (3.0.4)
52
- rubocop (~> 1.61)
46
+ unicode-display_width (>= 2.4.0, < 4.0)
47
+ rubocop-ast (1.50.0)
48
+ parser (>= 3.3.7.2)
49
+ prism (~> 1.7)
50
+ rubocop-rake (0.7.1)
51
+ lint_roller (~> 1.1)
52
+ rubocop (>= 1.72.1)
53
+ rubocop-rspec (3.10.2)
54
+ lint_roller (~> 1.1)
55
+ regexp_parser (>= 2.0)
56
+ rubocop (~> 1.86, >= 1.86.2)
53
57
  ruby-progressbar (1.13.0)
54
- strscan (3.1.0)
55
- unicode-display_width (2.5.0)
58
+ unicode-display_width (3.3.0)
59
+ unicode-emoji (~> 4.3)
60
+ unicode-emoji (4.3.0)
56
61
 
57
62
  PLATFORMS
58
63
  ruby
@@ -68,4 +73,4 @@ DEPENDENCIES
68
73
  rubocop-rspec
69
74
 
70
75
  BUNDLED WITH
71
- 2.4.9
76
+ 4.0.23
data/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # Mem
2
2
 
3
- [![CI](https://github.com/r7kamura/mem/actions/workflows/ci.yml/badge.svg)](https://github.com/r7kamura/mem/actions/workflows/ci.yml)
4
-
5
3
  Memoize method calls.
6
4
 
7
5
  ## Installation
data/lib/mem/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mem
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.0'
5
5
  end
data/lib/mem.rb CHANGED
@@ -30,9 +30,9 @@ module Mem
30
30
  module ClassMethods
31
31
  def memoize(method_name)
32
32
  original_visibility =
33
- if protected_instance_methods.include?(method_name)
33
+ if protected_method_defined?(method_name)
34
34
  :protected
35
- elsif private_instance_methods.include?(method_name)
35
+ elsif private_method_defined?(method_name)
36
36
  :private
37
37
  else
38
38
  :public
data/mem.gemspec CHANGED
@@ -1,9 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'English'
4
- lib = File.expand_path('lib', __dir__)
5
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
- require 'mem/version'
3
+ require_relative 'lib/mem/version'
7
4
 
8
5
  Gem::Specification.new do |spec|
9
6
  spec.name = 'mem'
@@ -14,10 +11,13 @@ Gem::Specification.new do |spec|
14
11
  spec.homepage = 'https://github.com/r7kamura/mem'
15
12
  spec.license = 'MIT'
16
13
 
17
- spec.required_ruby_version = '>= 2.7'
14
+ spec.metadata['homepage_uri'] = spec.homepage
15
+ spec.metadata['source_code_uri'] = spec.homepage
16
+ spec.metadata['changelog_uri'] = "#{spec.homepage}/releases"
17
+ spec.metadata['rubygems_mfa_required'] = 'true'
18
+
19
+ spec.required_ruby_version = '>= 3.3'
18
20
 
19
21
  spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
20
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
22
  spec.require_paths = ['lib']
22
- spec.metadata['rubygems_mfa_required'] = 'true'
23
23
  end
metadata CHANGED
@@ -1,16 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-08-23 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
- description:
14
12
  email:
15
13
  - r7kamura@gmail.com
16
14
  executables: []
@@ -18,13 +16,13 @@ extensions: []
18
16
  extra_rdoc_files: []
19
17
  files:
20
18
  - ".github/release.yml"
19
+ - ".github/workflows/actions.lock"
21
20
  - ".github/workflows/bump-request.yml"
22
21
  - ".github/workflows/ci.yml"
23
22
  - ".github/workflows/github-label-sync.yml"
24
23
  - ".github/workflows/release.yml"
25
24
  - ".gitignore"
26
25
  - ".rubocop.yml"
27
- - CHANGELOG.md
28
26
  - Gemfile
29
27
  - Gemfile.lock
30
28
  - LICENSE.txt
@@ -40,8 +38,10 @@ homepage: https://github.com/r7kamura/mem
40
38
  licenses:
41
39
  - MIT
42
40
  metadata:
41
+ homepage_uri: https://github.com/r7kamura/mem
42
+ source_code_uri: https://github.com/r7kamura/mem
43
+ changelog_uri: https://github.com/r7kamura/mem/releases
43
44
  rubygems_mfa_required: 'true'
44
- post_install_message:
45
45
  rdoc_options: []
46
46
  require_paths:
47
47
  - lib
@@ -49,15 +49,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
49
49
  requirements:
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: '2.7'
52
+ version: '3.3'
53
53
  required_rubygems_version: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - ">="
56
56
  - !ruby/object:Gem::Version
57
57
  version: '0'
58
58
  requirements: []
59
- rubygems_version: 3.3.27
60
- signing_key:
59
+ rubygems_version: 4.0.20
61
60
  specification_version: 4
62
61
  summary: Memoize method calls.
63
62
  test_files: []
data/CHANGELOG.md DELETED
@@ -1,25 +0,0 @@
1
- ## 0.1.5
2
- * Fix method visibility
3
-
4
- ## 0.1.4
5
- * Add support for removing memoization
6
-
7
- ## 0.1.3
8
- * Support memoize/core_ext only use
9
-
10
- ## 0.1.2
11
- * Add memoize/core_ext
12
-
13
- ## 0.1.1
14
- * Define setter on `.memoize`
15
-
16
- ## 0.1.0
17
- * Change interface from `extend Mem` to `include Mem`
18
- * Change stored data structure from ivar to hash table
19
- * Add some instance methods to inspect memoized table
20
-
21
- ## 0.0.2
22
- * Remove dependency on ActiveSupport
23
-
24
- ## 0.0.1
25
- * 1st release