cacheflow 0.3.1 → 0.3.3

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: '0860f01c1abf80c54762bfdf0c80c191fa2ea956144958ffe4352a6fe0ad523c'
4
- data.tar.gz: 519476b589957dc270569af29f7e57334f9ac7dff2cfa8d54771f531901a0d88
3
+ metadata.gz: eba34da0dc206375466ba45b0c4b0f98a41c60d392834c1284922d8164e440c4
4
+ data.tar.gz: 8f79e396464f469df15fe53914d3c6217d94850215bc4cf425e5cc17e22e7b4b
5
5
  SHA512:
6
- metadata.gz: 2639a41bda572120361f2f8f13e5924478aa1a410931b2256679bc97e37869fb7439c57ab48ab577f8a0f82a1fc2c705df7d198b66d8ec7e19ce8ed9b081facd
7
- data.tar.gz: 368024e42b9d7a838847ba671f9ce91079bbd0ea0f879b70702dd00c2cf84df61f0ef30b32c67c54a86d397a008f508f5373e39a16360c87471f2cfb75d6fcd3
6
+ metadata.gz: a6f11ee4ba48f29577ed35f19961af050a67294e546339d1d7281fc06ee8c82898eb7d176ac6f6a567f0307320d1fef508e3f0144c20aa8235b45fbcc2b22d29
7
+ data.tar.gz: 658f979612ec31f88ee7922d6600a1db863809515dfd180c10399748770056ac9e29c8d0cefe795f375927f85680dfb2b814ee8815cecbb983e04228a84d93e8
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.3.3 (2024-02-27)
2
+
3
+ - Fixed error with binary data
4
+
5
+ ## 0.3.2 (2023-12-07)
6
+
7
+ - Fixed deprecation warning with Active Support 7.1
8
+
1
9
  ## 0.3.1 (2023-02-15)
2
10
 
3
11
  - Fixed error with `redis-client`
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2017-2023 Andrew Kane
1
+ Copyright (c) 2017-2024 Andrew Kane
2
2
 
3
3
  MIT License
4
4
 
@@ -17,7 +17,7 @@ module Cacheflow
17
17
  return if !logger.debug? || Cacheflow.silenced?
18
18
 
19
19
  name = "%s (%.2fms)" % ["Memcached", event.duration]
20
- debug " #{color(name, BLUE, true)} #{event.payload[:op].to_s.upcase} #{event.payload[:args].join(" ")}"
20
+ debug " #{color(name, BLUE, bold: true)} #{event.payload[:op].to_s.upcase} #{Cacheflow.args(event.payload[:args])}"
21
21
  end
22
22
  end
23
23
  end
@@ -41,10 +41,10 @@ module Cacheflow
41
41
 
42
42
  commands = []
43
43
  event.payload[:commands].map do |op, *args|
44
- commands << "#{op.to_s.upcase} #{args.join(" ")}".strip
44
+ commands << "#{op.to_s.upcase} #{Cacheflow.args(args)}".strip
45
45
  end
46
46
 
47
- debug " #{color(name, RED, true)} #{commands.join(" >> ")}"
47
+ debug " #{color(name, RED, bold: true)} #{commands.join(" >> ")}"
48
48
  end
49
49
  end
50
50
  end
@@ -1,3 +1,3 @@
1
1
  module Cacheflow
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.3"
3
3
  end
data/lib/cacheflow.rb CHANGED
@@ -27,6 +27,11 @@ module Cacheflow
27
27
  def self.silence_sidekiq!
28
28
  require_relative "cacheflow/sidekiq"
29
29
  end
30
+
31
+ # private
32
+ def self.args(args)
33
+ args.map { |v| v.to_s.dup.force_encoding(Encoding::UTF_8).valid_encoding? ? v : "<binary-data>" }.join(" ")
34
+ end
30
35
  end
31
36
 
32
37
  if defined?(Rails)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cacheflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-15 00:00:00.000000000 Z
11
+ date: 2024-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  - !ruby/object:Gem::Version
59
59
  version: '0'
60
60
  requirements: []
61
- rubygems_version: 3.4.6
61
+ rubygems_version: 3.5.3
62
62
  signing_key:
63
63
  specification_version: 4
64
64
  summary: Colorized logging for Memcached and Redis