judoscale-ruby 1.8.2 → 1.8.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: 45e95bdaed7f0dae8a1cd613b3e8579a4666d808d12f27de4270055651991332
4
- data.tar.gz: 5062cd2bbc781bdd695e817c3b6ebbe165d4e9cab805c8efddc01cef7cadf39d
3
+ metadata.gz: b7891f9296093834a1c5d414f0a30010dd20aa8183250d9e7431ae6d821051c2
4
+ data.tar.gz: 71c7009f8e56e243d111164fe1897113d7afea21afb327f2a0b079143d404115
5
5
  SHA512:
6
- metadata.gz: 38e6c73e3758d97e20c453fb45cc6e098c1a50afec219b52b5bfaad297c2f11e8111ce96836235e290b4a4d7a0e8ee5a471b5c157c0fe0356b817e14a7c14412
7
- data.tar.gz: b5b700a87bcf636809db3e162c61cc35ddf9b0b2be26f68dd674cc9365e56cf5a88c46f3bda248297c05ef3045c05c1fed004bd4ff3257d2f02fac2f67e055a2
6
+ metadata.gz: 45dfc849ae8b813bdf3c78745074423b92c686ba901c9523f1072fea39600ce3554fe054d69a626b107a9e5b88930a212470ba4b1aa253e81fb18284787a5c7e
7
+ data.tar.gz: 7f8991a523ee1131e2939605fe3d50acfb00cf5bcd075055d49cbe31ded4234df8b3a278e38fccbb060e6884cd36983b4314503263c8c65f8fa9c625d0dca8a3
@@ -110,7 +110,7 @@ module Judoscale
110
110
  end
111
111
 
112
112
  def log_level=(new_level)
113
- @log_level = new_level ? ::Logger::Severity.const_get(new_level.to_s.upcase) : nil
113
+ @log_level = get_severity_log_level(new_level)
114
114
  end
115
115
 
116
116
  def as_json
@@ -127,5 +127,21 @@ module Judoscale
127
127
  def ignore_large_requests?
128
128
  @max_request_size_bytes
129
129
  end
130
+
131
+ private
132
+
133
+ def get_severity_log_level(log_level)
134
+ return nil if log_level.to_s.strip.empty?
135
+
136
+ upcased_log_level = log_level.to_s.upcase
137
+
138
+ if ::Logger::Severity.const_defined?(upcased_log_level)
139
+ ::Logger::Severity.const_get(upcased_log_level)
140
+ else
141
+ logger.warn "Invalid log_level detected: #{log_level}"
142
+
143
+ nil
144
+ end
145
+ end
130
146
  end
131
147
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Judoscale
4
- VERSION = "1.8.2"
4
+ VERSION = "1.8.3"
5
5
  end
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: judoscale-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.2
4
+ version: 1.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam McCrea
8
8
  - Carlos Antonio da Silva
9
9
  - Jon Sullivan
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-10-16 00:00:00.000000000 Z
13
+ date: 2024-12-30 00:00:00.000000000 Z
14
14
  dependencies: []
15
- description:
15
+ description:
16
16
  email:
17
17
  - hello@judoscale.com
18
18
  executables: []
@@ -43,7 +43,7 @@ metadata:
43
43
  documentation_uri: https://judoscale.com/docs
44
44
  changelog_uri: https://github.com/judoscale/judoscale-ruby/blob/main/CHANGELOG.md
45
45
  source_code_uri: https://github.com/judoscale/judoscale-ruby
46
- post_install_message:
46
+ post_install_message:
47
47
  rdoc_options: []
48
48
  require_paths:
49
49
  - lib
@@ -58,8 +58,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  - !ruby/object:Gem::Version
59
59
  version: '0'
60
60
  requirements: []
61
- rubygems_version: 3.5.16
62
- signing_key:
61
+ rubygems_version: 3.5.22
62
+ signing_key:
63
63
  specification_version: 4
64
64
  summary: Autoscaling for Ruby.
65
65
  test_files: []