prefab-cloud-ruby 1.4.4 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/VERSION +1 -1
- data/lib/prefab/config_resolver.rb +0 -2
- data/lib/prefab/context.rb +1 -1
- data/lib/prefab/logger_client.rb +7 -2
- data/prefab-cloud-ruby.gemspec +3 -3
- data/test/integration_test.rb +1 -1
- data/test/integration_test_helpers.rb +5 -5
- 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: 84471490fb3fb725eb19f111b2c452c3905791f3f45e0e735b64954b382a1c4c
|
4
|
+
data.tar.gz: 2a5bbd48f450b39930910e5649537df80b37877db299d91ff88c06dd78550cc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fdd39c81ae85d709622fb88a44d8cf3b1f42778d92e9425f30f6d0edef192fc11eb322af69060da210c917af2e33bbf90454b11e21887c7577060b9f4bca9ab
|
7
|
+
data.tar.gz: 0b8d5a42bdd5f127d8b42d7c2710695625e51bdd0751f7651c2c613cfeee745702081225b75b9f8888e23e92fc712988505e46bf84241e026702aeb5d1a74597
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.5.0
|
@@ -61,8 +61,6 @@ module Prefab
|
|
61
61
|
def make_context(properties)
|
62
62
|
if properties == NO_DEFAULT_PROVIDED || properties.nil?
|
63
63
|
Context.current
|
64
|
-
elsif properties.is_a?(Context)
|
65
|
-
properties
|
66
64
|
else
|
67
65
|
Context.merge_with_current(properties)
|
68
66
|
end.merge_default(default_context || {})
|
data/lib/prefab/context.rb
CHANGED
data/lib/prefab/logger_client.rb
CHANGED
@@ -75,9 +75,9 @@ module Prefab
|
|
75
75
|
|
76
76
|
def log(message, path, progname, severity, log_context = {})
|
77
77
|
severity ||= ::Logger::UNKNOWN
|
78
|
-
@log_path_aggregator&.push(path, severity)
|
79
78
|
|
80
|
-
return true if
|
79
|
+
return true if !should_log? severity, path
|
80
|
+
return true if @logdev.nil? || @silences[local_log_id]
|
81
81
|
|
82
82
|
progname = @progname if progname.nil?
|
83
83
|
|
@@ -96,6 +96,11 @@ module Prefab
|
|
96
96
|
true
|
97
97
|
end
|
98
98
|
|
99
|
+
def should_log?(severity, path)
|
100
|
+
@log_path_aggregator&.push(path, severity)
|
101
|
+
severity >= level_of(path)
|
102
|
+
end
|
103
|
+
|
99
104
|
def debug(progname = nil, **log_context, &block)
|
100
105
|
add_internal(DEBUG, nil, progname, caller_locations(1, 1)[0], log_context, &block)
|
101
106
|
end
|
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 1.
|
5
|
+
# stub: prefab-cloud-ruby 1.5.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "prefab-cloud-ruby".freeze
|
9
|
-
s.version = "1.
|
9
|
+
s.version = "1.5.0"
|
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 = "2024-
|
14
|
+
s.date = "2024-02-12"
|
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.executables = ["console".freeze]
|
data/test/integration_test.rb
CHANGED
@@ -9,7 +9,7 @@ class IntegrationTest
|
|
9
9
|
@input = parse_input(test_data['input'])
|
10
10
|
@expected = parse_expected(test_data['expected'])
|
11
11
|
@data = test_data['data']
|
12
|
-
@expected_data = test_data['expected_data']
|
12
|
+
@expected_data = test_data['expected_data'] || []
|
13
13
|
@aggregator = test_data['aggregator']
|
14
14
|
@endpoint = test_data['endpoint']
|
15
15
|
@test_client = capture_telemetry(base_client)
|
@@ -115,23 +115,23 @@ module IntegrationTestHelpers
|
|
115
115
|
when "example_contexts"
|
116
116
|
aggregator = it.test_client.example_contexts_aggregator
|
117
117
|
|
118
|
-
it.data.each do |
|
119
|
-
aggregator.record(Prefab::Context.new(
|
118
|
+
it.data.each do |key, values|
|
119
|
+
aggregator.record(Prefab::Context.new({ key => values }))
|
120
120
|
end
|
121
121
|
|
122
122
|
expected_data = []
|
123
|
-
it.expected_data.each do |
|
123
|
+
it.expected_data.each do |k, vs|
|
124
124
|
expected_data << PrefabProto::ExampleContext.new(
|
125
125
|
timestamp: 0,
|
126
126
|
contextSet: PrefabProto::ContextSet.new(
|
127
|
-
contexts:
|
127
|
+
contexts: [
|
128
128
|
PrefabProto::Context.new(
|
129
129
|
type: k,
|
130
130
|
values: vs.each_pair.map do |key, value|
|
131
131
|
[key, Prefab::ConfigValueWrapper.wrap(value)]
|
132
132
|
end.to_h
|
133
133
|
)
|
134
|
-
|
134
|
+
]
|
135
135
|
)
|
136
136
|
)
|
137
137
|
end
|
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: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Dwyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|