getaround_utils 0.2.31 → 0.2.32

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: 9e08a912d844188ee3d41243e5bbc27478da33d95532b04367bca2e14fd7c537
4
- data.tar.gz: ef9413d82d484d5fa5ba4f550f68d715ed4c94d87ab14434794099b980fd471d
3
+ metadata.gz: cc5afe4eb1c9c41834c986fb49c298a03d01e122d02743b33d91e3185590b4db
4
+ data.tar.gz: 4ee697023c29ba969299fc1b0177c1052481af226fbb3e2e06eebaf7c3de0441
5
5
  SHA512:
6
- metadata.gz: d41943048bc5b6d5b6afabc42794b80a8edb17fa00923d48a59c1f71421dab54aa549fd3b5d4e2f4ef23b6a9b0f025280ba99763fc2a0b8711e9af555f2d6919
7
- data.tar.gz: f5d7be28feb193ed5e5875d792381b706d493c978d816a4dedf915c65dba831a7eb711e9004c061392cefd220a45bf9d26ed911329e817ceee743b04b84965e9
6
+ metadata.gz: b83f65776ac17550135c057a4a8dc9422cdff4ca1f93a151075550d329009553c0c8fe1e740018602b51fead189912d1afa33213c3008c2f192c8bf073a7b22f
7
+ data.tar.gz: cde7ef071440c8449802f195ddd88a57339175ebcec93aafe6bae3c469f99f6cd31379f9ee1dca5a95ba41eda5dcb38a19acb89914cb0dc8e62be6c88acb1e7a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- getaround_utils (0.2.31)
4
+ getaround_utils (0.2.32)
5
5
  rack (~> 2.0)
6
6
 
7
7
  GEM
@@ -6,12 +6,12 @@ module GetaroundUtils; end
6
6
  module GetaroundUtils::Mixins; end
7
7
 
8
8
  module GetaroundUtils::Mixins::Loggable
9
- def class_name
10
- @class_name ||= is_a?(Class) ? name : self.class.name
9
+ def loggable_class_name
10
+ @loggable_class_name ||= is_a?(Class) ? name : self.class.name
11
11
  end
12
12
 
13
13
  def base_append_infos_to_loggable(payload)
14
- payload[:origin] = class_name
14
+ payload[:origin] = loggable_class_name
15
15
  return unless respond_to?(:append_infos_to_loggable)
16
16
 
17
17
  append_infos_to_loggable(payload)
@@ -38,27 +38,27 @@ module GetaroundUtils::Mixins::Loggable
38
38
 
39
39
  loggable_log(
40
40
  :info,
41
- log_message(event_name),
41
+ monitorable_log_message(event_name),
42
42
  alert_threshold: monitorable_threshold,
43
43
  **options
44
44
  )
45
45
  end
46
46
 
47
47
  def monitorable_threshold(event_name)
48
- monitorable_threshold = ENV["#{log_message(event_name)}_threshold".upcase]&.to_i
49
- if monitorable_threshold.nil? && rails_config_defined?
48
+ monitorable_threshold = ENV["#{monitorable_log_message(event_name)}_threshold".upcase]&.to_i
49
+ if monitorable_threshold.nil? && monitorable_rails_config_defined?
50
50
  monitorable_threshold = Rails.application.config.monitorable_log_thresholds&.dig(event_name.to_sym)
51
51
  end
52
52
  monitorable_threshold
53
53
  end
54
54
 
55
- def log_message(event_name)
55
+ def monitorable_log_message(event_name)
56
56
  MONITORABLE_LOG_PREFIX + event_name
57
57
  end
58
58
 
59
59
  private
60
60
 
61
- def rails_config_defined?
61
+ def monitorable_rails_config_defined?
62
62
  defined?(Rails) &&
63
63
  Rails.application.config.respond_to?(:monitorable_log_thresholds) &&
64
64
  Rails.application.config.monitorable_log_thresholds.respond_to?(:dig)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GetaroundUtils
4
- VERSION = '0.2.31'
4
+ VERSION = '0.2.32'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: getaround_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.31
4
+ version: 0.2.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Drivy
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-02-19 00:00:00.000000000 Z
12
+ date: 2024-04-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack