hermes-rb 0.7.4 → 0.8.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/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/gemfiles/rails.6.1.gemfile +1 -1
- data/gemfiles/rails.7.0.gemfile +1 -1
- data/lib/hermes/consumer_builder.rb +1 -1
- data/lib/hermes/logger/params_filter.rb +12 -2
- data/lib/hermes/rb/version.rb +1 -1
- 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: 433cc1a9749f827d101d9294283011975311319379d6d074ae721e0b85e2f99f
|
4
|
+
data.tar.gz: bbec7e7bde055e3bfdc636c036dca46e48e3bd3f9ada9d87cfe7b9ae263f6bc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21a8cad1f51fbdff6104312154a4e9145b9385d005ac8194b1fbba54c28ff1bfb5f75938c359c7617b68b8b41eeb330689472f344c0a303aeb544694794ec4c3
|
7
|
+
data.tar.gz: 0e725e42455d602480c07160e69039c945c90510e3fe23f2cfdd69fd5dc5e29565a21206307eceaa3a0e84aacd49efdac125d353a855993032ac7fec66a072a0
|
data/Changelog.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
## Master
|
4
4
|
|
5
|
+
## 0.8.0
|
6
|
+
|
7
|
+
- Fix `database_connection_provider` config option: avoid calling connection on app initialization
|
8
|
+
|
9
|
+
## 0.7.5
|
10
|
+
|
11
|
+
- Make `Hermes::Logger::ParamsFilter` correctly handle regexps
|
12
|
+
|
5
13
|
## 0.7.4
|
6
14
|
|
7
15
|
- Make `Hermes::Logger::ParamsFilter` handle case-insensitive matches
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -30,7 +30,7 @@ Rails.application.config.to_prepare do
|
|
30
30
|
config.adapter = Rails.application.config.async_messaging_adapter
|
31
31
|
config.application_prefix = "my_app"
|
32
32
|
config.background_processor = HermesHandlerJob
|
33
|
-
config.database_connection_provider = ActiveRecord::Base
|
33
|
+
config.database_connection_provider = ActiveRecord::Base
|
34
34
|
config.enqueue_method = :perform_async
|
35
35
|
config.event_handler = event_handler
|
36
36
|
config.clock = Time.zone
|
@@ -88,7 +88,7 @@ end
|
|
88
88
|
|
89
89
|
If you know what you are doing, you don't necessarily have to process things in the background. As long as the class implements the expected interface, you can do anything you want.
|
90
90
|
|
91
|
-
5. `database_connection_provider` - an object responding to `
|
91
|
+
5. `database_connection_provider` - an object responding to `connection`. It is used during synchronous flow to ensure a valid connection. Optional.
|
92
92
|
6. `event_handler` - an instance of event handler/storage, just use what is shown in the example. Notice that you can also pass extra consumer config lambda that will be evaluated within the context of Hutch consumer.
|
93
93
|
7. `clock` - a clock object that is time-zone aware, implementing `now` method.
|
94
94
|
8. `configure_hutch` - a way to configure Hutch:
|
data/gemfiles/rails.6.1.gemfile
CHANGED
data/gemfiles/rails.7.0.gemfile
CHANGED
@@ -61,7 +61,7 @@ module Hermes
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def ensure_database_connection!
|
64
|
-
config.database_connection_provider.reconnect! if config.database_connection_provider
|
64
|
+
config.database_connection_provider.connection.reconnect! if config.database_connection_provider
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
@@ -11,15 +11,25 @@ module Hermes
|
|
11
11
|
private :sensitive_keywords, :stripped_value
|
12
12
|
|
13
13
|
def initialize(sensitive_keywords: SENSITIVE_ATTRIBUTES_KEYWORDS, stripped_value: STRIPPED_VALUE)
|
14
|
-
@sensitive_keywords = sensitive_keywords
|
14
|
+
@sensitive_keywords = sensitive_keywords
|
15
15
|
@stripped_value = stripped_value
|
16
16
|
end
|
17
17
|
|
18
18
|
def call(attribute, value)
|
19
|
-
if sensitive_keywords.any? { |sensitive_attribute|
|
19
|
+
if sensitive_keywords.any? { |sensitive_attribute| match?(sensitive_attribute, attribute) } && value.respond_to?(:to_str)
|
20
20
|
value.gsub!(value, stripped_value)
|
21
21
|
end
|
22
22
|
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def match?(sensitive_attribute, attribute)
|
27
|
+
if Regexp === sensitive_attribute
|
28
|
+
attribute.to_s.match(sensitive_attribute)
|
29
|
+
else
|
30
|
+
attribute.to_s.downcase.match(sensitive_attribute.to_s.downcase)
|
31
|
+
end
|
32
|
+
end
|
23
33
|
end
|
24
34
|
end
|
25
35
|
end
|
data/lib/hermes/rb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hermes-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karol Galanciak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-struct
|