rails_api_logger 0.9.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +6 -0
- data/.semaphore/semaphore.yml +132 -2
- data/.standard.yml +2 -0
- data/Appraisals +31 -0
- data/CHANGELOG.md +62 -3
- data/README.md +90 -53
- data/Rakefile +7 -2
- data/app/middlewares/rails_api_logger/middleware.rb +80 -0
- data/app/models/rails_api_logger/inbound_request_log.rb +5 -0
- data/app/models/rails_api_logger/loggable.rb +27 -0
- data/app/models/rails_api_logger/logger.rb +22 -0
- data/app/models/rails_api_logger/outbound_request_log.rb +5 -0
- data/app/models/rails_api_logger/request_log.rb +85 -0
- data/bin/rails +16 -0
- data/gemfiles/rails_6.1.gemfile +10 -0
- data/gemfiles/rails_6.1.gemfile.lock +240 -0
- data/gemfiles/rails_7.0.gemfile +10 -0
- data/gemfiles/rails_7.0.gemfile.lock +239 -0
- data/gemfiles/rails_7.1.gemfile +9 -0
- data/gemfiles/rails_7.1.gemfile.lock +272 -0
- data/gemfiles/rails_7.2.gemfile +9 -0
- data/gemfiles/rails_7.2.gemfile.lock +272 -0
- data/gemfiles/rails_8.0.gemfile +9 -0
- data/lib/generators/rails_api_logger/install_generator.rb +1 -1
- data/lib/rails_api_logger/engine.rb +25 -0
- data/lib/rails_api_logger/version.rb +5 -0
- data/lib/rails_api_logger.rb +9 -27
- data/rails_api_logger.gemspec +10 -6
- metadata +58 -29
- data/CODE_OF_CONDUCT.md +0 -74
- data/lib/rails_api_logger/inbound_request_log.rb +0 -2
- data/lib/rails_api_logger/inbound_requests_logger_middleware.rb +0 -71
- data/lib/rails_api_logger/outbound_request_log.rb +0 -2
- data/lib/rails_api_logger/request_log.rb +0 -76
- /data/{lib/rails_api_logger → app/controllers}/inbound_requests_logger.rb +0 -0
@@ -0,0 +1,272 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
rails_api_logger (0.10.1)
|
5
|
+
activejob (>= 6.0)
|
6
|
+
activerecord (>= 6.0)
|
7
|
+
nokogiri
|
8
|
+
railties (>= 6.0)
|
9
|
+
zeitwerk (>= 2.0.0)
|
10
|
+
|
11
|
+
GEM
|
12
|
+
remote: https://rubygems.org/
|
13
|
+
specs:
|
14
|
+
actioncable (7.1.3.4)
|
15
|
+
actionpack (= 7.1.3.4)
|
16
|
+
activesupport (= 7.1.3.4)
|
17
|
+
nio4r (~> 2.0)
|
18
|
+
websocket-driver (>= 0.6.1)
|
19
|
+
zeitwerk (~> 2.6)
|
20
|
+
actionmailbox (7.1.3.4)
|
21
|
+
actionpack (= 7.1.3.4)
|
22
|
+
activejob (= 7.1.3.4)
|
23
|
+
activerecord (= 7.1.3.4)
|
24
|
+
activestorage (= 7.1.3.4)
|
25
|
+
activesupport (= 7.1.3.4)
|
26
|
+
mail (>= 2.7.1)
|
27
|
+
net-imap
|
28
|
+
net-pop
|
29
|
+
net-smtp
|
30
|
+
actionmailer (7.1.3.4)
|
31
|
+
actionpack (= 7.1.3.4)
|
32
|
+
actionview (= 7.1.3.4)
|
33
|
+
activejob (= 7.1.3.4)
|
34
|
+
activesupport (= 7.1.3.4)
|
35
|
+
mail (~> 2.5, >= 2.5.4)
|
36
|
+
net-imap
|
37
|
+
net-pop
|
38
|
+
net-smtp
|
39
|
+
rails-dom-testing (~> 2.2)
|
40
|
+
actionpack (7.1.3.4)
|
41
|
+
actionview (= 7.1.3.4)
|
42
|
+
activesupport (= 7.1.3.4)
|
43
|
+
nokogiri (>= 1.8.5)
|
44
|
+
racc
|
45
|
+
rack (>= 2.2.4)
|
46
|
+
rack-session (>= 1.0.1)
|
47
|
+
rack-test (>= 0.6.3)
|
48
|
+
rails-dom-testing (~> 2.2)
|
49
|
+
rails-html-sanitizer (~> 1.6)
|
50
|
+
actiontext (7.1.3.4)
|
51
|
+
actionpack (= 7.1.3.4)
|
52
|
+
activerecord (= 7.1.3.4)
|
53
|
+
activestorage (= 7.1.3.4)
|
54
|
+
activesupport (= 7.1.3.4)
|
55
|
+
globalid (>= 0.6.0)
|
56
|
+
nokogiri (>= 1.8.5)
|
57
|
+
actionview (7.1.3.4)
|
58
|
+
activesupport (= 7.1.3.4)
|
59
|
+
builder (~> 3.1)
|
60
|
+
erubi (~> 1.11)
|
61
|
+
rails-dom-testing (~> 2.2)
|
62
|
+
rails-html-sanitizer (~> 1.6)
|
63
|
+
activejob (7.1.3.4)
|
64
|
+
activesupport (= 7.1.3.4)
|
65
|
+
globalid (>= 0.3.6)
|
66
|
+
activemodel (7.1.3.4)
|
67
|
+
activesupport (= 7.1.3.4)
|
68
|
+
activerecord (7.1.3.4)
|
69
|
+
activemodel (= 7.1.3.4)
|
70
|
+
activesupport (= 7.1.3.4)
|
71
|
+
timeout (>= 0.4.0)
|
72
|
+
activestorage (7.1.3.4)
|
73
|
+
actionpack (= 7.1.3.4)
|
74
|
+
activejob (= 7.1.3.4)
|
75
|
+
activerecord (= 7.1.3.4)
|
76
|
+
activesupport (= 7.1.3.4)
|
77
|
+
marcel (~> 1.0)
|
78
|
+
activesupport (7.1.3.4)
|
79
|
+
base64
|
80
|
+
bigdecimal
|
81
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
82
|
+
connection_pool (>= 2.2.5)
|
83
|
+
drb
|
84
|
+
i18n (>= 1.6, < 2)
|
85
|
+
minitest (>= 5.1)
|
86
|
+
mutex_m
|
87
|
+
tzinfo (~> 2.0)
|
88
|
+
appraisal (2.5.0)
|
89
|
+
bundler
|
90
|
+
rake
|
91
|
+
thor (>= 0.14.0)
|
92
|
+
ast (2.4.2)
|
93
|
+
base64 (0.2.0)
|
94
|
+
bigdecimal (3.1.9)
|
95
|
+
builder (3.3.0)
|
96
|
+
concurrent-ruby (1.3.5)
|
97
|
+
connection_pool (2.5.0)
|
98
|
+
crass (1.0.6)
|
99
|
+
date (3.4.1)
|
100
|
+
diff-lcs (1.6.0)
|
101
|
+
drb (2.2.1)
|
102
|
+
erubi (1.13.1)
|
103
|
+
globalid (1.2.1)
|
104
|
+
activesupport (>= 6.1)
|
105
|
+
i18n (1.14.7)
|
106
|
+
concurrent-ruby (~> 1.0)
|
107
|
+
io-console (0.8.0)
|
108
|
+
irb (1.15.1)
|
109
|
+
pp (>= 0.6.0)
|
110
|
+
rdoc (>= 4.0.0)
|
111
|
+
reline (>= 0.4.2)
|
112
|
+
json (2.10.1)
|
113
|
+
language_server-protocol (3.17.0.4)
|
114
|
+
lint_roller (1.1.0)
|
115
|
+
loofah (2.24.0)
|
116
|
+
crass (~> 1.0.2)
|
117
|
+
nokogiri (>= 1.12.0)
|
118
|
+
mail (2.8.1)
|
119
|
+
mini_mime (>= 0.1.1)
|
120
|
+
net-imap
|
121
|
+
net-pop
|
122
|
+
net-smtp
|
123
|
+
marcel (1.0.4)
|
124
|
+
mini_mime (1.1.5)
|
125
|
+
minitest (5.25.4)
|
126
|
+
mutex_m (0.2.0)
|
127
|
+
mysql2 (0.5.6)
|
128
|
+
net-imap (0.5.6)
|
129
|
+
date
|
130
|
+
net-protocol
|
131
|
+
net-pop (0.1.2)
|
132
|
+
net-protocol
|
133
|
+
net-protocol (0.2.2)
|
134
|
+
timeout
|
135
|
+
net-smtp (0.5.1)
|
136
|
+
net-protocol
|
137
|
+
nio4r (2.7.4)
|
138
|
+
nokogiri (1.18.2-arm64-darwin)
|
139
|
+
racc (~> 1.4)
|
140
|
+
parallel (1.26.3)
|
141
|
+
parser (3.3.7.1)
|
142
|
+
ast (~> 2.4.1)
|
143
|
+
racc
|
144
|
+
pg (1.5.9)
|
145
|
+
pp (0.6.2)
|
146
|
+
prettyprint
|
147
|
+
prettyprint (0.2.0)
|
148
|
+
psych (5.2.3)
|
149
|
+
date
|
150
|
+
stringio
|
151
|
+
racc (1.8.1)
|
152
|
+
rack (3.1.10)
|
153
|
+
rack-session (2.1.0)
|
154
|
+
base64 (>= 0.1.0)
|
155
|
+
rack (>= 3.0.0)
|
156
|
+
rack-test (2.2.0)
|
157
|
+
rack (>= 1.3)
|
158
|
+
rackup (2.2.1)
|
159
|
+
rack (>= 3)
|
160
|
+
rails (7.1.3.4)
|
161
|
+
actioncable (= 7.1.3.4)
|
162
|
+
actionmailbox (= 7.1.3.4)
|
163
|
+
actionmailer (= 7.1.3.4)
|
164
|
+
actionpack (= 7.1.3.4)
|
165
|
+
actiontext (= 7.1.3.4)
|
166
|
+
actionview (= 7.1.3.4)
|
167
|
+
activejob (= 7.1.3.4)
|
168
|
+
activemodel (= 7.1.3.4)
|
169
|
+
activerecord (= 7.1.3.4)
|
170
|
+
activestorage (= 7.1.3.4)
|
171
|
+
activesupport (= 7.1.3.4)
|
172
|
+
bundler (>= 1.15.0)
|
173
|
+
railties (= 7.1.3.4)
|
174
|
+
rails-dom-testing (2.2.0)
|
175
|
+
activesupport (>= 5.0.0)
|
176
|
+
minitest
|
177
|
+
nokogiri (>= 1.6)
|
178
|
+
rails-html-sanitizer (1.6.2)
|
179
|
+
loofah (~> 2.21)
|
180
|
+
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
181
|
+
railties (7.1.3.4)
|
182
|
+
actionpack (= 7.1.3.4)
|
183
|
+
activesupport (= 7.1.3.4)
|
184
|
+
irb
|
185
|
+
rackup (>= 1.0.0)
|
186
|
+
rake (>= 12.2)
|
187
|
+
thor (~> 1.0, >= 1.2.2)
|
188
|
+
zeitwerk (~> 2.6)
|
189
|
+
rainbow (3.1.1)
|
190
|
+
rake (12.3.3)
|
191
|
+
rdoc (6.12.0)
|
192
|
+
psych (>= 4.0.0)
|
193
|
+
regexp_parser (2.10.0)
|
194
|
+
reline (0.6.0)
|
195
|
+
io-console (~> 0.5)
|
196
|
+
rspec-core (3.13.3)
|
197
|
+
rspec-support (~> 3.13.0)
|
198
|
+
rspec-expectations (3.13.3)
|
199
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
200
|
+
rspec-support (~> 3.13.0)
|
201
|
+
rspec-mocks (3.13.2)
|
202
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
203
|
+
rspec-support (~> 3.13.0)
|
204
|
+
rspec-rails (7.1.1)
|
205
|
+
actionpack (>= 7.0)
|
206
|
+
activesupport (>= 7.0)
|
207
|
+
railties (>= 7.0)
|
208
|
+
rspec-core (~> 3.13)
|
209
|
+
rspec-expectations (~> 3.13)
|
210
|
+
rspec-mocks (~> 3.13)
|
211
|
+
rspec-support (~> 3.13)
|
212
|
+
rspec-support (3.13.2)
|
213
|
+
rubocop (1.71.2)
|
214
|
+
json (~> 2.3)
|
215
|
+
language_server-protocol (>= 3.17.0)
|
216
|
+
parallel (~> 1.10)
|
217
|
+
parser (>= 3.3.0.2)
|
218
|
+
rainbow (>= 2.2.2, < 4.0)
|
219
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
220
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
221
|
+
ruby-progressbar (~> 1.7)
|
222
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
223
|
+
rubocop-ast (1.38.0)
|
224
|
+
parser (>= 3.3.1.0)
|
225
|
+
rubocop-performance (1.23.1)
|
226
|
+
rubocop (>= 1.48.1, < 2.0)
|
227
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
228
|
+
ruby-progressbar (1.13.0)
|
229
|
+
sqlite3 (1.7.3-arm64-darwin)
|
230
|
+
standard (1.45.0)
|
231
|
+
language_server-protocol (~> 3.17.0.2)
|
232
|
+
lint_roller (~> 1.0)
|
233
|
+
rubocop (~> 1.71.0)
|
234
|
+
standard-custom (~> 1.0.0)
|
235
|
+
standard-performance (~> 1.6)
|
236
|
+
standard-custom (1.0.2)
|
237
|
+
lint_roller (~> 1.0)
|
238
|
+
rubocop (~> 1.50)
|
239
|
+
standard-performance (1.6.0)
|
240
|
+
lint_roller (~> 1.1)
|
241
|
+
rubocop-performance (~> 1.23.0)
|
242
|
+
stringio (3.1.3)
|
243
|
+
thor (1.3.2)
|
244
|
+
timeout (0.4.3)
|
245
|
+
tzinfo (2.0.6)
|
246
|
+
concurrent-ruby (~> 1.0)
|
247
|
+
unicode-display_width (3.1.4)
|
248
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
249
|
+
unicode-emoji (4.0.4)
|
250
|
+
websocket-driver (0.7.7)
|
251
|
+
base64
|
252
|
+
websocket-extensions (>= 0.1.0)
|
253
|
+
websocket-extensions (0.1.5)
|
254
|
+
zeitwerk (2.6.18)
|
255
|
+
|
256
|
+
PLATFORMS
|
257
|
+
arm64-darwin
|
258
|
+
|
259
|
+
DEPENDENCIES
|
260
|
+
appraisal (~> 2.5)
|
261
|
+
mysql2 (~> 0.5.6)
|
262
|
+
pg (~> 1.5.4)
|
263
|
+
rack
|
264
|
+
rails (~> 7.1.0)
|
265
|
+
rails_api_logger!
|
266
|
+
rake (~> 12.0)
|
267
|
+
rspec-rails (~> 7.1.0)
|
268
|
+
sqlite3 (~> 1.7.3)
|
269
|
+
standard (~> 1.31)
|
270
|
+
|
271
|
+
BUNDLED WITH
|
272
|
+
2.5.4
|
@@ -0,0 +1,272 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
rails_api_logger (0.10.0)
|
5
|
+
activejob (>= 6.0)
|
6
|
+
activerecord (>= 6.0)
|
7
|
+
nokogiri
|
8
|
+
railties (>= 6.0)
|
9
|
+
zeitwerk (>= 2.0.0)
|
10
|
+
|
11
|
+
GEM
|
12
|
+
remote: https://rubygems.org/
|
13
|
+
specs:
|
14
|
+
actioncable (7.2.2.1)
|
15
|
+
actionpack (= 7.2.2.1)
|
16
|
+
activesupport (= 7.2.2.1)
|
17
|
+
nio4r (~> 2.0)
|
18
|
+
websocket-driver (>= 0.6.1)
|
19
|
+
zeitwerk (~> 2.6)
|
20
|
+
actionmailbox (7.2.2.1)
|
21
|
+
actionpack (= 7.2.2.1)
|
22
|
+
activejob (= 7.2.2.1)
|
23
|
+
activerecord (= 7.2.2.1)
|
24
|
+
activestorage (= 7.2.2.1)
|
25
|
+
activesupport (= 7.2.2.1)
|
26
|
+
mail (>= 2.8.0)
|
27
|
+
actionmailer (7.2.2.1)
|
28
|
+
actionpack (= 7.2.2.1)
|
29
|
+
actionview (= 7.2.2.1)
|
30
|
+
activejob (= 7.2.2.1)
|
31
|
+
activesupport (= 7.2.2.1)
|
32
|
+
mail (>= 2.8.0)
|
33
|
+
rails-dom-testing (~> 2.2)
|
34
|
+
actionpack (7.2.2.1)
|
35
|
+
actionview (= 7.2.2.1)
|
36
|
+
activesupport (= 7.2.2.1)
|
37
|
+
nokogiri (>= 1.8.5)
|
38
|
+
racc
|
39
|
+
rack (>= 2.2.4, < 3.2)
|
40
|
+
rack-session (>= 1.0.1)
|
41
|
+
rack-test (>= 0.6.3)
|
42
|
+
rails-dom-testing (~> 2.2)
|
43
|
+
rails-html-sanitizer (~> 1.6)
|
44
|
+
useragent (~> 0.16)
|
45
|
+
actiontext (7.2.2.1)
|
46
|
+
actionpack (= 7.2.2.1)
|
47
|
+
activerecord (= 7.2.2.1)
|
48
|
+
activestorage (= 7.2.2.1)
|
49
|
+
activesupport (= 7.2.2.1)
|
50
|
+
globalid (>= 0.6.0)
|
51
|
+
nokogiri (>= 1.8.5)
|
52
|
+
actionview (7.2.2.1)
|
53
|
+
activesupport (= 7.2.2.1)
|
54
|
+
builder (~> 3.1)
|
55
|
+
erubi (~> 1.11)
|
56
|
+
rails-dom-testing (~> 2.2)
|
57
|
+
rails-html-sanitizer (~> 1.6)
|
58
|
+
activejob (7.2.2.1)
|
59
|
+
activesupport (= 7.2.2.1)
|
60
|
+
globalid (>= 0.3.6)
|
61
|
+
activemodel (7.2.2.1)
|
62
|
+
activesupport (= 7.2.2.1)
|
63
|
+
activerecord (7.2.2.1)
|
64
|
+
activemodel (= 7.2.2.1)
|
65
|
+
activesupport (= 7.2.2.1)
|
66
|
+
timeout (>= 0.4.0)
|
67
|
+
activestorage (7.2.2.1)
|
68
|
+
actionpack (= 7.2.2.1)
|
69
|
+
activejob (= 7.2.2.1)
|
70
|
+
activerecord (= 7.2.2.1)
|
71
|
+
activesupport (= 7.2.2.1)
|
72
|
+
marcel (~> 1.0)
|
73
|
+
activesupport (7.2.2.1)
|
74
|
+
base64
|
75
|
+
benchmark (>= 0.3)
|
76
|
+
bigdecimal
|
77
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
78
|
+
connection_pool (>= 2.2.5)
|
79
|
+
drb
|
80
|
+
i18n (>= 1.6, < 2)
|
81
|
+
logger (>= 1.4.2)
|
82
|
+
minitest (>= 5.1)
|
83
|
+
securerandom (>= 0.3)
|
84
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
85
|
+
appraisal (2.5.0)
|
86
|
+
bundler
|
87
|
+
rake
|
88
|
+
thor (>= 0.14.0)
|
89
|
+
ast (2.4.2)
|
90
|
+
base64 (0.2.0)
|
91
|
+
benchmark (0.4.0)
|
92
|
+
bigdecimal (3.1.9)
|
93
|
+
builder (3.3.0)
|
94
|
+
concurrent-ruby (1.3.5)
|
95
|
+
connection_pool (2.5.0)
|
96
|
+
crass (1.0.6)
|
97
|
+
date (3.4.1)
|
98
|
+
diff-lcs (1.6.0)
|
99
|
+
drb (2.2.1)
|
100
|
+
erubi (1.13.1)
|
101
|
+
globalid (1.2.1)
|
102
|
+
activesupport (>= 6.1)
|
103
|
+
i18n (1.14.7)
|
104
|
+
concurrent-ruby (~> 1.0)
|
105
|
+
io-console (0.8.0)
|
106
|
+
irb (1.15.1)
|
107
|
+
pp (>= 0.6.0)
|
108
|
+
rdoc (>= 4.0.0)
|
109
|
+
reline (>= 0.4.2)
|
110
|
+
json (2.10.1)
|
111
|
+
language_server-protocol (3.17.0.4)
|
112
|
+
lint_roller (1.1.0)
|
113
|
+
logger (1.6.6)
|
114
|
+
loofah (2.24.0)
|
115
|
+
crass (~> 1.0.2)
|
116
|
+
nokogiri (>= 1.12.0)
|
117
|
+
mail (2.8.1)
|
118
|
+
mini_mime (>= 0.1.1)
|
119
|
+
net-imap
|
120
|
+
net-pop
|
121
|
+
net-smtp
|
122
|
+
marcel (1.0.4)
|
123
|
+
mini_mime (1.1.5)
|
124
|
+
minitest (5.25.4)
|
125
|
+
mysql2 (0.5.6)
|
126
|
+
net-imap (0.5.6)
|
127
|
+
date
|
128
|
+
net-protocol
|
129
|
+
net-pop (0.1.2)
|
130
|
+
net-protocol
|
131
|
+
net-protocol (0.2.2)
|
132
|
+
timeout
|
133
|
+
net-smtp (0.5.1)
|
134
|
+
net-protocol
|
135
|
+
nio4r (2.7.4)
|
136
|
+
nokogiri (1.18.2-arm64-darwin)
|
137
|
+
racc (~> 1.4)
|
138
|
+
parallel (1.26.3)
|
139
|
+
parser (3.3.7.1)
|
140
|
+
ast (~> 2.4.1)
|
141
|
+
racc
|
142
|
+
pg (1.5.9)
|
143
|
+
pp (0.6.2)
|
144
|
+
prettyprint
|
145
|
+
prettyprint (0.2.0)
|
146
|
+
psych (5.2.3)
|
147
|
+
date
|
148
|
+
stringio
|
149
|
+
racc (1.8.1)
|
150
|
+
rack (3.1.10)
|
151
|
+
rack-session (2.1.0)
|
152
|
+
base64 (>= 0.1.0)
|
153
|
+
rack (>= 3.0.0)
|
154
|
+
rack-test (2.2.0)
|
155
|
+
rack (>= 1.3)
|
156
|
+
rackup (2.2.1)
|
157
|
+
rack (>= 3)
|
158
|
+
rails (7.2.2.1)
|
159
|
+
actioncable (= 7.2.2.1)
|
160
|
+
actionmailbox (= 7.2.2.1)
|
161
|
+
actionmailer (= 7.2.2.1)
|
162
|
+
actionpack (= 7.2.2.1)
|
163
|
+
actiontext (= 7.2.2.1)
|
164
|
+
actionview (= 7.2.2.1)
|
165
|
+
activejob (= 7.2.2.1)
|
166
|
+
activemodel (= 7.2.2.1)
|
167
|
+
activerecord (= 7.2.2.1)
|
168
|
+
activestorage (= 7.2.2.1)
|
169
|
+
activesupport (= 7.2.2.1)
|
170
|
+
bundler (>= 1.15.0)
|
171
|
+
railties (= 7.2.2.1)
|
172
|
+
rails-dom-testing (2.2.0)
|
173
|
+
activesupport (>= 5.0.0)
|
174
|
+
minitest
|
175
|
+
nokogiri (>= 1.6)
|
176
|
+
rails-html-sanitizer (1.6.2)
|
177
|
+
loofah (~> 2.21)
|
178
|
+
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
179
|
+
railties (7.2.2.1)
|
180
|
+
actionpack (= 7.2.2.1)
|
181
|
+
activesupport (= 7.2.2.1)
|
182
|
+
irb (~> 1.13)
|
183
|
+
rackup (>= 1.0.0)
|
184
|
+
rake (>= 12.2)
|
185
|
+
thor (~> 1.0, >= 1.2.2)
|
186
|
+
zeitwerk (~> 2.6)
|
187
|
+
rainbow (3.1.1)
|
188
|
+
rake (12.3.3)
|
189
|
+
rdoc (6.12.0)
|
190
|
+
psych (>= 4.0.0)
|
191
|
+
regexp_parser (2.10.0)
|
192
|
+
reline (0.6.0)
|
193
|
+
io-console (~> 0.5)
|
194
|
+
rspec-core (3.13.3)
|
195
|
+
rspec-support (~> 3.13.0)
|
196
|
+
rspec-expectations (3.13.3)
|
197
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
198
|
+
rspec-support (~> 3.13.0)
|
199
|
+
rspec-mocks (3.13.2)
|
200
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
201
|
+
rspec-support (~> 3.13.0)
|
202
|
+
rspec-rails (7.1.1)
|
203
|
+
actionpack (>= 7.0)
|
204
|
+
activesupport (>= 7.0)
|
205
|
+
railties (>= 7.0)
|
206
|
+
rspec-core (~> 3.13)
|
207
|
+
rspec-expectations (~> 3.13)
|
208
|
+
rspec-mocks (~> 3.13)
|
209
|
+
rspec-support (~> 3.13)
|
210
|
+
rspec-support (3.13.2)
|
211
|
+
rubocop (1.71.2)
|
212
|
+
json (~> 2.3)
|
213
|
+
language_server-protocol (>= 3.17.0)
|
214
|
+
parallel (~> 1.10)
|
215
|
+
parser (>= 3.3.0.2)
|
216
|
+
rainbow (>= 2.2.2, < 4.0)
|
217
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
218
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
219
|
+
ruby-progressbar (~> 1.7)
|
220
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
221
|
+
rubocop-ast (1.38.0)
|
222
|
+
parser (>= 3.3.1.0)
|
223
|
+
rubocop-performance (1.23.1)
|
224
|
+
rubocop (>= 1.48.1, < 2.0)
|
225
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
226
|
+
ruby-progressbar (1.13.0)
|
227
|
+
securerandom (0.4.1)
|
228
|
+
sqlite3 (1.7.3-arm64-darwin)
|
229
|
+
standard (1.45.0)
|
230
|
+
language_server-protocol (~> 3.17.0.2)
|
231
|
+
lint_roller (~> 1.0)
|
232
|
+
rubocop (~> 1.71.0)
|
233
|
+
standard-custom (~> 1.0.0)
|
234
|
+
standard-performance (~> 1.6)
|
235
|
+
standard-custom (1.0.2)
|
236
|
+
lint_roller (~> 1.0)
|
237
|
+
rubocop (~> 1.50)
|
238
|
+
standard-performance (1.6.0)
|
239
|
+
lint_roller (~> 1.1)
|
240
|
+
rubocop-performance (~> 1.23.0)
|
241
|
+
stringio (3.1.3)
|
242
|
+
thor (1.3.2)
|
243
|
+
timeout (0.4.3)
|
244
|
+
tzinfo (2.0.6)
|
245
|
+
concurrent-ruby (~> 1.0)
|
246
|
+
unicode-display_width (3.1.4)
|
247
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
248
|
+
unicode-emoji (4.0.4)
|
249
|
+
useragent (0.16.11)
|
250
|
+
websocket-driver (0.7.7)
|
251
|
+
base64
|
252
|
+
websocket-extensions (>= 0.1.0)
|
253
|
+
websocket-extensions (0.1.5)
|
254
|
+
zeitwerk (2.6.18)
|
255
|
+
|
256
|
+
PLATFORMS
|
257
|
+
arm64-darwin
|
258
|
+
|
259
|
+
DEPENDENCIES
|
260
|
+
appraisal (~> 2.5)
|
261
|
+
mysql2 (~> 0.5.6)
|
262
|
+
pg (~> 1.5.4)
|
263
|
+
rack
|
264
|
+
rails (~> 7.2.0)
|
265
|
+
rails_api_logger!
|
266
|
+
rake (~> 12.0)
|
267
|
+
rspec-rails (~> 7.1.0)
|
268
|
+
sqlite3 (~> 1.7.3)
|
269
|
+
standard (~> 1.31)
|
270
|
+
|
271
|
+
BUNDLED WITH
|
272
|
+
2.5.4
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module RailsApiLogger
|
2
|
+
class Engine < ::Rails::Engine
|
3
|
+
isolate_namespace RailsApiLogger
|
4
|
+
|
5
|
+
config.generators do |g|
|
6
|
+
g.test_framework :rspec
|
7
|
+
end
|
8
|
+
|
9
|
+
config.rails_api_logger = ActiveSupport::OrderedOptions.new
|
10
|
+
|
11
|
+
initializer "rails_api_logger.config" do
|
12
|
+
config.rails_api_logger.each do |name, value|
|
13
|
+
RailsApiLogger.public_send(:"#{name}=", value)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
ActiveSupport.on_load(:action_controller) do
|
18
|
+
include InboundRequestsLogger
|
19
|
+
end
|
20
|
+
|
21
|
+
ActiveSupport.on_load(:active_record) do
|
22
|
+
include RailsApiLogger::Loggable
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/rails_api_logger.rb
CHANGED
@@ -1,35 +1,17 @@
|
|
1
|
-
require "
|
1
|
+
require "rails_api_logger/version"
|
2
|
+
require "rails_api_logger/engine"
|
3
|
+
require_relative "../app/models/rails_api_logger/loggable"
|
4
|
+
require_relative "../app/middlewares/rails_api_logger/middleware"
|
5
|
+
|
6
|
+
require "rails"
|
2
7
|
require "nokogiri"
|
8
|
+
|
3
9
|
require "zeitwerk"
|
4
10
|
|
5
11
|
loader = Zeitwerk::Loader.for_gem
|
6
|
-
loader.collapse("#{__dir__}/rails_api_logger")
|
7
12
|
loader.ignore("#{__dir__}/generators")
|
8
13
|
loader.setup
|
9
14
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
def initialize(loggable = nil, skip_request_body: false, skip_response_body: false)
|
14
|
-
@loggable = loggable
|
15
|
-
@skip_request_body = skip_request_body
|
16
|
-
@skip_response_body = skip_response_body
|
17
|
-
end
|
18
|
-
|
19
|
-
def call(url, request)
|
20
|
-
log = OutboundRequestLog.from_request(request, loggable: @loggable, skip_request_body: @skip_request_body)
|
21
|
-
yield.tap do |response|
|
22
|
-
log.from_response(response, skip_response_body: @skip_response_body)
|
23
|
-
end
|
24
|
-
rescue => e
|
25
|
-
log.response_body = {error: e.message}
|
26
|
-
raise
|
27
|
-
ensure
|
28
|
-
log.ended_at = Time.current
|
29
|
-
log.save!
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
ActiveSupport.on_load(:action_controller) do
|
34
|
-
include InboundRequestsLogger
|
15
|
+
module RailsApiLogger
|
16
|
+
mattr_accessor :connects_to
|
35
17
|
end
|
data/rails_api_logger.gemspec
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
require_relative "lib/rails_api_logger/version"
|
2
|
+
|
1
3
|
Gem::Specification.new do |spec|
|
2
4
|
spec.name = "rails_api_logger"
|
3
|
-
spec.version =
|
5
|
+
spec.version = RailsApiLogger::VERSION
|
4
6
|
spec.authors = ["Alessandro Rodi"]
|
5
7
|
spec.email = ["alessandro.rodi@renuo.ch"]
|
6
8
|
|
@@ -23,16 +25,18 @@ Gem::Specification.new do |spec|
|
|
23
25
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
26
|
spec.require_paths = ["lib"]
|
25
27
|
|
26
|
-
|
27
|
-
spec.add_dependency "activerecord",
|
28
|
-
spec.add_dependency "
|
28
|
+
rails_version = ">= 6.0"
|
29
|
+
spec.add_dependency "activerecord", rails_version
|
30
|
+
spec.add_dependency "activejob", rails_version
|
31
|
+
spec.add_dependency "railties", rails_version
|
29
32
|
spec.add_dependency "nokogiri"
|
30
33
|
spec.add_dependency "zeitwerk", ">= 2.0.0"
|
31
34
|
|
32
|
-
spec.add_development_dependency "sqlite3", "~> 1.
|
35
|
+
spec.add_development_dependency "sqlite3", "~> 2.1.0"
|
33
36
|
spec.add_development_dependency "pg", "~> 1.5.4"
|
37
|
+
spec.add_development_dependency "mysql2", "~> 0.5.6"
|
34
38
|
spec.add_development_dependency "standard", "~> 1.31"
|
35
39
|
spec.add_development_dependency "rake", "~> 12.0"
|
36
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
37
40
|
spec.add_development_dependency "rack"
|
41
|
+
spec.add_development_dependency "appraisal", "~> 2.5"
|
38
42
|
end
|