log_sanity 1.3.0 → 1.3.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: 44be27b46cf3a8abec840218bd28a4b9e24ed041c7838c94061edebc60d919a9
4
- data.tar.gz: b30eedf81fdcaacc3edb88aa56527744f459ed1a7d4bcbd38f10015f5253c9a2
3
+ metadata.gz: 1e14932031fa3c9e9fbc8291f47c77a35218cdc84796da7093514dcfb4b01e3e
4
+ data.tar.gz: 2ca40f03ffce94c6ef444e6501ed042f019005a5befa33e86190c3ad0f36809b
5
5
  SHA512:
6
- metadata.gz: e7a1013c535badbb4f12e2fde5050adf79b1213952bce25a0e78ccb18924774ea34cf5371efc211b83a62b2b8de33e9cdfa2cb3877372486dd2251e11411639e
7
- data.tar.gz: 0c619b8f5db59c702230da3b74c5b8cbe941a91ad0b07641e326733f41046a4481ef10d0ff4863b45511873ab0bd4d675ea41525ee5dff99a1d78f4e3cec76c6
6
+ metadata.gz: e1e2e9ae966e33a14056618992f00804885d1f17926761a8f75852dddf0dc9421e4917142d2bc389fd0d599c58b170bf2777581484b436b31691f326a45a0462
7
+ data.tar.gz: e9da30d7b72803e27234d8e396822ca610b8b976b5b371746594c54ef293baeceaba29f7e6dd6375a0cfdaa806a552393c92c2118b6290ad95b3415c33c0a1e0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ #### 1.3.2
2
+
3
+ - Fix logging on Rails 7.1 due to default use of BroadcastLogger
4
+
5
+ #### 1.3.1
6
+
7
+ - Handle updated show_exceptions values in Rails 7.1
8
+
1
9
  #### 1.3.0
2
10
 
3
11
  - Fix timing of gem initialization
data/Gemfile.lock CHANGED
@@ -1,73 +1,73 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- log_sanity (1.3.0)
4
+ log_sanity (1.3.2)
5
5
  rails (>= 5.2, < 7.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actioncable (7.0.4.3)
11
- actionpack (= 7.0.4.3)
12
- activesupport (= 7.0.4.3)
10
+ actioncable (7.0.5)
11
+ actionpack (= 7.0.5)
12
+ activesupport (= 7.0.5)
13
13
  nio4r (~> 2.0)
14
14
  websocket-driver (>= 0.6.1)
15
- actionmailbox (7.0.4.3)
16
- actionpack (= 7.0.4.3)
17
- activejob (= 7.0.4.3)
18
- activerecord (= 7.0.4.3)
19
- activestorage (= 7.0.4.3)
20
- activesupport (= 7.0.4.3)
15
+ actionmailbox (7.0.5)
16
+ actionpack (= 7.0.5)
17
+ activejob (= 7.0.5)
18
+ activerecord (= 7.0.5)
19
+ activestorage (= 7.0.5)
20
+ activesupport (= 7.0.5)
21
21
  mail (>= 2.7.1)
22
22
  net-imap
23
23
  net-pop
24
24
  net-smtp
25
- actionmailer (7.0.4.3)
26
- actionpack (= 7.0.4.3)
27
- actionview (= 7.0.4.3)
28
- activejob (= 7.0.4.3)
29
- activesupport (= 7.0.4.3)
25
+ actionmailer (7.0.5)
26
+ actionpack (= 7.0.5)
27
+ actionview (= 7.0.5)
28
+ activejob (= 7.0.5)
29
+ activesupport (= 7.0.5)
30
30
  mail (~> 2.5, >= 2.5.4)
31
31
  net-imap
32
32
  net-pop
33
33
  net-smtp
34
34
  rails-dom-testing (~> 2.0)
35
- actionpack (7.0.4.3)
36
- actionview (= 7.0.4.3)
37
- activesupport (= 7.0.4.3)
38
- rack (~> 2.0, >= 2.2.0)
35
+ actionpack (7.0.5)
36
+ actionview (= 7.0.5)
37
+ activesupport (= 7.0.5)
38
+ rack (~> 2.0, >= 2.2.4)
39
39
  rack-test (>= 0.6.3)
40
40
  rails-dom-testing (~> 2.0)
41
41
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
42
- actiontext (7.0.4.3)
43
- actionpack (= 7.0.4.3)
44
- activerecord (= 7.0.4.3)
45
- activestorage (= 7.0.4.3)
46
- activesupport (= 7.0.4.3)
42
+ actiontext (7.0.5)
43
+ actionpack (= 7.0.5)
44
+ activerecord (= 7.0.5)
45
+ activestorage (= 7.0.5)
46
+ activesupport (= 7.0.5)
47
47
  globalid (>= 0.6.0)
48
48
  nokogiri (>= 1.8.5)
49
- actionview (7.0.4.3)
50
- activesupport (= 7.0.4.3)
49
+ actionview (7.0.5)
50
+ activesupport (= 7.0.5)
51
51
  builder (~> 3.1)
52
52
  erubi (~> 1.4)
53
53
  rails-dom-testing (~> 2.0)
54
54
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
55
- activejob (7.0.4.3)
56
- activesupport (= 7.0.4.3)
55
+ activejob (7.0.5)
56
+ activesupport (= 7.0.5)
57
57
  globalid (>= 0.3.6)
58
- activemodel (7.0.4.3)
59
- activesupport (= 7.0.4.3)
60
- activerecord (7.0.4.3)
61
- activemodel (= 7.0.4.3)
62
- activesupport (= 7.0.4.3)
63
- activestorage (7.0.4.3)
64
- actionpack (= 7.0.4.3)
65
- activejob (= 7.0.4.3)
66
- activerecord (= 7.0.4.3)
67
- activesupport (= 7.0.4.3)
58
+ activemodel (7.0.5)
59
+ activesupport (= 7.0.5)
60
+ activerecord (7.0.5)
61
+ activemodel (= 7.0.5)
62
+ activesupport (= 7.0.5)
63
+ activestorage (7.0.5)
64
+ actionpack (= 7.0.5)
65
+ activejob (= 7.0.5)
66
+ activerecord (= 7.0.5)
67
+ activesupport (= 7.0.5)
68
68
  marcel (~> 1.0)
69
69
  mini_mime (>= 1.1.0)
70
- activesupport (7.0.4.3)
70
+ activesupport (7.0.5)
71
71
  concurrent-ruby (~> 1.0, >= 1.0.2)
72
72
  i18n (>= 1.6, < 2)
73
73
  minitest (>= 5.1)
@@ -79,11 +79,11 @@ GEM
79
79
  erubi (1.12.0)
80
80
  globalid (1.1.0)
81
81
  activesupport (>= 5.0)
82
- i18n (1.12.0)
82
+ i18n (1.13.0)
83
83
  concurrent-ruby (~> 1.0)
84
- loofah (2.20.0)
84
+ loofah (2.21.3)
85
85
  crass (~> 1.0.2)
86
- nokogiri (>= 1.5.9)
86
+ nokogiri (>= 1.12.0)
87
87
  mail (2.8.1)
88
88
  mini_mime (>= 0.1.1)
89
89
  net-imap
@@ -92,7 +92,6 @@ GEM
92
92
  marcel (1.0.2)
93
93
  method_source (1.0.0)
94
94
  mini_mime (1.1.2)
95
- mini_portile2 (2.8.1)
96
95
  minitest (5.18.0)
97
96
  net-imap (0.3.4)
98
97
  date
@@ -104,54 +103,48 @@ GEM
104
103
  net-smtp (0.3.3)
105
104
  net-protocol
106
105
  nio4r (2.5.9)
107
- nokogiri (1.14.3)
108
- mini_portile2 (~> 2.8.0)
109
- racc (~> 1.4)
110
- nokogiri (1.14.3-arm64-darwin)
111
- racc (~> 1.4)
112
- nokogiri (1.14.3-x86_64-darwin)
113
- racc (~> 1.4)
114
- nokogiri (1.14.3-x86_64-linux)
106
+ nokogiri (1.15.2-arm64-darwin)
115
107
  racc (~> 1.4)
116
108
  racc (1.6.2)
117
- rack (2.2.6.4)
109
+ rack (2.2.7)
118
110
  rack-test (2.1.0)
119
111
  rack (>= 1.3)
120
- rails (7.0.4.3)
121
- actioncable (= 7.0.4.3)
122
- actionmailbox (= 7.0.4.3)
123
- actionmailer (= 7.0.4.3)
124
- actionpack (= 7.0.4.3)
125
- actiontext (= 7.0.4.3)
126
- actionview (= 7.0.4.3)
127
- activejob (= 7.0.4.3)
128
- activemodel (= 7.0.4.3)
129
- activerecord (= 7.0.4.3)
130
- activestorage (= 7.0.4.3)
131
- activesupport (= 7.0.4.3)
112
+ rails (7.0.5)
113
+ actioncable (= 7.0.5)
114
+ actionmailbox (= 7.0.5)
115
+ actionmailer (= 7.0.5)
116
+ actionpack (= 7.0.5)
117
+ actiontext (= 7.0.5)
118
+ actionview (= 7.0.5)
119
+ activejob (= 7.0.5)
120
+ activemodel (= 7.0.5)
121
+ activerecord (= 7.0.5)
122
+ activestorage (= 7.0.5)
123
+ activesupport (= 7.0.5)
132
124
  bundler (>= 1.15.0)
133
- railties (= 7.0.4.3)
125
+ railties (= 7.0.5)
134
126
  rails-dom-testing (2.0.3)
135
127
  activesupport (>= 4.2.0)
136
128
  nokogiri (>= 1.6)
137
- rails-html-sanitizer (1.5.0)
138
- loofah (~> 2.19, >= 2.19.1)
139
- railties (7.0.4.3)
140
- actionpack (= 7.0.4.3)
141
- activesupport (= 7.0.4.3)
129
+ rails-html-sanitizer (1.6.0)
130
+ loofah (~> 2.21)
131
+ nokogiri (~> 1.14)
132
+ railties (7.0.5)
133
+ actionpack (= 7.0.5)
134
+ activesupport (= 7.0.5)
142
135
  method_source
143
136
  rake (>= 12.2)
144
137
  thor (~> 1.0)
145
138
  zeitwerk (~> 2.5)
146
139
  rake (13.0.6)
147
- thor (1.2.1)
140
+ thor (1.2.2)
148
141
  timeout (0.3.2)
149
142
  tzinfo (2.0.6)
150
143
  concurrent-ruby (~> 1.0)
151
144
  websocket-driver (0.7.5)
152
145
  websocket-extensions (>= 0.1.0)
153
146
  websocket-extensions (0.1.5)
154
- zeitwerk (2.6.7)
147
+ zeitwerk (2.6.8)
155
148
 
156
149
  PLATFORMS
157
150
  arm64-darwin
@@ -19,10 +19,20 @@ module LogSanity
19
19
 
20
20
  response
21
21
  rescue ActionController::RoutingError => exception
22
- if request.show_exceptions?
23
- render_exception(request, exception)
22
+ if Rails.version >= '7.1'
23
+ backtrace_cleaner = request.get_header('action_dispatch.backtrace_cleaner')
24
+ wrapper = ActionDispatch::ExceptionWrapper.new(backtrace_cleaner, exception)
25
+ if wrapper.show?(request)
26
+ render_exception(request, wrapper)
27
+ else
28
+ raise exception
29
+ end
24
30
  else
25
- raise exception
31
+ if request.show_exceptions?
32
+ render_exception(request, exception)
33
+ else
34
+ raise exception
35
+ end
26
36
  end
27
37
  end
28
38
 
@@ -57,10 +57,12 @@ module LogSanity
57
57
  end
58
58
 
59
59
  ActiveSupport.on_load(:action_cable) do
60
- orig_logger = logger || Rails.logger
61
- if orig_logger.level < Logger::WARN
62
- self.logger = orig_logger.clone.tap do |l|
63
- l.level = Logger::WARN
60
+ if Rails.version < '7.1'
61
+ orig_logger = logger || Rails.logger
62
+ if orig_logger.level < Logger::WARN
63
+ self.logger = orig_logger.clone.tap do |l|
64
+ l.level = Logger::WARN
65
+ end
64
66
  end
65
67
  end
66
68
  end
@@ -1,3 +1,3 @@
1
1
  module LogSanity
2
- VERSION = '1.3.0'
2
+ VERSION = '1.3.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: log_sanity
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - thomas morgan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-15 00:00:00.000000000 Z
11
+ date: 2023-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  requirements: []
126
- rubygems_version: 3.3.26
126
+ rubygems_version: 3.4.10
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: LogSanity - Bring sanity to Rails logs