pg_rails 7.0.8.pre.alpha.28 → 7.0.8.pre.alpha.30
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: b05880ae4efef4a5609afd7b2e722d1080f34975dfc30fba718c315288183c42
|
4
|
+
data.tar.gz: 77ada8099f446b1f700a2d658e426ac2579302f751e282f133a0dcb77b279815
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67e2e272267f0f12ddf35a17ab95d49043969ce4f4ccfb193c8640906ebe14eba6385778f6794523ed07f9cc0e86d8f24f51a43bad514580139c62dffdf42d5d
|
7
|
+
data.tar.gz: b46640f9d513ce67fa3519fa4c30928b4743d5e0fda32988b5c3568a4f85902d87a404bcc99effbe900a06bdbc8c9856a7c2074934b82f08ba49c071de563cc7
|
@@ -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/pg_rails.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require "#{__dir__}/../../pg_engine/lib/pg_engine"
|
2
2
|
require "#{__dir__}/../../pg_associable/lib/pg_associable"
|
3
|
-
require "#{__dir__}/../../pg_scaffold/lib/pg_scaffold"
|
3
|
+
require "#{__dir__}/../../pg_scaffold/lib/pg_scaffold" if Rails.env.local?
|
4
4
|
require "#{__dir__}/../../pg_layout/lib/pg_layout"
|
5
5
|
|
6
6
|
module PgRails
|
data/pg_rails/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.8.pre.alpha.
|
4
|
+
version: 7.0.8.pre.alpha.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martín Rosso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|