pg_rails 7.0.8.pre.alpha.28 → 7.0.8.pre.alpha.29
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 693564c63bb61c878087db5c4acd52851378ba6a839004e97bd099291988f7e6
|
4
|
+
data.tar.gz: a709a829417768f1ab6c27e840396395920186e872f28a25063b13dd81027bd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '029e2473f5247d57ac72824aa2c95823dc5862b27e8341fc9e7f0e3124a3bc22634b6ad7ee6f5ebdb340643c8fc8c4f7a905ed92f3bb2502e2eb1c4b68233fd6'
|
7
|
+
data.tar.gz: 5bedfa1c3883599c2b67f99ed727804d0d9f97b852e4e8aa92c0e9778555e79e79aa6e0049e1e41dfb1ab0148fd10fc29a5c9182983caf75d735ebacdf5fa327
|
@@ -4,10 +4,7 @@ Rollbar.configure do |config|
|
|
4
4
|
|
5
5
|
config.access_token = Rails.application.credentials.rollbar&.access_token_server
|
6
6
|
|
7
|
-
|
8
|
-
if Rails.env.local?
|
9
|
-
config.enabled = false
|
10
|
-
end
|
7
|
+
config.enabled = Rails.env.production? || ENV.fetch('FORCE_ROLLBAR', false)
|
11
8
|
|
12
9
|
# By default, Rollbar will try to call the `current_user` controller method
|
13
10
|
# to fetch the logged-in user object, and then call that object's `id`
|
@@ -75,4 +72,20 @@ Rollbar.configure do |config|
|
|
75
72
|
# setup for Heroku. See:
|
76
73
|
# https://devcenter.heroku.com/articles/deploying-to-a-custom-rails-environment
|
77
74
|
config.environment = ENV['ROLLBAR_ENV'].presence || Rails.env
|
75
|
+
|
76
|
+
# Este parámetro rollbar lo usa para los log files, pero yo lo uso también para filtrar
|
77
|
+
# el error reporting en before_process
|
78
|
+
config.logger_level = ENV.fetch('ROLLBAR_LOGGER_LEVEL', 'info').to_sym
|
79
|
+
|
80
|
+
config.before_process << Proc.new do |item|
|
81
|
+
acceptable_levels = begin
|
82
|
+
levels = [:debug, :info, :warn, :error]
|
83
|
+
if Rollbar.configuration.logger_level
|
84
|
+
levels[levels.find_index(Rollbar.configuration.logger_level)..-1]
|
85
|
+
else
|
86
|
+
[]
|
87
|
+
end
|
88
|
+
end
|
89
|
+
acceptable_levels.include?(item[:level].to_sym) ? 'gogoogogooo' : 'ignored'
|
90
|
+
end
|
78
91
|
end
|
@@ -9,29 +9,29 @@ import * as bootstrap from 'bootstrap'
|
|
9
9
|
|
10
10
|
let rollbarToken = document.head.querySelector('meta[name=rollbar-token]')
|
11
11
|
rollbarToken = rollbarToken && rollbarToken.content
|
12
|
-
if (rollbarToken) {
|
13
|
-
let rollbarEnv = document.head.querySelector('meta[name=rollbar-env]')
|
14
|
-
rollbarEnv = rollbarEnv && rollbarEnv.content
|
15
|
-
rollbarEnv = rollbarEnv || 'unknown'
|
16
12
|
|
17
|
-
|
13
|
+
let rollbarEnv = document.head.querySelector('meta[name=rollbar-env]')
|
14
|
+
rollbarEnv = rollbarEnv && rollbarEnv.content
|
15
|
+
rollbarEnv = rollbarEnv || 'unknown'
|
18
16
|
|
19
|
-
|
17
|
+
window.Rollbar = Rollbar
|
20
18
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
19
|
+
Rollbar.init()
|
20
|
+
|
21
|
+
Rollbar.global({
|
22
|
+
itemsPerMinute: 2,
|
23
|
+
maxItems: 5
|
24
|
+
})
|
25
|
+
Rollbar.configure({
|
26
|
+
enabled: !!rollbarToken,
|
27
|
+
accessToken: rollbarToken,
|
28
|
+
captureUncaught: true,
|
29
|
+
captureUnhandledRejections: true,
|
30
|
+
reportLevel: 'warning',
|
31
|
+
payload: {
|
32
|
+
environment: rollbarEnv
|
33
|
+
}
|
34
|
+
})
|
35
35
|
|
36
36
|
document.addEventListener('turbo:load', bindToasts)
|
37
37
|
document.addEventListener('turbo:render', bindToasts)
|
@@ -18,7 +18,8 @@ export default class extends Controller {
|
|
18
18
|
console.error(notBaseErrors.dataset.errors)
|
19
19
|
Rollbar.error(notBaseErrors.dataset.errors)
|
20
20
|
const errorTitle = this.element.querySelector('.error-title')
|
21
|
-
errorTitle.innerText = 'Lo lamentamos mucho pero ocurrió algo inesperado'
|
21
|
+
errorTitle.innerText = 'Lo lamentamos mucho pero ocurrió algo inesperado. Por favor, intentá nuevamente o ponete en contacto con nosotros.'
|
22
|
+
// FIXME: link a contacto
|
22
23
|
}
|
23
24
|
}
|
24
25
|
}
|
data/pg_rails/lib/version.rb
CHANGED