lamian 1.7.0 → 1.9.0

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: 073a542c16dc4ed9aa1d8f218fc3badd5ff6ef2f9d9a6486a7d5d0fc4150a62d
4
- data.tar.gz: 0f92fcf09eb8b8dd29e7a3b1954df65d79d7c6649b42ca0102031dfaa4c18ef0
3
+ metadata.gz: 881a6090b7433a7073865fad6fbf0717e1d756f654d0be3d41d4c239d396cd81
4
+ data.tar.gz: 262e942fb2c73fbb80d42882d0fa9d8502df4067613ba5530f998659efe687b1
5
5
  SHA512:
6
- metadata.gz: 26a67981a6f64c1da4291fa10f1f0571b4d6ce897e1dafec972b97a418b3102642814bdb14dc5bff953a542f563855f0365e47e86bb1d5579191b960d0532c11
7
- data.tar.gz: 34864d1fb78aab01d1912125fd34e3a9dbd37b240fd29d894ebc6a25ee4b28dff64042176938103c624ab8793475d4b7571df322e1a82a0d5b31320774242b89
6
+ metadata.gz: '040108c81012fb27273d2a185b7cc7c2ed4563d4881908c4c50a8c54ce160f04c97a00043a9f2f3b96c0bcf63105d7a88c3bef6b94caa2970557b1e3a0f9cf51'
7
+ data.tar.gz: 6cecfa1411d0891061161577d8f60dd8052a8a6e25224c0b50f8202ba2635c6cf88aae437b4718653a257c58e9441f162c90a470c55df6f1ca8adb657467e404
@@ -44,7 +44,7 @@ jobs:
44
44
  strategy:
45
45
  fail-fast: false
46
46
  matrix:
47
- ruby: ["2.7", "3.0"]
47
+ ruby: ["3.0", "3.1", "3.2"]
48
48
 
49
49
  steps:
50
50
  - uses: actions/checkout@v2
data/Changelog.md CHANGED
@@ -1,16 +1,21 @@
1
- # Lamian version changes (since 0.1.0)
1
+ ## 1.9.0
2
2
 
3
- Update this on a pull request, under `Lamian::VERSION`
4
- (also known as next version). If this constant would be changed without release,
5
- I'll update it here too
3
+ * Add `max_log_lines` config option to limit number of most recent log lines stored in the log device
4
+
5
+ ## 1.8.0
6
+
7
+ * Minor dependency updates;
6
8
 
7
9
  ## 1.3.0
10
+
8
11
  * Add support for the (new sentry gem)[https://github.com/getsentry/sentry-ruby].
9
12
 
10
13
  ## 1.2.0
14
+
11
15
  * Add `raven_log_size_limit` config option for limiting amount of data sent to sentry (defaults to `500_000`)
12
16
 
13
17
  ## 1.1.0
18
+
14
19
  * Add support for sentry and sidekiq
15
20
 
16
21
  ## 1.0.0
@@ -27,7 +32,6 @@ which ruins concept of single entry point :(. Also tied it to lamian instance
27
32
 
28
33
  * `e57e6cec` Changed rails dependency from `~> 4.2` to `>= 4.2`
29
34
 
30
-
31
35
  ## 0.3.1
32
36
 
33
37
  * 34ca83b5 Fixed formatting
@@ -35,7 +39,6 @@ which ruins concept of single entry point :(. Also tied it to lamian instance
35
39
  Stabilized formatting api, which removes control sequences from loggers data.
36
40
  E.g. `"[23mNice, lol[0m\n"` becomes `"Nice, lol\n"`
37
41
 
38
-
39
42
  ## 0.3.0
40
43
 
41
44
  * `d24f895b` API update
@@ -43,13 +46,13 @@ E.g. `"[23mNice, lol[0m\n"` becomes `"Nice, lol\n"`
43
46
  Updated API, so lamian is now forced to be used with block.
44
47
  It also simplified usage outside a middleware
45
48
 
46
-
47
49
  ## 0.2.0
50
+
48
51
  * `3166517e` Added integrtation with rails
49
52
 
50
53
  Injected middleware before `ExceptionNotification`, so `ExceptionNotification`
51
54
  can use current log without any configuration. Also added some views
52
55
 
53
-
54
56
  ## 0.1.0
57
+
55
58
  * `62eb8685` Made test version to check it's integration with rails application
data/Gemfile CHANGED
@@ -4,3 +4,17 @@ source "https://rubygems.org"
4
4
 
5
5
  # Specify your gem's dependencies in lamian.gemspec
6
6
  gemspec
7
+
8
+ gem "bundler-audit"
9
+ gem "ci-helper"
10
+ gem "launchy"
11
+ gem "pry"
12
+ gem "rake"
13
+ gem "rspec"
14
+ gem "rubocop-config-umbrellio"
15
+ gem "semantic_logger"
16
+ gem "sentry-raven"
17
+ gem "sentry-ruby"
18
+ gem "simplecov"
19
+ gem "simplecov-lcov"
20
+ gem "yard"
data/Gemfile.lock CHANGED
@@ -1,251 +1,309 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lamian (1.7.0)
4
+ lamian (1.9.0)
5
5
  rails (>= 4.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actioncable (7.0.4)
11
- actionpack (= 7.0.4)
12
- activesupport (= 7.0.4)
10
+ actioncable (7.1.3.4)
11
+ actionpack (= 7.1.3.4)
12
+ activesupport (= 7.1.3.4)
13
13
  nio4r (~> 2.0)
14
14
  websocket-driver (>= 0.6.1)
15
- actionmailbox (7.0.4)
16
- actionpack (= 7.0.4)
17
- activejob (= 7.0.4)
18
- activerecord (= 7.0.4)
19
- activestorage (= 7.0.4)
20
- activesupport (= 7.0.4)
15
+ zeitwerk (~> 2.6)
16
+ actionmailbox (7.1.3.4)
17
+ actionpack (= 7.1.3.4)
18
+ activejob (= 7.1.3.4)
19
+ activerecord (= 7.1.3.4)
20
+ activestorage (= 7.1.3.4)
21
+ activesupport (= 7.1.3.4)
21
22
  mail (>= 2.7.1)
22
23
  net-imap
23
24
  net-pop
24
25
  net-smtp
25
- actionmailer (7.0.4)
26
- actionpack (= 7.0.4)
27
- actionview (= 7.0.4)
28
- activejob (= 7.0.4)
29
- activesupport (= 7.0.4)
26
+ actionmailer (7.1.3.4)
27
+ actionpack (= 7.1.3.4)
28
+ actionview (= 7.1.3.4)
29
+ activejob (= 7.1.3.4)
30
+ activesupport (= 7.1.3.4)
30
31
  mail (~> 2.5, >= 2.5.4)
31
32
  net-imap
32
33
  net-pop
33
34
  net-smtp
34
- rails-dom-testing (~> 2.0)
35
- actionpack (7.0.4)
36
- actionview (= 7.0.4)
37
- activesupport (= 7.0.4)
38
- rack (~> 2.0, >= 2.2.0)
35
+ rails-dom-testing (~> 2.2)
36
+ actionpack (7.1.3.4)
37
+ actionview (= 7.1.3.4)
38
+ activesupport (= 7.1.3.4)
39
+ nokogiri (>= 1.8.5)
40
+ racc
41
+ rack (>= 2.2.4)
42
+ rack-session (>= 1.0.1)
39
43
  rack-test (>= 0.6.3)
40
- rails-dom-testing (~> 2.0)
41
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
42
- actiontext (7.0.4)
43
- actionpack (= 7.0.4)
44
- activerecord (= 7.0.4)
45
- activestorage (= 7.0.4)
46
- activesupport (= 7.0.4)
44
+ rails-dom-testing (~> 2.2)
45
+ rails-html-sanitizer (~> 1.6)
46
+ actiontext (7.1.3.4)
47
+ actionpack (= 7.1.3.4)
48
+ activerecord (= 7.1.3.4)
49
+ activestorage (= 7.1.3.4)
50
+ activesupport (= 7.1.3.4)
47
51
  globalid (>= 0.6.0)
48
52
  nokogiri (>= 1.8.5)
49
- actionview (7.0.4)
50
- activesupport (= 7.0.4)
53
+ actionview (7.1.3.4)
54
+ activesupport (= 7.1.3.4)
51
55
  builder (~> 3.1)
52
- erubi (~> 1.4)
53
- rails-dom-testing (~> 2.0)
54
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
55
- activejob (7.0.4)
56
- activesupport (= 7.0.4)
56
+ erubi (~> 1.11)
57
+ rails-dom-testing (~> 2.2)
58
+ rails-html-sanitizer (~> 1.6)
59
+ activejob (7.1.3.4)
60
+ activesupport (= 7.1.3.4)
57
61
  globalid (>= 0.3.6)
58
- activemodel (7.0.4)
59
- activesupport (= 7.0.4)
60
- activerecord (7.0.4)
61
- activemodel (= 7.0.4)
62
- activesupport (= 7.0.4)
63
- activestorage (7.0.4)
64
- actionpack (= 7.0.4)
65
- activejob (= 7.0.4)
66
- activerecord (= 7.0.4)
67
- activesupport (= 7.0.4)
62
+ activemodel (7.1.3.4)
63
+ activesupport (= 7.1.3.4)
64
+ activerecord (7.1.3.4)
65
+ activemodel (= 7.1.3.4)
66
+ activesupport (= 7.1.3.4)
67
+ timeout (>= 0.4.0)
68
+ activestorage (7.1.3.4)
69
+ actionpack (= 7.1.3.4)
70
+ activejob (= 7.1.3.4)
71
+ activerecord (= 7.1.3.4)
72
+ activesupport (= 7.1.3.4)
68
73
  marcel (~> 1.0)
69
- mini_mime (>= 1.1.0)
70
- activesupport (7.0.4)
74
+ activesupport (7.1.3.4)
75
+ base64
76
+ bigdecimal
71
77
  concurrent-ruby (~> 1.0, >= 1.0.2)
78
+ connection_pool (>= 2.2.5)
79
+ drb
72
80
  i18n (>= 1.6, < 2)
73
81
  minitest (>= 5.1)
82
+ mutex_m
74
83
  tzinfo (~> 2.0)
75
- addressable (2.8.1)
76
- public_suffix (>= 2.0.2, < 6.0)
84
+ addressable (2.8.7)
85
+ public_suffix (>= 2.0.2, < 7.0)
77
86
  ast (2.4.2)
78
- builder (3.2.4)
87
+ base64 (0.2.0)
88
+ bigdecimal (3.1.8)
89
+ builder (3.3.0)
79
90
  bundler-audit (0.9.1)
80
91
  bundler (>= 1.2.0, < 3)
81
92
  thor (~> 1.0)
82
- ci-helper (0.5.0)
83
- colorize (~> 0.8)
84
- dry-inflector (~> 0.2)
85
- umbrellio-sequel-plugins (~> 0.4)
93
+ childprocess (5.0.0)
94
+ ci-helper (0.6.0)
95
+ colorize (~> 1.1)
96
+ dry-inflector (~> 1.0)
97
+ umbrellio-sequel-plugins (~> 0.14)
86
98
  coderay (1.1.3)
87
- colorize (0.8.1)
88
- concurrent-ruby (1.1.10)
99
+ colorize (1.1.0)
100
+ concurrent-ruby (1.3.3)
101
+ connection_pool (2.4.1)
89
102
  crass (1.0.6)
90
- diff-lcs (1.5.0)
103
+ date (3.3.4)
104
+ diff-lcs (1.5.1)
91
105
  docile (1.4.0)
92
- dry-inflector (0.3.0)
93
- erubi (1.11.0)
94
- faraday (2.6.0)
95
- faraday-net_http (>= 2.0, < 3.1)
96
- ruby2_keywords (>= 0.0.4)
97
- faraday-net_http (3.0.1)
98
- globalid (1.0.0)
99
- activesupport (>= 5.0)
100
- i18n (1.12.0)
106
+ drb (2.2.1)
107
+ dry-inflector (1.0.0)
108
+ erubi (1.13.0)
109
+ faraday (2.9.2)
110
+ faraday-net_http (>= 2.0, < 3.2)
111
+ faraday-net_http (3.1.0)
112
+ net-http
113
+ globalid (1.2.1)
114
+ activesupport (>= 6.1)
115
+ i18n (1.14.5)
101
116
  concurrent-ruby (~> 1.0)
102
- json (2.6.2)
103
- launchy (2.5.0)
104
- addressable (~> 2.7)
105
- loofah (2.19.0)
117
+ io-console (0.7.2)
118
+ irb (1.13.2)
119
+ rdoc (>= 4.0.0)
120
+ reline (>= 0.4.2)
121
+ json (2.7.2)
122
+ language_server-protocol (3.17.0.3)
123
+ launchy (3.0.1)
124
+ addressable (~> 2.8)
125
+ childprocess (~> 5.0)
126
+ loofah (2.22.0)
106
127
  crass (~> 1.0.2)
107
- nokogiri (>= 1.5.9)
108
- mail (2.7.1)
128
+ nokogiri (>= 1.12.0)
129
+ mail (2.8.1)
109
130
  mini_mime (>= 0.1.1)
110
- marcel (1.0.2)
111
- method_source (1.0.0)
112
- mini_mime (1.1.2)
113
- mini_portile2 (2.8.0)
114
- minitest (5.16.3)
115
- net-imap (0.3.1)
131
+ net-imap
132
+ net-pop
133
+ net-smtp
134
+ marcel (1.0.4)
135
+ method_source (1.1.0)
136
+ mini_mime (1.1.5)
137
+ mini_portile2 (2.8.7)
138
+ minitest (5.24.0)
139
+ mutex_m (0.2.0)
140
+ net-http (0.4.1)
141
+ uri
142
+ net-imap (0.4.14)
143
+ date
116
144
  net-protocol
117
145
  net-pop (0.1.2)
118
146
  net-protocol
119
- net-protocol (0.1.3)
147
+ net-protocol (0.2.2)
120
148
  timeout
121
- net-smtp (0.3.2)
149
+ net-smtp (0.5.0)
122
150
  net-protocol
123
- nio4r (2.5.8)
124
- nokogiri (1.13.9)
125
- mini_portile2 (~> 2.8.0)
151
+ nio4r (2.7.3)
152
+ nokogiri (1.16.6)
153
+ mini_portile2 (~> 2.8.2)
126
154
  racc (~> 1.4)
127
- nokogiri (1.13.9-x86_64-darwin)
155
+ nokogiri (1.16.6-x86_64-darwin)
128
156
  racc (~> 1.4)
129
- nokogiri (1.13.9-x86_64-linux)
157
+ nokogiri (1.16.6-x86_64-linux)
130
158
  racc (~> 1.4)
131
- parallel (1.22.1)
132
- parser (3.1.2.1)
159
+ parallel (1.25.1)
160
+ parser (3.3.3.0)
133
161
  ast (~> 2.4.1)
134
- pry (0.14.1)
162
+ racc
163
+ pry (0.14.2)
135
164
  coderay (~> 1.1)
136
165
  method_source (~> 1.0)
137
- public_suffix (5.0.0)
138
- racc (1.6.0)
139
- rack (2.2.4)
140
- rack-test (2.0.2)
166
+ psych (5.1.2)
167
+ stringio
168
+ public_suffix (6.0.0)
169
+ racc (1.8.0)
170
+ rack (3.1.4)
171
+ rack-session (2.0.0)
172
+ rack (>= 3.0.0)
173
+ rack-test (2.1.0)
141
174
  rack (>= 1.3)
142
- rails (7.0.4)
143
- actioncable (= 7.0.4)
144
- actionmailbox (= 7.0.4)
145
- actionmailer (= 7.0.4)
146
- actionpack (= 7.0.4)
147
- actiontext (= 7.0.4)
148
- actionview (= 7.0.4)
149
- activejob (= 7.0.4)
150
- activemodel (= 7.0.4)
151
- activerecord (= 7.0.4)
152
- activestorage (= 7.0.4)
153
- activesupport (= 7.0.4)
175
+ rackup (2.1.0)
176
+ rack (>= 3)
177
+ webrick (~> 1.8)
178
+ rails (7.1.3.4)
179
+ actioncable (= 7.1.3.4)
180
+ actionmailbox (= 7.1.3.4)
181
+ actionmailer (= 7.1.3.4)
182
+ actionpack (= 7.1.3.4)
183
+ actiontext (= 7.1.3.4)
184
+ actionview (= 7.1.3.4)
185
+ activejob (= 7.1.3.4)
186
+ activemodel (= 7.1.3.4)
187
+ activerecord (= 7.1.3.4)
188
+ activestorage (= 7.1.3.4)
189
+ activesupport (= 7.1.3.4)
154
190
  bundler (>= 1.15.0)
155
- railties (= 7.0.4)
156
- rails-dom-testing (2.0.3)
157
- activesupport (>= 4.2.0)
191
+ railties (= 7.1.3.4)
192
+ rails-dom-testing (2.2.0)
193
+ activesupport (>= 5.0.0)
194
+ minitest
158
195
  nokogiri (>= 1.6)
159
- rails-html-sanitizer (1.4.3)
160
- loofah (~> 2.3)
161
- railties (7.0.4)
162
- actionpack (= 7.0.4)
163
- activesupport (= 7.0.4)
164
- method_source
196
+ rails-html-sanitizer (1.6.0)
197
+ loofah (~> 2.21)
198
+ nokogiri (~> 1.14)
199
+ railties (7.1.3.4)
200
+ actionpack (= 7.1.3.4)
201
+ activesupport (= 7.1.3.4)
202
+ irb
203
+ rackup (>= 1.0.0)
165
204
  rake (>= 12.2)
166
- thor (~> 1.0)
167
- zeitwerk (~> 2.5)
205
+ thor (~> 1.0, >= 1.2.2)
206
+ zeitwerk (~> 2.6)
168
207
  rainbow (3.1.1)
169
- rake (13.0.6)
170
- regexp_parser (2.6.0)
171
- rexml (3.2.5)
172
- rspec (3.11.0)
173
- rspec-core (~> 3.11.0)
174
- rspec-expectations (~> 3.11.0)
175
- rspec-mocks (~> 3.11.0)
176
- rspec-core (3.11.0)
177
- rspec-support (~> 3.11.0)
178
- rspec-expectations (3.11.1)
208
+ rake (13.2.1)
209
+ rdoc (6.7.0)
210
+ psych (>= 4.0.0)
211
+ regexp_parser (2.9.2)
212
+ reline (0.5.9)
213
+ io-console (~> 0.5)
214
+ rexml (3.3.1)
215
+ strscan
216
+ rspec (3.13.0)
217
+ rspec-core (~> 3.13.0)
218
+ rspec-expectations (~> 3.13.0)
219
+ rspec-mocks (~> 3.13.0)
220
+ rspec-core (3.13.0)
221
+ rspec-support (~> 3.13.0)
222
+ rspec-expectations (3.13.1)
179
223
  diff-lcs (>= 1.2.0, < 2.0)
180
- rspec-support (~> 3.11.0)
181
- rspec-mocks (3.11.2)
224
+ rspec-support (~> 3.13.0)
225
+ rspec-mocks (3.13.1)
182
226
  diff-lcs (>= 1.2.0, < 2.0)
183
- rspec-support (~> 3.11.0)
184
- rspec-support (3.11.1)
185
- rubocop (1.35.1)
227
+ rspec-support (~> 3.13.0)
228
+ rspec-support (3.13.1)
229
+ rubocop (1.63.5)
186
230
  json (~> 2.3)
231
+ language_server-protocol (>= 3.17.0)
187
232
  parallel (~> 1.10)
188
- parser (>= 3.1.2.1)
233
+ parser (>= 3.3.0.2)
189
234
  rainbow (>= 2.2.2, < 4.0)
190
235
  regexp_parser (>= 1.8, < 3.0)
191
236
  rexml (>= 3.2.5, < 4.0)
192
- rubocop-ast (>= 1.20.1, < 2.0)
237
+ rubocop-ast (>= 1.31.1, < 2.0)
193
238
  ruby-progressbar (~> 1.7)
194
- unicode-display_width (>= 1.4.0, < 3.0)
195
- rubocop-ast (1.23.0)
196
- parser (>= 3.1.1.0)
197
- rubocop-config-umbrellio (1.35.0.69)
198
- rubocop (~> 1.35.0)
199
- rubocop-performance (~> 1.14.0)
200
- rubocop-rails (~> 2.15.0)
239
+ unicode-display_width (>= 2.4.0, < 3.0)
240
+ rubocop-ast (1.31.3)
241
+ parser (>= 3.3.1.0)
242
+ rubocop-capybara (2.21.0)
243
+ rubocop (~> 1.41)
244
+ rubocop-config-umbrellio (1.63.0.93)
245
+ rubocop (~> 1.63.0)
246
+ rubocop-performance (~> 1.21.0)
247
+ rubocop-rails (~> 2.24.0)
201
248
  rubocop-rake (~> 0.6.0)
202
- rubocop-rspec (~> 2.12.0)
249
+ rubocop-rspec (~> 2.29.0)
203
250
  rubocop-sequel (~> 0.3.3)
204
- rubocop-performance (1.14.3)
205
- rubocop (>= 1.7.0, < 2.0)
206
- rubocop-ast (>= 0.4.0)
207
- rubocop-rails (2.15.2)
251
+ rubocop-factory_bot (2.26.1)
252
+ rubocop (~> 1.61)
253
+ rubocop-performance (1.21.1)
254
+ rubocop (>= 1.48.1, < 2.0)
255
+ rubocop-ast (>= 1.31.1, < 2.0)
256
+ rubocop-rails (2.24.1)
208
257
  activesupport (>= 4.2.0)
209
258
  rack (>= 1.1)
210
- rubocop (>= 1.7.0, < 2.0)
259
+ rubocop (>= 1.33.0, < 2.0)
260
+ rubocop-ast (>= 1.31.1, < 2.0)
211
261
  rubocop-rake (0.6.0)
212
262
  rubocop (~> 1.0)
213
- rubocop-rspec (2.12.1)
214
- rubocop (~> 1.31)
263
+ rubocop-rspec (2.29.2)
264
+ rubocop (~> 1.40)
265
+ rubocop-capybara (~> 2.17)
266
+ rubocop-factory_bot (~> 2.22)
267
+ rubocop-rspec_rails (~> 2.28)
268
+ rubocop-rspec_rails (2.29.1)
269
+ rubocop (~> 1.61)
215
270
  rubocop-sequel (0.3.4)
216
271
  rubocop (~> 1.0)
217
- ruby-progressbar (1.11.0)
218
- ruby2_keywords (0.0.5)
219
- semantic_logger (4.11.0)
272
+ ruby-progressbar (1.13.0)
273
+ semantic_logger (4.15.0)
220
274
  concurrent-ruby (~> 1.0)
221
275
  sentry-raven (3.1.2)
222
276
  faraday (>= 1.0)
223
- sentry-ruby (5.5.0)
277
+ sentry-ruby (5.18.0)
278
+ bigdecimal
224
279
  concurrent-ruby (~> 1.0, >= 1.0.2)
225
- sequel (5.61.0)
226
- simplecov (0.21.2)
280
+ sequel (5.81.0)
281
+ bigdecimal
282
+ simplecov (0.22.0)
227
283
  docile (~> 1.1)
228
284
  simplecov-html (~> 0.11)
229
285
  simplecov_json_formatter (~> 0.1)
230
286
  simplecov-html (0.12.3)
231
287
  simplecov-lcov (0.8.0)
232
288
  simplecov_json_formatter (0.1.4)
289
+ stringio (3.1.1)
290
+ strscan (3.1.0)
233
291
  symbiont-ruby (0.7.0)
234
- thor (1.2.1)
235
- timeout (0.3.0)
236
- tzinfo (2.0.5)
292
+ thor (1.3.1)
293
+ timeout (0.4.1)
294
+ tzinfo (2.0.6)
237
295
  concurrent-ruby (~> 1.0)
238
- umbrellio-sequel-plugins (0.10.0.86)
296
+ umbrellio-sequel-plugins (0.15.0.198)
239
297
  sequel
240
298
  symbiont-ruby
241
- unicode-display_width (2.3.0)
242
- webrick (1.7.0)
243
- websocket-driver (0.7.5)
299
+ unicode-display_width (2.5.0)
300
+ uri (0.13.0)
301
+ webrick (1.8.1)
302
+ websocket-driver (0.7.6)
244
303
  websocket-extensions (>= 0.1.0)
245
304
  websocket-extensions (0.1.5)
246
- yard (0.9.28)
247
- webrick (~> 1.7.0)
248
- zeitwerk (2.6.1)
305
+ yard (0.9.36)
306
+ zeitwerk (2.6.16)
249
307
 
250
308
  PLATFORMS
251
309
  ruby
@@ -270,4 +328,4 @@ DEPENDENCIES
270
328
  yard
271
329
 
272
330
  BUNDLED WITH
273
- 2.3.24
331
+ 2.5.9
data/lib/lamian/config.rb CHANGED
@@ -1,16 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "logger"
4
-
5
3
  module Lamian
6
4
  # General lamian configuration class
7
5
  # @attr formatter [Logger::Foramtter]
8
6
  # formatter to use in lamian, global
7
+ # @attr max_log_lines [Integer]
8
+ # max number of most recent log lines to store, defaults to 5000
9
9
  # @attr raven_log_size_limit [Integer]
10
10
  # size limit when sending lamian log to sentry, defaults to +500_000+
11
- Config = Struct.new(:formatter, :raven_log_size_limit) do
11
+ Config = Struct.new(:formatter, :max_log_lines, :raven_log_size_limit) do
12
12
  def initialize
13
13
  self.formatter = ::Logger::Formatter.new
14
+ self.max_log_lines = 5000
14
15
  self.raven_log_size_limit = 500_000
15
16
  end
16
17
  end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lamian
4
+ class LogDevice # :nodoc:
5
+ def initialize(size = Lamian.config.max_log_lines)
6
+ self.size = size
7
+ self.lines = []
8
+ end
9
+
10
+ def write(string) # :nodoc:
11
+ lines << string
12
+ lines.shift if lines.size > size
13
+ true
14
+ end
15
+
16
+ def string # :nodoc:
17
+ lines.join
18
+ end
19
+
20
+ private
21
+
22
+ attr_accessor :size, :lines
23
+ end
24
+ end
data/lib/lamian/logger.rb CHANGED
@@ -23,8 +23,7 @@ module Lamian
23
23
  # @see Lamian.run
24
24
  # Collects logs sent inside block
25
25
  def run
26
- logdevs.push(StringIO.new)
27
-
26
+ logdevs.push(Lamian::LogDevice.new)
28
27
  yield
29
28
  ensure
30
29
  logdevs.pop
@@ -11,7 +11,7 @@ module Lamian
11
11
  end
12
12
 
13
13
  # @api stdlib
14
- # log is an alis for add and should also be prepended
14
+ # log is an alias for add and should also be prepended
15
15
  def log(...)
16
16
  Logger.current.add(...)
17
17
  super
@@ -13,5 +13,5 @@ module Lamian
13
13
  # According to this, it is enough to specify '~> a.b'
14
14
  # if private API was not used and to specify '~> a.b.c' if it was
15
15
 
16
- VERSION = "1.7.0"
16
+ VERSION = "1.9.0"
17
17
  end
data/lib/lamian.rb CHANGED
@@ -9,6 +9,7 @@ module Lamian
9
9
  autoload :Config, "lamian/config"
10
10
  autoload :Logger, "lamian/logger"
11
11
  autoload :LoggerExtension, "lamian/logger_extension"
12
+ autoload :LogDevice, "lamian/log_device"
12
13
  autoload :Middleware, "lamian/middleware"
13
14
  autoload :RavenContextExtension, "lamian/raven_context_extension"
14
15
  autoload :SidekiqRavenMiddleware, "lamian/sidekiq_raven_middleware"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lamian
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - JelF
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-27 00:00:00.000000000 Z
11
+ date: 2024-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -24,188 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.2'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler-audit
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: ci-helper
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: launchy
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: pry
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: rake
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: rspec
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: rubocop-config-umbrellio
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: semantic_logger
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: sentry-raven
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
- - !ruby/object:Gem::Dependency
154
- name: sentry-ruby
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
- - !ruby/object:Gem::Dependency
168
- name: simplecov
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '0'
181
- - !ruby/object:Gem::Dependency
182
- name: simplecov-lcov
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - ">="
186
- - !ruby/object:Gem::Version
187
- version: '0'
188
- type: :development
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - ">="
193
- - !ruby/object:Gem::Version
194
- version: '0'
195
- - !ruby/object:Gem::Dependency
196
- name: yard
197
- requirement: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - ">="
200
- - !ruby/object:Gem::Version
201
- version: '0'
202
- type: :development
203
- prerelease: false
204
- version_requirements: !ruby/object:Gem::Requirement
205
- requirements:
206
- - - ">="
207
- - !ruby/object:Gem::Version
208
- version: '0'
209
27
  description: Add logs to your error messages, using exception_notifier or smth like
210
28
  it
211
29
  email:
@@ -230,6 +48,7 @@ files:
230
48
  - lib/lamian.rb
231
49
  - lib/lamian/config.rb
232
50
  - lib/lamian/engine.rb
51
+ - lib/lamian/log_device.rb
233
52
  - lib/lamian/logger.rb
234
53
  - lib/lamian/logger_extension.rb
235
54
  - lib/lamian/middleware.rb
@@ -260,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
260
79
  - !ruby/object:Gem::Version
261
80
  version: '0'
262
81
  requirements: []
263
- rubygems_version: 3.3.24
82
+ rubygems_version: 3.5.11
264
83
  signing_key:
265
84
  specification_version: 4
266
85
  summary: Add logs to your error messages