prefab-cloud-ruby 0.23.5 → 0.23.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/prefab/client.rb +1 -1
- data/lib/prefab/config_client.rb +6 -1
- data/prefab-cloud-ruby.gemspec +3 -3
- data/test/test_logger.rb +15 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c85fe17e767a338eb86a1fcd8e7f3b81c6845684406719f0e5a79ac7c99a8ea9
|
4
|
+
data.tar.gz: d0ff285c181c5dbace6636eb4cdba7e42a011c0e3640f2c5bc4782e2960fedbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70607132c7c3db0b2296984ab43a3e80b443118001ad8a953c231ba6de0447e44deafb1d5f12233e9244b10532eeb95f28f1b058ec6d287c569a796ff7409f89
|
7
|
+
data.tar.gz: 000a050dc0d55c402fa36413a6d770e3f4c43f3ddbb88fb2b113de23e4407df48d487e73be48fa9c374a9f7147aa8fdd64ccc6e974b69e0d82f674fd9d65dcfd
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.23.
|
1
|
+
0.23.7
|
data/lib/prefab/client.rb
CHANGED
@@ -73,7 +73,7 @@ module Prefab
|
|
73
73
|
Rails.logger = log
|
74
74
|
ActionView::Base.logger = log
|
75
75
|
ActionController::Base.logger = log
|
76
|
-
ActiveJob::Base.logger = log
|
76
|
+
ActiveJob::Base.logger = log if defined?(ActiveJob)
|
77
77
|
ActiveRecord::Base.logger = log
|
78
78
|
ActiveStorage.logger = log if defined?(ActiveStorage)
|
79
79
|
end
|
data/lib/prefab/config_client.rb
CHANGED
@@ -68,7 +68,12 @@ module Prefab
|
|
68
68
|
def get(key, default = Prefab::Client::NO_DEFAULT_PROVIDED, properties = {}, lookup_key = nil)
|
69
69
|
value = _get(key, lookup_key, properties)
|
70
70
|
|
71
|
-
|
71
|
+
if value
|
72
|
+
lookup = lookup_key == Prefab::Client::NO_DEFAULT_PROVIDED ? nil : lookup_key
|
73
|
+
Prefab::ConfigValueUnwrapper.unwrap(value, key, properties.merge(Prefab::CriteriaEvaluator::LOOKUP_KEY => lookup))
|
74
|
+
else
|
75
|
+
handle_default(key, default)
|
76
|
+
end
|
72
77
|
end
|
73
78
|
|
74
79
|
private
|
data/prefab-cloud-ruby.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: prefab-cloud-ruby 0.23.
|
5
|
+
# stub: prefab-cloud-ruby 0.23.7 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "prefab-cloud-ruby".freeze
|
9
|
-
s.version = "0.23.
|
9
|
+
s.version = "0.23.7"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Jeff Dwyer".freeze]
|
14
|
-
s.date = "2023-04-
|
14
|
+
s.date = "2023-04-21"
|
15
15
|
s.description = "Feature Flags, Live Config, and Dynamic Log Levels as a service".freeze
|
16
16
|
s.email = "jdwyer@prefab.cloud".freeze
|
17
17
|
s.extra_rdoc_files = [
|
data/test/test_logger.rb
CHANGED
@@ -387,6 +387,21 @@ class TestLogger < Minitest::Test
|
|
387
387
|
end
|
388
388
|
end
|
389
389
|
|
390
|
+
def test_logging_with_a_block
|
391
|
+
prefab, io = captured_logger
|
392
|
+
message = 'MY MESSAGE'
|
393
|
+
|
394
|
+
prefab.log.error do
|
395
|
+
message
|
396
|
+
end
|
397
|
+
|
398
|
+
prefab.log.info do
|
399
|
+
raise 'THIS WILL NEVER BE EVALUATED'
|
400
|
+
end
|
401
|
+
|
402
|
+
assert_logged io, 'ERROR', 'test.test_logger.test_logging_with_a_block', ' ' + message
|
403
|
+
end
|
404
|
+
|
390
405
|
private
|
391
406
|
|
392
407
|
def assert_logged(logged_io, level, path, message)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prefab-cloud-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.23.
|
4
|
+
version: 0.23.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Dwyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|