meta_request 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/meta_request/event.rb +5 -1
- data/lib/meta_request/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a4b9c5b68ec96706c97b7694930d494d51a71d4cdfe8d0e4a31a1c5a3bd6162b
|
4
|
+
data.tar.gz: 12175a52caa80018ac03d1c47cce506da4f41094e72bbb36a3f950812436b2e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4344ff68b5379c110ed0a6f1d4b9e852b8dc72b3f6c3e323bcf36fc6e62b4aef196d9f61b81f38922c1c577c48f763b0fe574a7db6183d28ef931e8746d02d5
|
7
|
+
data.tar.gz: 5e3f37af2fb91197b442cb41f57f71c3c8aff600cfa6ce9ccf516419aa48f2e954ae7553b038c67b2bf7efbe647f34a794fd4afe2fb5554b7d53f4976b6a1bcb
|
data/lib/meta_request/event.rb
CHANGED
@@ -7,6 +7,8 @@ module MetaRequest
|
|
7
7
|
# Subclass of ActiveSupport Event that is JSON encodable
|
8
8
|
#
|
9
9
|
class Event < ActiveSupport::Notifications::Event
|
10
|
+
NOT_JSON_ENCODABLE = 'Not JSON Encodable'.freeze
|
11
|
+
|
10
12
|
attr_reader :duration
|
11
13
|
|
12
14
|
def initialize(name, start, ending, transaction_id, payload)
|
@@ -36,13 +38,15 @@ module MetaRequest
|
|
36
38
|
transform_hash(payload, :deep => true) { |hash, key, value|
|
37
39
|
if value.class.to_s == 'ActionDispatch::Http::Headers'
|
38
40
|
value = value.to_h.select { |k, _| k.upcase == k }
|
41
|
+
elsif value.is_a?(ActiveRecord::ConnectionAdapters::AbstractAdapter)
|
42
|
+
value = NOT_JSON_ENCODABLE
|
39
43
|
end
|
40
44
|
|
41
45
|
begin
|
42
46
|
value.to_json(:methods => [:duration])
|
43
47
|
new_value = value
|
44
48
|
rescue
|
45
|
-
new_value =
|
49
|
+
new_value = NOT_JSON_ENCODABLE
|
46
50
|
end
|
47
51
|
hash[key] = new_value
|
48
52
|
}.with_indifferent_access
|
data/lib/meta_request/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meta_request
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dejan Simic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 3.0.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '7'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 3.0.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '7'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rack-contrib
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.
|
112
|
+
rubygems_version: 2.7.8
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: Request your Rails request
|