cacheflow 0.3.3 → 0.5.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: eba34da0dc206375466ba45b0c4b0f98a41c60d392834c1284922d8164e440c4
4
- data.tar.gz: 8f79e396464f469df15fe53914d3c6217d94850215bc4cf425e5cc17e22e7b4b
3
+ metadata.gz: 9e6ffed7d088f3de6a86a75e4ee7e5faf48d51c27fe490b935379f019af402a5
4
+ data.tar.gz: 5e9401eab9c1946eff3a97939e35143635a0c5ab919e3df37e2e4eea3e6991fa
5
5
  SHA512:
6
- metadata.gz: a6f11ee4ba48f29577ed35f19961af050a67294e546339d1d7281fc06ee8c82898eb7d176ac6f6a567f0307320d1fef508e3f0144c20aa8235b45fbcc2b22d29
7
- data.tar.gz: 658f979612ec31f88ee7922d6600a1db863809515dfd180c10399748770056ac9e29c8d0cefe795f375927f85680dfb2b814ee8815cecbb983e04228a84d93e8
6
+ metadata.gz: 13452dc5badcff289a394f6eeee400a5b560475d1504c89ddaeaa60459eca2c78823bf5cfdf425395d74602c824e3901b707a0e4dfbc8745ea8d17a776777371
7
+ data.tar.gz: 5ac6596190d7e9d41e0db4af9931d7a16439cac9b274ffa7747bde6f9687f6add0b36d9c35dd26a5dc8e20ab7949fdd899d37cb060d3fe16d3e2b60e42b926b3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 0.5.0 (2025-05-05)
2
+
3
+ - Dropped support for Ruby < 3.2 and Active Support < 7.1
4
+
5
+ ## 0.4.0 (2024-10-22)
6
+
7
+ - Improved binary data detection
8
+ - Dropped support for Ruby < 3.1 and Active Support < 7
9
+
1
10
  ## 0.3.3 (2024-02-27)
2
11
 
3
12
  - Fixed error with binary data
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2017-2024 Andrew Kane
1
+ Copyright (c) 2017-2025 Andrew Kane
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Cacheflow
2
2
 
3
- Colorized logging for Memcached and Redis
3
+ Colorized logging for Memcached, Redis, and Valkey
4
4
 
5
5
  Works with the Rails cache, as well as [Dalli](https://github.com/petergoldstein/dalli) and [Redis](https://github.com/redis/redis-rb) clients directly
6
6
 
7
- [![Build Status](https://github.com/ankane/cacheflow/workflows/build/badge.svg?branch=master)](https://github.com/ankane/cacheflow/actions)
7
+ [![Build Status](https://github.com/ankane/cacheflow/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/cacheflow/actions)
8
8
 
9
9
  ## Installation
10
10
 
@@ -14,7 +14,7 @@ Add this line to your application’s Gemfile:
14
14
  gem "cacheflow", group: :development
15
15
  ```
16
16
 
17
- When your log level is set to `DEBUG` (Rails default in development), all commands to Memcached and Redis are logged.
17
+ When your log level is set to `DEBUG` (Rails default in development), all commands to Memcached, Redis, and Valkey are logged.
18
18
 
19
19
  ## Features
20
20
 
@@ -34,7 +34,7 @@ Cacheflow.silence_sidekiq!
34
34
 
35
35
  ## Data Protection
36
36
 
37
- If you use Cacheflow in an environment with [personal data](https://en.wikipedia.org/wiki/Personally_identifiable_information) and store that data in Memcached or Redis, it can end up in your app logs. To avoid this, silence logging for those calls.
37
+ If you use Cacheflow in an environment with [personal data](https://en.wikipedia.org/wiki/Personally_identifiable_information) and store that data in Memcached, Redis, or Valkey, it can end up in your app logs. To avoid this, silence logging for those calls.
38
38
 
39
39
  ## History
40
40
 
@@ -1,3 +1,3 @@
1
1
  module Cacheflow
2
- VERSION = "0.3.3"
2
+ VERSION = "0.5.0"
3
3
  end
data/lib/cacheflow.rb CHANGED
@@ -30,7 +30,14 @@ module Cacheflow
30
30
 
31
31
  # private
32
32
  def self.args(args)
33
- args.map { |v| v.to_s.dup.force_encoding(Encoding::UTF_8).valid_encoding? ? v : "<binary-data>" }.join(" ")
33
+ args.map { |v| binary?(v) ? "<binary-data>" : v }.join(" ")
34
+ end
35
+
36
+ # private
37
+ def self.binary?(v)
38
+ v = v.to_s
39
+ # string encoding creates false positives, so try to determine based on value
40
+ v.include?("\x00") || !v.dup.force_encoding(Encoding::UTF_8).valid_encoding?
34
41
  end
35
42
  end
36
43
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cacheflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-02-27 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activesupport
@@ -16,15 +15,14 @@ dependencies:
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: '6'
18
+ version: '7.1'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - ">="
25
24
  - !ruby/object:Gem::Version
26
- version: '6'
27
- description:
25
+ version: '7.1'
28
26
  email: andrew@ankane.org
29
27
  executables: []
30
28
  extensions: []
@@ -43,7 +41,6 @@ homepage: https://github.com/ankane/cacheflow
43
41
  licenses:
44
42
  - MIT
45
43
  metadata: {}
46
- post_install_message:
47
44
  rdoc_options: []
48
45
  require_paths:
49
46
  - lib
@@ -51,15 +48,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
51
48
  requirements:
52
49
  - - ">="
53
50
  - !ruby/object:Gem::Version
54
- version: '2.7'
51
+ version: '3.2'
55
52
  required_rubygems_version: !ruby/object:Gem::Requirement
56
53
  requirements:
57
54
  - - ">="
58
55
  - !ruby/object:Gem::Version
59
56
  version: '0'
60
57
  requirements: []
61
- rubygems_version: 3.5.3
62
- signing_key:
58
+ rubygems_version: 3.6.7
63
59
  specification_version: 4
64
- summary: Colorized logging for Memcached and Redis
60
+ summary: Colorized logging for Memcached, Redis, and Valkey
65
61
  test_files: []