forest_admin_rails 1.0.0.pre.beta.44 → 1.0.0.pre.beta.45
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: 7696d21374088f19a8d54af303bb426139c107655a26cd6a2b78b2f00e755ffe
|
4
|
+
data.tar.gz: 3bceaa9a99729f5158f980225ca0bb9b41ebd7168a050aa498c6447eb9945c73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a886fc6b4803e606503ccdc82b096cc397440ba4aa4b18afe04cec4487426d0fa2e9566cdfbcc87f60a93217f46df725ca6b6ea9ba47561e4933d1c36ec6a2b
|
7
|
+
data.tar.gz: 43ec992de5b002534b01a74964b3acfc5ef1a83ed3384d6de89a1edea7e3c34a0783fab4d569a4012309907249cb99016cd6b21be3cd08483b63fad417e2a3d9
|
@@ -47,10 +47,10 @@ module ForestAdminRails
|
|
47
47
|
}
|
48
48
|
|
49
49
|
data[:errors][0][:data] = exception.try(:data)
|
50
|
+
end
|
50
51
|
|
51
|
-
|
52
|
-
|
53
|
-
# end
|
52
|
+
unless Facades::Container.cache(:is_production)
|
53
|
+
ForestAdminAgent::Facades::Container.logger.log('Debug', exception.full_message)
|
54
54
|
end
|
55
55
|
|
56
56
|
render json: data, status: exception.try(:status)
|
data/config/routes.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
ForestAdminRails::Engine.routes.draw do
|
2
|
-
|
3
|
-
|
2
|
+
Rails.error.handle(ForestAdminDatasourceToolkit::Exceptions::ForestException) do
|
3
|
+
ForestAdminAgent::Http::Router.routes.each do |name, agent_route|
|
4
|
+
match agent_route[:uri], to: 'forest#index', via: agent_route[:method], as: name, route_alias: name
|
5
|
+
end
|
4
6
|
end
|
5
7
|
end
|
@@ -22,11 +22,19 @@ module ForestAdminRails
|
|
22
22
|
class Engine < ::Rails::Engine
|
23
23
|
isolate_namespace ForestAdminRails
|
24
24
|
|
25
|
+
extend ActiveSupport::Concern
|
26
|
+
|
27
|
+
initializer 'forest_admin_rails.error_subscribe' do
|
28
|
+
Rails.error.subscribe(ForestAdminErrorSubscriber.new)
|
29
|
+
end
|
30
|
+
|
25
31
|
config.after_initialize do
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
32
|
+
Rails.error.handle(ForestAdminDatasourceToolkit::Exceptions::ForestException) do
|
33
|
+
agent_factory = ForestAdminAgent::Builder::AgentFactory.instance
|
34
|
+
agent_factory.setup(ForestAdminRails.config)
|
35
|
+
load_configuration
|
36
|
+
load_cors
|
37
|
+
end
|
30
38
|
end
|
31
39
|
|
32
40
|
def load_configuration
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest_admin_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre.beta.
|
4
|
+
version: 1.0.0.pre.beta.45
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthieu
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-05-
|
12
|
+
date: 2024-05-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dry-configurable
|
@@ -68,6 +68,7 @@ files:
|
|
68
68
|
- Rakefile
|
69
69
|
- app/controllers/forest_admin_rails/forest_controller.rb
|
70
70
|
- app/helpers/forest_admin_rails/application_helper.rb
|
71
|
+
- config/initializers/forest_admin_error_subscriber.rb
|
71
72
|
- config/routes.rb
|
72
73
|
- lib/forest_admin_rails.rb
|
73
74
|
- lib/forest_admin_rails/engine.rb
|