wolf_core 1.1.6 → 1.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1af8135716fc03719e52e065b4990beab77de5b70dfb20f216ea499a06d842ef
4
- data.tar.gz: 9c6a361ee0b23dfd748c02bf692190c02be20a973241efd47243b6d5a9f8123a
3
+ metadata.gz: 92ea9ad779e6f08068f60af09eebb33bc4e2b384bf77e4fdc5b2dadefd76fefc
4
+ data.tar.gz: 6fb952ab02fa06402f46907ce7dcaa481e5cdd3eda161d735fa49b821d02895a
5
5
  SHA512:
6
- metadata.gz: d0b93655d5156cbbe4b0db79e29c286eadedd09b88725e0c1974a797ce8e01411ca060ff935df4d085ac982b9b94bffe7e1272ccfe03d5677263970d2922cf73
7
- data.tar.gz: eac2de5689fff3c672531878245576a7814b7e0e444ac49ebf7c0da2eaea9db8476a17d9333c06d0f3d9c65989bd88e1efcc9e5203af4092be4ed696132870c5
6
+ metadata.gz: 575ef6f00ea7aae879cf88c8dec274f01975f4b907f491aedcaa6b96f4a4f70cdff7655527a49d694e448cd326c964883fee8aeaa069a6a3992bdc77ba958053
7
+ data.tar.gz: 9393bab11ace464363d0393cc9358c65b92916c367b228eb6f05c6d510128ea6917b97771c0db5b8729b49ebdbabdd821ab23a2d15fcdc76d91eb66a6d98efe9
@@ -11,18 +11,12 @@ module WolfCore
11
11
  on_timeout(e) if is_timeout_error?(e) && respond_to?(:on_timeout)
12
12
 
13
13
  common_data = { backtrace: e.backtrace }
14
- log_object common_data, title: 'common_data 1 is'
15
- log_object "respond_to?(:build_result_data, true) = #{respond_to?(:build_result_data, true)}"
16
- log_object build_result_data, title: 'build_result_data is'
17
14
  common_data.merge!(build_result_data) if respond_to?(:build_result_data, true)
18
- log_object common_data, title: 'common_data 2 is'
19
- log_object "e.instance_of?(WolfCore::ServiceException) = #{e.instance_of?(WolfCore::ServiceException)}"
20
15
  if e.instance_of?(WolfCore::ServiceException)
21
16
  return Result.failure(
22
17
  error: e.error.to_h.merge(common_data)
23
18
  )
24
19
  end
25
- log_object ({ message: e.message }.merge(common_data)), title: 'Error data is'
26
20
 
27
21
  Honeybadger.notify(e, sync: true)
28
22
  Result.failure(error: { message: e.message }.merge(common_data))
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WolfCore
4
+ module HashUtils
5
+ def deep_to_h(hash)
6
+ hash.transform_values do |value|
7
+ if value.respond_to?(:to_h)
8
+ deep_to_h(value.to_h)
9
+ elsif value.is_a?(Hash)
10
+ deep_to_h(value)
11
+ else
12
+ value
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WolfCore
4
- VERSION = "1.1.6"
4
+ VERSION = "1.1.8"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wolf_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Roncallo
@@ -152,6 +152,7 @@ files:
152
152
  - lib/wolf_core/utils/async_utils.rb
153
153
  - lib/wolf_core/utils/file_utils.rb
154
154
  - lib/wolf_core/utils/friendly_model_id.rb
155
+ - lib/wolf_core/utils/hash_utils.rb
155
156
  - lib/wolf_core/utils/logging_utils.rb
156
157
  - lib/wolf_core/utils/result.rb
157
158
  - lib/wolf_core/utils/string_utils.rb