getaround_utils 0.2.14 → 0.2.20
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 +4 -4
- data/.rubocop.yml +4 -0
- data/Gemfile +2 -5
- data/Gemfile.lock +152 -149
- data/getaround_utils.gemspec +25 -17
- data/lib/getaround_utils.rb +2 -0
- data/lib/getaround_utils/mixins.rb +2 -0
- data/lib/getaround_utils/mixins/loggable.rb +3 -1
- data/lib/getaround_utils/ougai.rb +2 -0
- data/lib/getaround_utils/ougai/deep_key_value_formatter.rb +1 -1
- data/lib/getaround_utils/ougai/json_formatter.rb +1 -1
- data/lib/getaround_utils/railties/lograge.rb +21 -2
- data/lib/getaround_utils/railties/ougai.rb +1 -1
- data/lib/getaround_utils/utils.rb +2 -0
- data/lib/getaround_utils/utils/deep_key_value.rb +2 -0
- data/lib/getaround_utils/version.rb +3 -1
- metadata +62 -52
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a876e7110b750515712981aa194500a77a7435eb5230dd32af4acb1123735b88
|
4
|
+
data.tar.gz: 34291b22958a67d4489d8015d9acd23f50627e0c8cc9988980332ab451a7dabb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46d3ed5cebf15935490549af5b3575603aec9f06e430d89aaa369f59bbc0ea2f88977140d078481a744179a150b6901e83f4fecd0b4d41bdeae71c011430b17d
|
7
|
+
data.tar.gz: 4f4d9952b5229d57c6853a88baad1bd7569e32bf102c8e039beb00190bd0e20a4bd772c1204bf6caaa58799e57ffc69c3185819497b94dbf834bc3848109beb7
|
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,235 +1,238 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
getaround_utils (0.2.
|
4
|
+
getaround_utils (0.2.20)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
actioncable (6.
|
10
|
-
actionpack (= 6.
|
9
|
+
actioncable (6.1.3)
|
10
|
+
actionpack (= 6.1.3)
|
11
|
+
activesupport (= 6.1.3)
|
11
12
|
nio4r (~> 2.0)
|
12
13
|
websocket-driver (>= 0.6.1)
|
13
|
-
actionmailbox (6.
|
14
|
-
actionpack (= 6.
|
15
|
-
activejob (= 6.
|
16
|
-
activerecord (= 6.
|
17
|
-
activestorage (= 6.
|
18
|
-
activesupport (= 6.
|
14
|
+
actionmailbox (6.1.3)
|
15
|
+
actionpack (= 6.1.3)
|
16
|
+
activejob (= 6.1.3)
|
17
|
+
activerecord (= 6.1.3)
|
18
|
+
activestorage (= 6.1.3)
|
19
|
+
activesupport (= 6.1.3)
|
19
20
|
mail (>= 2.7.1)
|
20
|
-
actionmailer (6.
|
21
|
-
actionpack (= 6.
|
22
|
-
actionview (= 6.
|
23
|
-
activejob (= 6.
|
21
|
+
actionmailer (6.1.3)
|
22
|
+
actionpack (= 6.1.3)
|
23
|
+
actionview (= 6.1.3)
|
24
|
+
activejob (= 6.1.3)
|
25
|
+
activesupport (= 6.1.3)
|
24
26
|
mail (~> 2.5, >= 2.5.4)
|
25
27
|
rails-dom-testing (~> 2.0)
|
26
|
-
actionpack (6.
|
27
|
-
actionview (= 6.
|
28
|
-
activesupport (= 6.
|
29
|
-
rack (~> 2.0)
|
28
|
+
actionpack (6.1.3)
|
29
|
+
actionview (= 6.1.3)
|
30
|
+
activesupport (= 6.1.3)
|
31
|
+
rack (~> 2.0, >= 2.0.9)
|
30
32
|
rack-test (>= 0.6.3)
|
31
33
|
rails-dom-testing (~> 2.0)
|
32
34
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
33
|
-
actiontext (6.
|
34
|
-
actionpack (= 6.
|
35
|
-
activerecord (= 6.
|
36
|
-
activestorage (= 6.
|
37
|
-
activesupport (= 6.
|
35
|
+
actiontext (6.1.3)
|
36
|
+
actionpack (= 6.1.3)
|
37
|
+
activerecord (= 6.1.3)
|
38
|
+
activestorage (= 6.1.3)
|
39
|
+
activesupport (= 6.1.3)
|
38
40
|
nokogiri (>= 1.8.5)
|
39
|
-
actionview (6.
|
40
|
-
activesupport (= 6.
|
41
|
+
actionview (6.1.3)
|
42
|
+
activesupport (= 6.1.3)
|
41
43
|
builder (~> 3.1)
|
42
44
|
erubi (~> 1.4)
|
43
45
|
rails-dom-testing (~> 2.0)
|
44
46
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
45
|
-
activejob (6.
|
46
|
-
activesupport (= 6.
|
47
|
+
activejob (6.1.3)
|
48
|
+
activesupport (= 6.1.3)
|
47
49
|
globalid (>= 0.3.6)
|
48
|
-
activemodel (6.
|
49
|
-
activesupport (= 6.
|
50
|
-
activerecord (6.
|
51
|
-
activemodel (= 6.
|
52
|
-
activesupport (= 6.
|
53
|
-
activestorage (6.
|
54
|
-
actionpack (= 6.
|
55
|
-
activejob (= 6.
|
56
|
-
activerecord (= 6.
|
50
|
+
activemodel (6.1.3)
|
51
|
+
activesupport (= 6.1.3)
|
52
|
+
activerecord (6.1.3)
|
53
|
+
activemodel (= 6.1.3)
|
54
|
+
activesupport (= 6.1.3)
|
55
|
+
activestorage (6.1.3)
|
56
|
+
actionpack (= 6.1.3)
|
57
|
+
activejob (= 6.1.3)
|
58
|
+
activerecord (= 6.1.3)
|
59
|
+
activesupport (= 6.1.3)
|
57
60
|
marcel (~> 0.3.1)
|
58
|
-
|
61
|
+
mimemagic (~> 0.3.2)
|
62
|
+
activesupport (6.1.3)
|
59
63
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
60
|
-
i18n (>=
|
61
|
-
minitest (
|
62
|
-
tzinfo (~>
|
63
|
-
zeitwerk (~> 2.
|
64
|
+
i18n (>= 1.6, < 2)
|
65
|
+
minitest (>= 5.1)
|
66
|
+
tzinfo (~> 2.0)
|
67
|
+
zeitwerk (~> 2.3)
|
64
68
|
addressable (2.7.0)
|
65
69
|
public_suffix (>= 2.0.2, < 5.0)
|
66
|
-
ast (2.4.
|
67
|
-
builder (3.2.
|
68
|
-
coderay (1.1.
|
69
|
-
concurrent-ruby (1.1.
|
70
|
-
connection_pool (2.2.
|
71
|
-
crack (0.4.
|
72
|
-
|
73
|
-
crass (1.0.
|
74
|
-
diff-lcs (1.
|
75
|
-
erubi (1.
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
rubocop (~> 0.75, >= 0.75.0)
|
70
|
+
ast (2.4.2)
|
71
|
+
builder (3.2.4)
|
72
|
+
coderay (1.1.3)
|
73
|
+
concurrent-ruby (1.1.8)
|
74
|
+
connection_pool (2.2.3)
|
75
|
+
crack (0.4.5)
|
76
|
+
rexml
|
77
|
+
crass (1.0.6)
|
78
|
+
diff-lcs (1.4.4)
|
79
|
+
erubi (1.10.0)
|
80
|
+
getaround-rubocop (0.2.3)
|
81
|
+
relaxed-rubocop (= 2.5)
|
82
|
+
rubocop (= 1.3.1)
|
83
|
+
rubocop-rspec (= 2.0.0)
|
81
84
|
globalid (0.4.2)
|
82
85
|
activesupport (>= 4.2.0)
|
83
|
-
hashdiff (1.0.
|
84
|
-
i18n (1.
|
86
|
+
hashdiff (1.0.1)
|
87
|
+
i18n (1.8.9)
|
85
88
|
concurrent-ruby (~> 1.0)
|
86
|
-
jaro_winkler (1.5.4)
|
87
89
|
lograge (0.11.2)
|
88
90
|
actionpack (>= 4)
|
89
91
|
activesupport (>= 4)
|
90
92
|
railties (>= 4)
|
91
93
|
request_store (~> 1.0)
|
92
|
-
loofah (2.
|
94
|
+
loofah (2.9.0)
|
93
95
|
crass (~> 1.0.2)
|
94
96
|
nokogiri (>= 1.5.9)
|
95
97
|
mail (2.7.1)
|
96
98
|
mini_mime (>= 0.1.1)
|
97
99
|
marcel (0.3.3)
|
98
100
|
mimemagic (~> 0.3.2)
|
99
|
-
method_source (0.
|
100
|
-
mimemagic (0.3.
|
101
|
+
method_source (1.0.0)
|
102
|
+
mimemagic (0.3.5)
|
101
103
|
mini_mime (1.0.2)
|
102
|
-
mini_portile2 (2.
|
103
|
-
minitest (5.
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
oj (3.
|
109
|
-
ougai (
|
104
|
+
mini_portile2 (2.5.0)
|
105
|
+
minitest (5.14.4)
|
106
|
+
nio4r (2.5.7)
|
107
|
+
nokogiri (1.11.2)
|
108
|
+
mini_portile2 (~> 2.5.0)
|
109
|
+
racc (~> 1.4)
|
110
|
+
oj (3.11.3)
|
111
|
+
ougai (2.0.0)
|
110
112
|
oj (~> 3.10)
|
111
|
-
parallel (1.
|
112
|
-
parser (
|
113
|
-
ast (~> 2.4.
|
114
|
-
pry (0.
|
115
|
-
coderay (~> 1.1
|
116
|
-
method_source (~>
|
117
|
-
public_suffix (4.0.
|
113
|
+
parallel (1.20.1)
|
114
|
+
parser (3.0.0.0)
|
115
|
+
ast (~> 2.4.1)
|
116
|
+
pry (0.14.0)
|
117
|
+
coderay (~> 1.1)
|
118
|
+
method_source (~> 1.0)
|
119
|
+
public_suffix (4.0.6)
|
120
|
+
racc (1.5.2)
|
118
121
|
rack (2.2.3)
|
119
|
-
rack-protection (2.0.7)
|
120
|
-
rack
|
121
122
|
rack-test (1.1.0)
|
122
123
|
rack (>= 1.0, < 3)
|
123
|
-
rails (6.
|
124
|
-
actioncable (= 6.
|
125
|
-
actionmailbox (= 6.
|
126
|
-
actionmailer (= 6.
|
127
|
-
actionpack (= 6.
|
128
|
-
actiontext (= 6.
|
129
|
-
actionview (= 6.
|
130
|
-
activejob (= 6.
|
131
|
-
activemodel (= 6.
|
132
|
-
activerecord (= 6.
|
133
|
-
activestorage (= 6.
|
134
|
-
activesupport (= 6.
|
135
|
-
bundler (>= 1.
|
136
|
-
railties (= 6.
|
124
|
+
rails (6.1.3)
|
125
|
+
actioncable (= 6.1.3)
|
126
|
+
actionmailbox (= 6.1.3)
|
127
|
+
actionmailer (= 6.1.3)
|
128
|
+
actionpack (= 6.1.3)
|
129
|
+
actiontext (= 6.1.3)
|
130
|
+
actionview (= 6.1.3)
|
131
|
+
activejob (= 6.1.3)
|
132
|
+
activemodel (= 6.1.3)
|
133
|
+
activerecord (= 6.1.3)
|
134
|
+
activestorage (= 6.1.3)
|
135
|
+
activesupport (= 6.1.3)
|
136
|
+
bundler (>= 1.15.0)
|
137
|
+
railties (= 6.1.3)
|
137
138
|
sprockets-rails (>= 2.0.0)
|
138
139
|
rails-dom-testing (2.0.3)
|
139
140
|
activesupport (>= 4.2.0)
|
140
141
|
nokogiri (>= 1.6)
|
141
142
|
rails-html-sanitizer (1.3.0)
|
142
143
|
loofah (~> 2.3)
|
143
|
-
railties (6.
|
144
|
-
actionpack (= 6.
|
145
|
-
activesupport (= 6.
|
144
|
+
railties (6.1.3)
|
145
|
+
actionpack (= 6.1.3)
|
146
|
+
activesupport (= 6.1.3)
|
146
147
|
method_source
|
147
148
|
rake (>= 0.8.7)
|
148
|
-
thor (
|
149
|
+
thor (~> 1.0)
|
149
150
|
rainbow (3.0.0)
|
150
|
-
rake (
|
151
|
-
redis (4.
|
152
|
-
|
153
|
-
|
151
|
+
rake (13.0.1)
|
152
|
+
redis (4.2.5)
|
153
|
+
regexp_parser (2.1.1)
|
154
|
+
relaxed-rubocop (2.5)
|
155
|
+
request_store (1.5.0)
|
154
156
|
rack (>= 1.4)
|
155
157
|
request_store_rails (2.0.0)
|
156
158
|
concurrent-ruby (~> 1.0)
|
157
|
-
|
158
|
-
|
159
|
-
rspec-
|
160
|
-
rspec-
|
161
|
-
|
162
|
-
|
163
|
-
|
159
|
+
rexml (3.2.4)
|
160
|
+
rspec (3.10.0)
|
161
|
+
rspec-core (~> 3.10.0)
|
162
|
+
rspec-expectations (~> 3.10.0)
|
163
|
+
rspec-mocks (~> 3.10.0)
|
164
|
+
rspec-core (3.10.1)
|
165
|
+
rspec-support (~> 3.10.0)
|
166
|
+
rspec-expectations (3.10.1)
|
164
167
|
diff-lcs (>= 1.2.0, < 2.0)
|
165
|
-
rspec-support (~> 3.
|
166
|
-
rspec-mocks (3.
|
168
|
+
rspec-support (~> 3.10.0)
|
169
|
+
rspec-mocks (3.10.2)
|
167
170
|
diff-lcs (>= 1.2.0, < 2.0)
|
168
|
-
rspec-support (~> 3.
|
169
|
-
rspec-rails (
|
170
|
-
actionpack (>=
|
171
|
-
activesupport (>=
|
172
|
-
railties (>=
|
173
|
-
rspec-core (~> 3.
|
174
|
-
rspec-expectations (~> 3.
|
175
|
-
rspec-mocks (~> 3.
|
176
|
-
rspec-support (~> 3.
|
177
|
-
rspec-support (3.
|
178
|
-
rubocop (
|
179
|
-
jaro_winkler (~> 1.5.1)
|
171
|
+
rspec-support (~> 3.10.0)
|
172
|
+
rspec-rails (5.0.0)
|
173
|
+
actionpack (>= 5.2)
|
174
|
+
activesupport (>= 5.2)
|
175
|
+
railties (>= 5.2)
|
176
|
+
rspec-core (~> 3.10)
|
177
|
+
rspec-expectations (~> 3.10)
|
178
|
+
rspec-mocks (~> 3.10)
|
179
|
+
rspec-support (~> 3.10)
|
180
|
+
rspec-support (3.10.2)
|
181
|
+
rubocop (1.3.1)
|
180
182
|
parallel (~> 1.10)
|
181
|
-
parser (>= 2.
|
183
|
+
parser (>= 2.7.1.5)
|
182
184
|
rainbow (>= 2.2.2, < 4.0)
|
185
|
+
regexp_parser (>= 1.8)
|
186
|
+
rexml
|
187
|
+
rubocop-ast (>= 1.1.1)
|
183
188
|
ruby-progressbar (~> 1.7)
|
184
|
-
unicode-display_width (>= 1.4.0, <
|
185
|
-
rubocop-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
189
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
190
|
+
rubocop-ast (1.4.1)
|
191
|
+
parser (>= 2.7.1.5)
|
192
|
+
rubocop-rspec (2.0.0)
|
193
|
+
rubocop (~> 1.0)
|
194
|
+
rubocop-ast (>= 1.1.0)
|
195
|
+
ruby-progressbar (1.11.0)
|
196
|
+
sidekiq (6.1.3)
|
190
197
|
connection_pool (>= 2.2.2)
|
191
|
-
rack (
|
192
|
-
|
193
|
-
|
194
|
-
sprockets (4.0.0)
|
198
|
+
rack (~> 2.0)
|
199
|
+
redis (>= 4.2.0)
|
200
|
+
sprockets (4.0.2)
|
195
201
|
concurrent-ruby (~> 1.0)
|
196
202
|
rack (> 1, < 3)
|
197
|
-
sprockets-rails (3.2.
|
203
|
+
sprockets-rails (3.2.2)
|
198
204
|
actionpack (>= 4.0)
|
199
205
|
activesupport (>= 4.0)
|
200
206
|
sprockets (>= 3.0.0)
|
201
|
-
thor (
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
webmock (3.7.6)
|
207
|
+
thor (1.1.0)
|
208
|
+
tzinfo (2.0.4)
|
209
|
+
concurrent-ruby (~> 1.0)
|
210
|
+
unicode-display_width (1.7.0)
|
211
|
+
webmock (3.12.1)
|
207
212
|
addressable (>= 2.3.6)
|
208
213
|
crack (>= 0.3.2)
|
209
214
|
hashdiff (>= 0.4.0, < 2.0.0)
|
210
|
-
websocket-driver (0.7.
|
215
|
+
websocket-driver (0.7.3)
|
211
216
|
websocket-extensions (>= 0.1.0)
|
212
217
|
websocket-extensions (0.1.5)
|
213
|
-
zeitwerk (2.2
|
218
|
+
zeitwerk (2.4.2)
|
214
219
|
|
215
220
|
PLATFORMS
|
216
221
|
ruby
|
217
222
|
|
218
223
|
DEPENDENCIES
|
219
224
|
bundler (~> 2.0)
|
220
|
-
|
221
|
-
getaround-rubocop (~> 0.1.0, >= 0.1.0)
|
225
|
+
getaround-rubocop (= 0.2.3)
|
222
226
|
getaround_utils!
|
223
227
|
lograge (~> 0.11.2)
|
224
|
-
ougai (~>
|
225
|
-
pry (~> 0.
|
228
|
+
ougai (~> 2.0)
|
229
|
+
pry (~> 0.14.0)
|
226
230
|
rails (~> 6.0)
|
227
|
-
rake (~>
|
231
|
+
rake (~> 13.0)
|
228
232
|
request_store_rails (~> 2.0)
|
229
233
|
rspec (~> 3.9, >= 3.9.0)
|
230
|
-
rspec-rails (~>
|
231
|
-
rubocop (
|
232
|
-
rubocop-rspec (~> 1.36, >= 0.36.0)
|
234
|
+
rspec-rails (~> 5.0)
|
235
|
+
rubocop (= 1.3.1)
|
233
236
|
sidekiq (~> 6.0)
|
234
237
|
webmock (~> 3.7)
|
235
238
|
|
data/getaround_utils.gemspec
CHANGED
@@ -1,28 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative './lib/getaround_utils/version'
|
2
4
|
|
3
5
|
Gem::Specification.new do |gem|
|
4
|
-
gem.name
|
5
|
-
gem.
|
6
|
-
gem.
|
7
|
-
gem.
|
8
|
-
gem.
|
9
|
-
gem.
|
10
|
-
gem.
|
11
|
-
gem.
|
6
|
+
gem.name = 'getaround_utils'
|
7
|
+
gem.required_ruby_version = '>=2.6'
|
8
|
+
gem.version = GetaroundUtils::VERSION
|
9
|
+
gem.summary = 'Backend shared utility classes'
|
10
|
+
gem.description = 'Shared base utility classes for Getaround Backend Applications.'
|
11
|
+
gem.authors = ['Drivy', 'Laurent Humez']
|
12
|
+
gem.email = ['oss@drivy.com']
|
13
|
+
gem.homepage = 'https://github.com/drivy'
|
14
|
+
gem.license = 'MIT'
|
12
15
|
|
13
|
-
gem.files
|
16
|
+
gem.files = Dir.chdir(File.expand_path(__dir__)) do
|
14
17
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
|
15
18
|
end
|
16
19
|
|
17
|
-
|
18
|
-
gem.add_development_dependency '
|
20
|
+
# Development dependencies
|
21
|
+
gem.add_development_dependency 'bundler', '~> 2.0'
|
22
|
+
gem.add_development_dependency 'getaround-rubocop', '= 0.2.3'
|
23
|
+
gem.add_development_dependency 'pry', '~> 0.14.0'
|
24
|
+
gem.add_development_dependency 'rake', '~> 13.0'
|
25
|
+
gem.add_development_dependency 'rspec', '~> 3.9', '>= 3.9.0'
|
26
|
+
gem.add_development_dependency 'rspec-rails', '~> 5.0'
|
27
|
+
gem.add_development_dependency 'rubocop', '= 1.3.1'
|
28
|
+
gem.add_development_dependency 'webmock', '~> 3.7'
|
29
|
+
|
30
|
+
# Functional (optional) dependencies
|
19
31
|
gem.add_development_dependency 'lograge', '~> 0.11.2'
|
20
|
-
gem.add_development_dependency '
|
32
|
+
gem.add_development_dependency 'ougai', '~> 2.0'
|
21
33
|
gem.add_development_dependency 'rails', '~> 6.0'
|
22
|
-
gem.add_development_dependency
|
23
|
-
gem.add_development_dependency 'rspec', '~> 3.9', '>= 3.9.0'
|
24
|
-
gem.add_development_dependency 'rspec-rails', '~> 3.9'
|
25
|
-
gem.add_development_dependency 'rubocop', '~> 0.75', '>= 0.75.0'
|
26
|
-
gem.add_development_dependency 'rubocop-rspec', '~> 1.36', '>= 0.36.0'
|
34
|
+
gem.add_development_dependency 'request_store_rails', '~> 2.0'
|
27
35
|
gem.add_development_dependency 'sidekiq', '~> 6.0'
|
28
36
|
end
|
data/lib/getaround_utils.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'logger'
|
2
4
|
module GetaroundUtils; end
|
3
5
|
module GetaroundUtils::Mixins; end
|
@@ -15,7 +17,7 @@ module GetaroundUtils::Mixins::Loggable
|
|
15
17
|
end
|
16
18
|
|
17
19
|
def loggable_logger_fallback
|
18
|
-
@loggable_logger_fallback ||= Logger.new(
|
20
|
+
@loggable_logger_fallback ||= Logger.new($stdout)
|
19
21
|
end
|
20
22
|
|
21
23
|
def loggable_logger
|
@@ -12,6 +12,6 @@ class GetaroundUtils::Ougai::DeepKeyValueFormatter < Ougai::Formatters::Base
|
|
12
12
|
data[:message] = message if message != 'No message'
|
13
13
|
|
14
14
|
payload = { severity: severity, progname: progname }.merge(data).compact
|
15
|
-
GetaroundUtils::Utils::DeepKeyValue.serialize(payload)
|
15
|
+
"#{GetaroundUtils::Utils::DeepKeyValue.serialize(payload)}\n"
|
16
16
|
end
|
17
17
|
end
|
@@ -16,8 +16,27 @@ class GetaroundUtils::Railties::Lograge < Rails::Railtie
|
|
16
16
|
payload[:lograge][:remote_ip] = request.remote_ip
|
17
17
|
payload[:lograge][:user_agent] = request.user_agent
|
18
18
|
payload[:lograge][:referer] = request.referer
|
19
|
-
payload[:lograge][:session_id] = session.is_a?(Hash) ? session[:id] : session.id if defined?(session)
|
19
|
+
payload[:lograge][:session_id] = session.is_a?(Hash) ? session[:id] : session.id.to_s if defined?(session)
|
20
20
|
payload[:lograge][:user_id] = current_user&.id if defined?(current_user)
|
21
|
+
payload[:lograge][:origin] = 'lograge'
|
22
|
+
|
23
|
+
if defined?(NewRelic::Agent::Tracer)
|
24
|
+
if span_id = NewRelic::Agent::Tracer.span_id
|
25
|
+
payload[:lograge]['span.id'] = span_id
|
26
|
+
end
|
27
|
+
if trace_id = NewRelic::Agent::Tracer.trace_id
|
28
|
+
payload[:lograge]['trace.id'] = trace_id
|
29
|
+
end
|
30
|
+
payload[:lograge]['entity.type'] = 'SERVICE'
|
31
|
+
payload[:lograge]['entity.guid'] = NewRelic::Agent.config[:entity_guid]
|
32
|
+
payload[:lograge]['entity.name'] = NewRelic::Agent.config[:app_name]&.first
|
33
|
+
end
|
34
|
+
|
35
|
+
if defined?(NewRelic::Agent::Hostname)
|
36
|
+
payload[:lograge]['hostname'] = NewRelic::Agent::Hostname.get
|
37
|
+
end
|
38
|
+
|
39
|
+
nil
|
21
40
|
end
|
22
41
|
end
|
23
42
|
|
@@ -34,6 +53,6 @@ class GetaroundUtils::Railties::Lograge < Rails::Railtie
|
|
34
53
|
event.payload[:lograge]
|
35
54
|
}
|
36
55
|
config.lograge.before_format = ->(data, _) {
|
37
|
-
data.except(*HTTP_PARAMS).
|
56
|
+
data.except(*HTTP_PARAMS).deep_merge(http: data.slice(*HTTP_PARAMS))
|
38
57
|
}
|
39
58
|
end
|
@@ -44,7 +44,7 @@ class OugaiRequestStoreMiddleware
|
|
44
44
|
end
|
45
45
|
|
46
46
|
class GetaroundUtils::Railties::Ougai < Rails::Railtie
|
47
|
-
config.ougai_logger = OugaiRailsLogger.new(
|
47
|
+
config.ougai_logger = OugaiRailsLogger.new($stdout)
|
48
48
|
config.ougai_logger.after_initialize if Rails::VERSION::MAJOR < 6
|
49
49
|
config.ougai_logger.formatter = GetaroundUtils::Ougai::JsonFormatter.new
|
50
50
|
config.ougai_logger.before_log = lambda do |data|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: getaround_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Drivy
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-03-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -29,152 +29,162 @@ dependencies:
|
|
29
29
|
name: getaround-rubocop
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - '='
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 0.2.3
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - '='
|
33
40
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0.
|
41
|
+
version: 0.2.3
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: pry
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
35
46
|
- - "~>"
|
36
47
|
- !ruby/object:Gem::Version
|
37
|
-
version: 0.
|
48
|
+
version: 0.14.0
|
38
49
|
type: :development
|
39
50
|
prerelease: false
|
40
51
|
version_requirements: !ruby/object:Gem::Requirement
|
41
52
|
requirements:
|
42
|
-
- - ">="
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
version: 0.1.0
|
45
53
|
- - "~>"
|
46
54
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
55
|
+
version: 0.14.0
|
48
56
|
- !ruby/object:Gem::Dependency
|
49
|
-
name:
|
57
|
+
name: rake
|
50
58
|
requirement: !ruby/object:Gem::Requirement
|
51
59
|
requirements:
|
52
60
|
- - "~>"
|
53
61
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0
|
62
|
+
version: '13.0'
|
55
63
|
type: :development
|
56
64
|
prerelease: false
|
57
65
|
version_requirements: !ruby/object:Gem::Requirement
|
58
66
|
requirements:
|
59
67
|
- - "~>"
|
60
68
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0
|
69
|
+
version: '13.0'
|
62
70
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
71
|
+
name: rspec
|
64
72
|
requirement: !ruby/object:Gem::Requirement
|
65
73
|
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 3.9.0
|
66
77
|
- - "~>"
|
67
78
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
79
|
+
version: '3.9'
|
69
80
|
type: :development
|
70
81
|
prerelease: false
|
71
82
|
version_requirements: !ruby/object:Gem::Requirement
|
72
83
|
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: 3.9.0
|
73
87
|
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
89
|
+
version: '3.9'
|
76
90
|
- !ruby/object:Gem::Dependency
|
77
|
-
name: rails
|
91
|
+
name: rspec-rails
|
78
92
|
requirement: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
94
|
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
96
|
+
version: '5.0'
|
83
97
|
type: :development
|
84
98
|
prerelease: false
|
85
99
|
version_requirements: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
101
|
- - "~>"
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
103
|
+
version: '5.0'
|
90
104
|
- !ruby/object:Gem::Dependency
|
91
|
-
name:
|
105
|
+
name: rubocop
|
106
|
+
requirement: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.3.1
|
111
|
+
type: :development
|
112
|
+
prerelease: false
|
113
|
+
version_requirements: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 1.3.1
|
118
|
+
- !ruby/object:Gem::Dependency
|
119
|
+
name: webmock
|
92
120
|
requirement: !ruby/object:Gem::Requirement
|
93
121
|
requirements:
|
94
122
|
- - "~>"
|
95
123
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
124
|
+
version: '3.7'
|
97
125
|
type: :development
|
98
126
|
prerelease: false
|
99
127
|
version_requirements: !ruby/object:Gem::Requirement
|
100
128
|
requirements:
|
101
129
|
- - "~>"
|
102
130
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
131
|
+
version: '3.7'
|
104
132
|
- !ruby/object:Gem::Dependency
|
105
|
-
name:
|
133
|
+
name: lograge
|
106
134
|
requirement: !ruby/object:Gem::Requirement
|
107
135
|
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 3.9.0
|
111
136
|
- - "~>"
|
112
137
|
- !ruby/object:Gem::Version
|
113
|
-
version:
|
138
|
+
version: 0.11.2
|
114
139
|
type: :development
|
115
140
|
prerelease: false
|
116
141
|
version_requirements: !ruby/object:Gem::Requirement
|
117
142
|
requirements:
|
118
|
-
- - ">="
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
version: 3.9.0
|
121
143
|
- - "~>"
|
122
144
|
- !ruby/object:Gem::Version
|
123
|
-
version:
|
145
|
+
version: 0.11.2
|
124
146
|
- !ruby/object:Gem::Dependency
|
125
|
-
name:
|
147
|
+
name: ougai
|
126
148
|
requirement: !ruby/object:Gem::Requirement
|
127
149
|
requirements:
|
128
150
|
- - "~>"
|
129
151
|
- !ruby/object:Gem::Version
|
130
|
-
version: '
|
152
|
+
version: '2.0'
|
131
153
|
type: :development
|
132
154
|
prerelease: false
|
133
155
|
version_requirements: !ruby/object:Gem::Requirement
|
134
156
|
requirements:
|
135
157
|
- - "~>"
|
136
158
|
- !ruby/object:Gem::Version
|
137
|
-
version: '
|
159
|
+
version: '2.0'
|
138
160
|
- !ruby/object:Gem::Dependency
|
139
|
-
name:
|
161
|
+
name: rails
|
140
162
|
requirement: !ruby/object:Gem::Requirement
|
141
163
|
requirements:
|
142
|
-
- - ">="
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
version: 0.75.0
|
145
164
|
- - "~>"
|
146
165
|
- !ruby/object:Gem::Version
|
147
|
-
version: '0
|
166
|
+
version: '6.0'
|
148
167
|
type: :development
|
149
168
|
prerelease: false
|
150
169
|
version_requirements: !ruby/object:Gem::Requirement
|
151
170
|
requirements:
|
152
|
-
- - ">="
|
153
|
-
- !ruby/object:Gem::Version
|
154
|
-
version: 0.75.0
|
155
171
|
- - "~>"
|
156
172
|
- !ruby/object:Gem::Version
|
157
|
-
version: '0
|
173
|
+
version: '6.0'
|
158
174
|
- !ruby/object:Gem::Dependency
|
159
|
-
name:
|
175
|
+
name: request_store_rails
|
160
176
|
requirement: !ruby/object:Gem::Requirement
|
161
177
|
requirements:
|
162
|
-
- - ">="
|
163
|
-
- !ruby/object:Gem::Version
|
164
|
-
version: 0.36.0
|
165
178
|
- - "~>"
|
166
179
|
- !ruby/object:Gem::Version
|
167
|
-
version: '
|
180
|
+
version: '2.0'
|
168
181
|
type: :development
|
169
182
|
prerelease: false
|
170
183
|
version_requirements: !ruby/object:Gem::Requirement
|
171
184
|
requirements:
|
172
|
-
- - ">="
|
173
|
-
- !ruby/object:Gem::Version
|
174
|
-
version: 0.36.0
|
175
185
|
- - "~>"
|
176
186
|
- !ruby/object:Gem::Version
|
177
|
-
version: '
|
187
|
+
version: '2.0'
|
178
188
|
- !ruby/object:Gem::Dependency
|
179
189
|
name: sidekiq
|
180
190
|
requirement: !ruby/object:Gem::Requirement
|
@@ -225,7 +235,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
225
235
|
requirements:
|
226
236
|
- - ">="
|
227
237
|
- !ruby/object:Gem::Version
|
228
|
-
version: '
|
238
|
+
version: '2.6'
|
229
239
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
230
240
|
requirements:
|
231
241
|
- - ">="
|