rails-profiler 0.44.8 → 0.44.9

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: ed5e423c1e5d9fd703b90dc6d43cd1887fddf2007d0a1f9f2039de3a8328194c
4
- data.tar.gz: 86d8e6868f483614ae21769ba5c866c6d3504d4d8752435e0b1141db7a86e92f
3
+ metadata.gz: c62bf2c6ff4ba9a085f5a191537053f815ba21f19a45fd88a9e59d664133d2bf
4
+ data.tar.gz: 1a542ee05b89e4c6fe1e3951928fc033eec423c509ecd8175e4f98c53f7577f5
5
5
  SHA512:
6
- metadata.gz: 9455e6d7f08af62312c39aaf2eab361c9a9c9655af81bd1e8034365f491216fb2a6bb1881d294ea946aa432925aac4760e784aeb9b5054b1e7c7675840c445d1
7
- data.tar.gz: 9d2acb78c6182bc6595203e93e88c1c4331aeab0d0fa8e52753ab696ef229a94a3f030b03928bda477c75ceb8514da6e6b14b12d977092d8394a50d501722b74
6
+ metadata.gz: 85ce2483f4621c4483adb4f285828900bc54f6514a1f7ba1238e013d437c9c726b21e3f695c65c679db5110ed6754f05757cd0d37c12509f7cb823d85c270503
7
+ data.tar.gz: 617d75b713d39f96d4ec7729e51c0c7270e13311978b3922d2d40974828e08da5c8537ef46ccf67e40d23a5cfc27b7f00b051d6f8c43747a5f99c9db4a641e82
data/CHANGELOG.md CHANGED
@@ -19,6 +19,14 @@ every commit of every tag interval is accounted for one way or the other.
19
19
 
20
20
  ## [Unreleased]
21
21
 
22
+ ## [0.44.9] - 2026-10-22
23
+
24
+ <!-- stamped -->
25
+
26
+ ### Fixed
27
+
28
+ - **File storage:** profile paths containing non-ASCII characters (e.g., `/café`) are now correctly saved and loaded even when the system's default encoding is not UTF-8 (e.g., `LANG=C`).
29
+
22
30
  ## [0.44.8] - 2026-10-22
23
31
 
24
32
  <!-- stamped -->
@@ -97,7 +97,7 @@ module Profiler
97
97
  file_path = profile_file_path(token)
98
98
  return nil unless File.exist?(file_path)
99
99
 
100
- json_data = File.read(file_path)
100
+ json_data = File.read(file_path, encoding: Encoding::UTF_8)
101
101
  Models::Profile.from_json(json_data)
102
102
  rescue StandardError => e
103
103
  Profiler.log_error("FileStore: could not load profile #{token}", e)
@@ -240,7 +240,7 @@ module Profiler
240
240
 
241
241
  record = JSON.parse(line)
242
242
  record.is_a?(Hash) ? record : nil
243
- rescue JSON::ParserError
243
+ rescue JSON::ParserError, EncodingError
244
244
  nil
245
245
  end
246
246
 
@@ -80,7 +80,7 @@ module Profiler
80
80
 
81
81
  # Opens path for reading, refusing a symbolic link while the modes are restricted.
82
82
  def open_for_reading(path, &block)
83
- File.open(path.to_s, File::RDONLY | nofollow, &block)
83
+ File.open(path.to_s, File::RDONLY | nofollow, encoding: Encoding::UTF_8, &block)
84
84
  end
85
85
 
86
86
  # Opens path for reading and writing, creating it 0600 when missing.
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Profiler
4
- VERSION = "0.44.8"
4
+ VERSION = "0.44.9"
5
5
 
6
6
  GEM_ROOT = File.expand_path("../..", __dir__)
7
7
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-profiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.44.8
4
+ version: 0.44.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sébastien Duplessy