lru_redux_store 0.1.1.alpha → 0.1.2.alpha
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/.github/dependabot.yml +8 -0
- data/.github/workflows/ruby.yml +59 -0
- data/.gitignore +2 -1
- data/.rubocop.yml +20 -14
- data/.rubocop_todo.yml +15 -0
- data/Rakefile +2 -0
- data/gemfiles/rails_7.2.gemfile +9 -0
- data/gemfiles/rails_8.0.gemfile +9 -0
- data/gemfiles/rails_8.1.gemfile +9 -0
- data/gemfiles/rails_edge.gemfile +9 -0
- data/lib/lru_redux_store/store.rb +2 -2
- data/lib/lru_redux_store/version.rb +1 -1
- data/lru_redux_store.gemspec +1 -1
- metadata +9 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ff8cd15d2352f04af4ea3cf6687995bf51cd9e1214c17a070d74badf70513ef3
|
|
4
|
+
data.tar.gz: e57041c422fd0104dc87f3df4ae9c6f39fe9c42d07b35fcbf617788dd2bd3f97
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a425e6ad9413300b93af8d43b3171ee37bbcda8d2929cfc59a6cd8c25290e1385dafb5a78b8e2802e6ec4f71c37130b01fa3ccc0ffff5d5663526d4bf7974405
|
|
7
|
+
data.tar.gz: b5e6e15bef9ed665428a72d4f1632c7cd51321cd3f2df6b53373cc523d0a79daf063efa4c36fe130f88fa0a27ab7dc9cb5bc4391feddcaf47f92dcbaca4f41bd
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
2
|
+
# They are provided by a third-party and are governed by
|
|
3
|
+
# separate terms of service, privacy policy, and support
|
|
4
|
+
# documentation.
|
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
|
7
|
+
|
|
8
|
+
name: Ruby
|
|
9
|
+
|
|
10
|
+
on:
|
|
11
|
+
pull_request:
|
|
12
|
+
branches: [main]
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
test:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
strategy:
|
|
18
|
+
matrix:
|
|
19
|
+
ruby: ["3.3", "3.4", "4.0"]
|
|
20
|
+
rails: ["rails-7.2", "rails-8.0", "rails-8.1", "rails-edge"]
|
|
21
|
+
env:
|
|
22
|
+
MATRIX_RUBY: ${{ matrix.ruby }}
|
|
23
|
+
MATRIX_RAILS: ${{ matrix.rails }}
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v7
|
|
26
|
+
- uses: ruby/setup-ruby@v1
|
|
27
|
+
with:
|
|
28
|
+
ruby-version: ${{ matrix.ruby }}
|
|
29
|
+
bundler-cache: true
|
|
30
|
+
- name: Bundle install
|
|
31
|
+
run: |
|
|
32
|
+
bundle install --jobs 4 --retry 3
|
|
33
|
+
- name: Appraisal install
|
|
34
|
+
run: |
|
|
35
|
+
bundle exec appraisal "$MATRIX_RAILS" bundle install
|
|
36
|
+
- name: Run tests
|
|
37
|
+
run: |
|
|
38
|
+
bundle exec appraisal "$MATRIX_RAILS" rake spec
|
|
39
|
+
tests:
|
|
40
|
+
needs: test
|
|
41
|
+
if: ${{ always() }}
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
steps:
|
|
44
|
+
- name: Check matrix status
|
|
45
|
+
if: ${{ needs.test.result != 'success' }}
|
|
46
|
+
run: exit 1
|
|
47
|
+
lint:
|
|
48
|
+
runs-on: ubuntu-latest
|
|
49
|
+
steps:
|
|
50
|
+
- uses: actions/checkout@v7
|
|
51
|
+
- uses: ruby/setup-ruby@v1
|
|
52
|
+
with:
|
|
53
|
+
ruby-version: "4.0" # Not needed with a .ruby-version file
|
|
54
|
+
bundler-cache: true
|
|
55
|
+
- name: Bundle install
|
|
56
|
+
run: |
|
|
57
|
+
bundle install --jobs 4 --retry 3
|
|
58
|
+
- name: Rubocop
|
|
59
|
+
run: bundle exec rubocop --format github
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
|
@@ -10,28 +10,34 @@ AllCops:
|
|
|
10
10
|
NewCops: enable
|
|
11
11
|
TargetRubyVersion: 3.3
|
|
12
12
|
SuggestExtensions: false
|
|
13
|
-
Exclude:
|
|
14
|
-
- bench/**/*
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
Gemspec/DevelopmentDependencies:
|
|
17
15
|
Enabled: false
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
Layout/LineLength:
|
|
20
18
|
Enabled: false
|
|
21
19
|
|
|
22
|
-
# One class implements the entire cache store API surface.
|
|
23
20
|
Metrics/ClassLength:
|
|
24
|
-
|
|
21
|
+
Enabled: false
|
|
25
22
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
Metrics/AbcSize:
|
|
24
|
+
Enabled: false
|
|
25
|
+
|
|
26
|
+
RSpec/ExampleLength:
|
|
27
|
+
Enabled: false
|
|
28
|
+
|
|
29
|
+
Metrics/MethodLength:
|
|
30
|
+
Enabled: false
|
|
31
|
+
|
|
32
|
+
Style/Documentation:
|
|
29
33
|
Enabled: false
|
|
30
34
|
|
|
31
|
-
# ActiveSupport::Cache::Store#fetch takes options as its second positional
|
|
32
|
-
# argument, not a default value, so the Hash#fetch rewrite does not apply.
|
|
33
35
|
Style/RedundantFetchBlock:
|
|
34
|
-
Exclude:
|
|
35
|
-
- spec/**/*_spec.rb
|
|
36
|
-
Layout/LineLength:
|
|
37
36
|
Enabled: false
|
|
37
|
+
|
|
38
|
+
Rails/RakeEnvironment:
|
|
39
|
+
Enabled: false
|
|
40
|
+
|
|
41
|
+
Rails/TimeZone:
|
|
42
|
+
Exclude:
|
|
43
|
+
- spec/lru_redux_store/store_spec.rb
|
data/.rubocop_todo.yml
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# This configuration was generated by
|
|
2
|
+
# `rubocop --auto-gen-config`
|
|
3
|
+
# on 2026-07-25 23:16:59 UTC using RuboCop version 1.88.2.
|
|
4
|
+
# The point is for the user to remove these configuration records
|
|
5
|
+
# one by one as the offenses are removed from the code base.
|
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
|
8
|
+
|
|
9
|
+
# Offense count: 32
|
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
11
|
+
# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, Mode, AllowedMethods, AllowedPatterns.
|
|
12
|
+
# SupportedStyles: annotated, template, unannotated
|
|
13
|
+
# AllowedMethods: redirect
|
|
14
|
+
Style/FormatStringToken:
|
|
15
|
+
EnforcedStyle: unannotated
|
data/Rakefile
CHANGED
|
@@ -63,7 +63,7 @@ module LruReduxStore
|
|
|
63
63
|
|
|
64
64
|
# Preemptively iterates through all stored keys and removes the ones which have expired.
|
|
65
65
|
def cleanup(_options = nil)
|
|
66
|
-
|
|
66
|
+
instrument(:cleanup, size: @data.count) do
|
|
67
67
|
synchronize { @data.expire }
|
|
68
68
|
end
|
|
69
69
|
end
|
|
@@ -163,7 +163,7 @@ module LruReduxStore
|
|
|
163
163
|
|
|
164
164
|
# Modifies the amount of an integer value that is stored in the cache.
|
|
165
165
|
# If the key is not found it is created and set to +amount+.
|
|
166
|
-
def modify_value(name, amount, **options)
|
|
166
|
+
def modify_value(name, amount, **options)
|
|
167
167
|
options = merged_options options
|
|
168
168
|
key = normalize_key name, options
|
|
169
169
|
version = normalize_version name, options
|
data/lru_redux_store.gemspec
CHANGED
|
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
|
|
|
38
38
|
spec.add_development_dependency 'rspec-rails', '~> 8.0.2'
|
|
39
39
|
spec.add_development_dependency 'rubocop', '~> 1.88.2'
|
|
40
40
|
spec.add_development_dependency 'rubocop-performance', '~> 1.26.0'
|
|
41
|
-
spec.add_development_dependency 'rubocop-rails', '~> 2.
|
|
41
|
+
spec.add_development_dependency 'rubocop-rails', '~> 2.36.0'
|
|
42
42
|
spec.add_development_dependency 'rubocop-rspec', '~> 3.10.2'
|
|
43
43
|
spec.add_dependency 'activesupport', '>= 7.2.0'
|
|
44
44
|
spec.add_dependency 'sin_lru_redux', '>= 2.5.2'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lru_redux_store
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2.alpha
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- jonathan schatz
|
|
@@ -141,14 +141,14 @@ dependencies:
|
|
|
141
141
|
requirements:
|
|
142
142
|
- - "~>"
|
|
143
143
|
- !ruby/object:Gem::Version
|
|
144
|
-
version: 2.
|
|
144
|
+
version: 2.36.0
|
|
145
145
|
type: :development
|
|
146
146
|
prerelease: false
|
|
147
147
|
version_requirements: !ruby/object:Gem::Requirement
|
|
148
148
|
requirements:
|
|
149
149
|
- - "~>"
|
|
150
150
|
- !ruby/object:Gem::Version
|
|
151
|
-
version: 2.
|
|
151
|
+
version: 2.36.0
|
|
152
152
|
- !ruby/object:Gem::Dependency
|
|
153
153
|
name: rubocop-rspec
|
|
154
154
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -215,6 +215,8 @@ executables: []
|
|
|
215
215
|
extensions: []
|
|
216
216
|
extra_rdoc_files: []
|
|
217
217
|
files:
|
|
218
|
+
- ".github/dependabot.yml"
|
|
219
|
+
- ".github/workflows/ruby.yml"
|
|
218
220
|
- ".gitignore"
|
|
219
221
|
- ".rspec"
|
|
220
222
|
- ".rubocop.yml"
|
|
@@ -232,6 +234,10 @@ files:
|
|
|
232
234
|
- bench/bench_ttl.rb
|
|
233
235
|
- bin/console
|
|
234
236
|
- bin/setup
|
|
237
|
+
- gemfiles/rails_7.2.gemfile
|
|
238
|
+
- gemfiles/rails_8.0.gemfile
|
|
239
|
+
- gemfiles/rails_8.1.gemfile
|
|
240
|
+
- gemfiles/rails_edge.gemfile
|
|
235
241
|
- lib/active_support/cache/lru_redux_store.rb
|
|
236
242
|
- lib/lru_redux_store.rb
|
|
237
243
|
- lib/lru_redux_store/dup_coder.rb
|