grape_logging 2.0.0 → 2.1.1

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: 1f20fda586594dbf4f4ad0d0894476b53750f56d37c34df2b3ceb0b804ca27b1
4
- data.tar.gz: 8550ca9bb7a492b7bd08eb9da98bd14f4d71af6052f2258b8861d6b9e6a068b0
3
+ metadata.gz: c221ae5f7be5a9f4a5818689a276d1637144cf5c0a3845e3fd1d20a15455a5e7
4
+ data.tar.gz: 1208a13208efba0ef1ddd1ee9e6e5306a35acbe0bd623603fbda16ad1821eee1
5
5
  SHA512:
6
- metadata.gz: e58d85e6661ed164a4cf5f2e0675ace15fa6a224372fab1f8e07a27996a91fe078009a9d84b6cc6dbedcda2e357577b39cb9d298f5c20c1c3ec5a1e86da51e21
7
- data.tar.gz: 0c8cd020637b865f1165b36072dfa6d22312528afbbb84f18157f80d6c960321e214d3475879cca583a175b646dcfc3b806cd53adbbd26915abafa4f9acdf9c0
6
+ metadata.gz: 82f1f1e940a7ace4f9e30f8623b56d4a2880bb4a2eeee1a8d654382662b5efe336a875e2e501275dc48594cc1ded59204e9eee44e43fb62204c84d0978e9a525
7
+ data.tar.gz: 866d9f113fdfd414f48c710814902eae481982e5cf8a453b840904410eae3d368a09423bb6489e3ec455b21b348cadd2023082224e604db493f816d040532958
data/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
  # Changelog
2
2
 
3
- ## [2.0.0] - 2025-06-28
3
+ ## [2.1.1] - 2025-07-09
4
+
5
+ ### Fixed
6
+ - [#92](https://github.com/aserafin/grape_logging/pull/92) Handle symbol param keys during filtering - [@samsonjs](https://github.com/samsonjs).
7
+
8
+ [2.1.1]: https://github.com/aserafin/grape_logging/compare/v2.1.0...v2.1.1
9
+
10
+ ## [2.1.0] - 2025-07-09
11
+
12
+ ### Added
13
+ - [#91](https://github.com/aserafin/grape_logging/pull/91) Add ActionDispatch request ID to logger arguments hash as `:request_id` - [@samsonjs](https://github.com/samsonjs).
14
+
15
+ [2.1.0]: https://github.com/aserafin/grape_logging/compare/v2.0.0...v2.1.0
16
+
17
+ ## [2.0.0] - 2025-07-09
4
18
 
5
19
  ### Changed
6
20
  - **BREAKING**: Updated to support Grape 2.1 and Rack 3.1
data/RELEASING.md CHANGED
@@ -15,7 +15,7 @@ Check that the last build succeeded in [GitHub Actions](https://github.com/asera
15
15
 
16
16
  ### Update Changelog
17
17
 
18
- Change "Next Release" in [CHANGELOG.md](https://github.com/aserafin/grape_logging/blob/master/CHANGELOG.md) to the new version and date:
18
+ Change "Unreleased" in [CHANGELOG.md](https://github.com/aserafin/grape_logging/blob/master/CHANGELOG.md) to the new version and date:
19
19
 
20
20
  ```
21
21
  ## [1.8.5] - 2024-06-28
@@ -41,7 +41,7 @@ Commit your changes.
41
41
  ```shell
42
42
  git add CHANGELOG.md lib/grape_logging/version.rb
43
43
  git commit -m "Preparing for release, 1.8.5."
44
- git push github master
44
+ git push
45
45
  ```
46
46
 
47
47
  ### Release on RubyGems and GitHub
@@ -96,10 +96,12 @@ end
96
96
  Add the next release to [CHANGELOG.md](https://github.com/aserafin/grape_logging/blob/master/CHANGELOG.md).
97
97
 
98
98
  ```
99
- ## [Next Release]
99
+ ## [1.8.6] - Unreleased
100
100
 
101
101
  ### Changed or Fixed or Added
102
- * Your contribution here.
102
+ - Your contribution here.
103
+
104
+ [1.8.6]: https://github.com/aserafin/grape_logging/compare/v1.8.5...master
103
105
  ```
104
106
 
105
107
  Commit your changes.
@@ -107,5 +109,5 @@ Commit your changes.
107
109
  ```
108
110
  git add CHANGELOG.md lib/grape_logging/version.rb
109
111
  git commit -m "Bump version to 1.8.6."
110
- git push github master
112
+ git push
111
113
  ```
@@ -5,11 +5,13 @@ require 'grape_logging/version'
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'grape_logging'
7
7
  spec.version = GrapeLogging::VERSION
8
- spec.authors = ['aserafin']
9
- spec.email = ['adrian@softmad.pl']
8
+ spec.authors = ['aserafin', 'Sami Samhuri']
9
+ spec.email = ['adrian@softmad.pl', 'sami@samhuri.net']
10
10
 
11
- spec.summary = %q{Out of the box request logging for Grape!}
12
- spec.description = %q{This gem provides simple request logging for Grape with just few lines of code you have to put in your project! In return you will get response codes, paths, parameters and more!}
11
+ spec.summary = 'Out of the box request logging for Grape!'
12
+ spec.description = 'This gem provides simple request logging for Grape with just few lines ' \
13
+ 'of code you have to put in your project! In return you will get response ' \
14
+ 'codes, paths, parameters and more!'
13
15
  spec.homepage = 'http://github.com/aserafin/grape_logging'
14
16
  spec.license = 'MIT'
15
17
 
@@ -37,14 +37,16 @@ module GrapeLogging
37
37
 
38
38
  def build_encoding_map(parameters)
39
39
  parameters.each_with_object({}) do |(k, v), h|
40
- h[k.dup.force_encoding(Encoding::ASCII_8BIT)] = [k.encoding, v.is_a?(Hash) ? build_encoding_map(v) : nil]
40
+ key_str = k.to_s
41
+ h[key_str.dup.force_encoding(Encoding::ASCII_8BIT)] = [key_str.encoding, v.is_a?(Hash) ? build_encoding_map(v) : nil]
41
42
  end
42
43
  end
43
44
 
44
45
  def transform_key_encoding(parameters, encoding_map)
45
46
  parameters.each_with_object({}) do |(k, v), h|
46
- encoding, children_encoding_map = encoding_map[k]
47
- h[k.dup.force_encoding(encoding)] = v.is_a?(Hash) ? transform_key_encoding(v, children_encoding_map) : v
47
+ key_str = k.to_s
48
+ encoding, children_encoding_map = encoding_map[key_str]
49
+ h[key_str.dup.force_encoding(encoding)] = v.is_a?(Hash) ? transform_key_encoding(v, children_encoding_map) : v
48
50
  end
49
51
  end
50
52
  end
@@ -98,7 +98,8 @@ module GrapeLogging
98
98
  method: request.request_method,
99
99
  path: request.path,
100
100
  params: request.params,
101
- host: request.host
101
+ host: request.host,
102
+ request_id: env['action_dispatch.request_id'],
102
103
  }
103
104
  end
104
105
 
@@ -1,3 +1,3 @@
1
1
  module GrapeLogging
2
- VERSION = '2.0.0'
2
+ VERSION = '2.1.1'
3
3
  end
metadata CHANGED
@@ -1,10 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape_logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - aserafin
8
+ - Sami Samhuri
8
9
  bindir: exe
9
10
  cert_chain: []
10
11
  date: 1980-01-02 00:00:00.000000000 Z
@@ -70,6 +71,7 @@ description: This gem provides simple request logging for Grape with just few li
70
71
  paths, parameters and more!
71
72
  email:
72
73
  - adrian@softmad.pl
74
+ - sami@samhuri.net
73
75
  executables: []
74
76
  extensions: []
75
77
  extra_rdoc_files: []