prefab-cloud-ruby 0.23.5 → 0.23.6

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: 24a51f70838a78fdb76b79565fa4c8a28983d95cba2faa486e6bfdd71e095a98
4
- data.tar.gz: b559a16d49be776460fe65df55791ff1aa95a2d2a7b655698f9cc434306514ba
3
+ metadata.gz: 7132292d4137fdc797fa0bd721fc2a4389ed5fda5452be8e6403fe11ca1be9a4
4
+ data.tar.gz: b23a18e42a3d033f4d5f8ab565df09b30bdcfffa97c0ec9a528811fd2f1bbb22
5
5
  SHA512:
6
- metadata.gz: a9365864e53a40214bce51cd9ce0ddc887def06a02a689263d62328964b8344911021363468ec0b5e1bb02568fc07f66ba8f9247cadf8b8215ad1fc628323db9
7
- data.tar.gz: 68e93df7c02776894411605d3fbc48d16828bd94d0ae6a7034b713d601916a496a0218b5f76f29f9110661cd2d98a7dc55a3e0118890456e75d80004178b0323
6
+ metadata.gz: 4ba972c390518d261dd8d5c29411bb786445b37023f6e333c9d5e57923819ba3d00dcd085de747df48d763704fdb795ed955f53f15436f33596059091aeee2b3
7
+ data.tar.gz: d5c38d28c9b87229255127556be2e8b815cc442b159d074bee09d997c438cdece7ab6df9e037cd1eb2e7057aaef08355ec7729b926a93b6eea44e83808c1d2d0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.23.5
1
+ 0.23.6
@@ -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
- value ? Prefab::ConfigValueUnwrapper.unwrap(value, key, properties) : handle_default(key, default)
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
@@ -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 ruby lib
5
+ # stub: prefab-cloud-ruby 0.23.6 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "prefab-cloud-ruby".freeze
9
- s.version = "0.23.5"
9
+ s.version = "0.23.6"
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-13"
14
+ s.date = "2023-04-17"
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.5
4
+ version: 0.23.6
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-13 00:00:00.000000000 Z
11
+ date: 2023-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby