rails_api_logger 0.8.1 → 0.8.2

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: 6a49586120262a132a0601faa23ace3fb929b04f115b900a54e3d86f68f04de9
4
- data.tar.gz: 48e8cb9dcd6172532b96ac823910965102277bb10ec39956ee006a8bdbfc71b4
3
+ metadata.gz: eec005ade27407b2e826f07e25dfb756d8582a831b0f42e17fbb901886a846f0
4
+ data.tar.gz: 03571be34906628a5c0a4becfe39d699d8535b7dc3fe7d7b2b1bef27e6337d0c
5
5
  SHA512:
6
- metadata.gz: 4468f3a723f56fd098cefe32fac6b937f63270636ac06fbd316920586516917b380120532c527d6cbd54d3808278eff28a633ad61aae5a4741a89a214d0411e2
7
- data.tar.gz: ba10ec2838b308faad8b368ced02945a39663a34839f25b096760af9da6b108d316cf82669fd5dca5f9e2a3bccb2487bf6cb94ef84abdab5dd1743e4af7acc96
6
+ metadata.gz: a61c04ed687aa6c48ac6c1e51de301ebcff658c574eea9db836a1ee343dac994b4fb87a8ef15dd666a415176ea181a6f150057c5ce5fb276d1ccc373844ba9cf
7
+ data.tar.gz: 7e7c35c31fe36d335a8b79a29fafb6f61934cc2c91dc9d05a3c891cb0c4909d49cb0a8bf4fea8301dddd744cea1d10523a143d6163267c3d8c2a9fe3071c0d75
@@ -42,10 +42,10 @@ class InboundRequestsLoggerMiddleware
42
42
  def parsed_body(body)
43
43
  return unless body.present?
44
44
 
45
- if body.respond_to?(:body)
45
+ if body.respond_to?(:to_ary)
46
+ JSON.parse(body.to_ary[0])
47
+ elsif body.respond_to?(:body)
46
48
  JSON.parse(body.body)
47
- elsif body.respond_to?(:[])
48
- JSON.parse(body[0])
49
49
  else
50
50
  body
51
51
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "rails_api_logger"
3
- spec.version = "0.8.1"
3
+ spec.version = "0.8.2"
4
4
  spec.authors = ["Alessandro Rodi"]
5
5
  spec.email = ["alessandro.rodi@renuo.ch"]
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_api_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Rodi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-12 00:00:00.000000000 Z
11
+ date: 2024-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -215,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
215
  - !ruby/object:Gem::Version
216
216
  version: '0'
217
217
  requirements: []
218
- rubygems_version: 3.4.21
218
+ rubygems_version: 3.5.17
219
219
  signing_key:
220
220
  specification_version: 4
221
221
  summary: "Log API requests like a king \U0001F451"