forest_admin_rails 1.0.0.pre.beta.21 → 1.0.0.pre.beta.23
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: 0e7eaabfa49605e07ae7ee1c3820c08451734c8e3e95fcbe2cfc34a65a564242
|
4
|
+
data.tar.gz: 6716ef3eff489e493187f9a04f1eb80b8127d02113fa89345fbf336c1128240b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6587884e8ca7a8b9430a139a2e409059904a623d31599e8d1e960510e93475052462459633a8885b6a2d662f7f1b07fc40305ebd8139ff669120fee9efea988
|
7
|
+
data.tar.gz: ee102eeddc07cbbe569e4ba77368b5e1bac92915369af442386ddc36a1b8c597ea971d646e7f8c520dea863c436c930c0409b5aafc14ea6ae8d4157e0d9333d1
|
@@ -33,19 +33,19 @@ module ForestAdminRails
|
|
33
33
|
{
|
34
34
|
name: exception.name,
|
35
35
|
detail: exception.message,
|
36
|
-
status: exception.status
|
36
|
+
status: exception.try(:status)
|
37
37
|
}
|
38
38
|
]
|
39
39
|
}
|
40
40
|
|
41
|
-
data[:errors][0][:data] = exception.
|
41
|
+
data[:errors][0][:data] = exception.try(:data)
|
42
42
|
|
43
43
|
# TODO: IMPLEMENT LOGGING
|
44
44
|
# if Facades::Container.cache(:is_production)
|
45
45
|
# end
|
46
46
|
end
|
47
47
|
|
48
|
-
render json: data, status: exception.status
|
48
|
+
render json: data, status: exception.try(:status)
|
49
49
|
end
|
50
50
|
end
|
51
51
|
end
|
@@ -38,6 +38,9 @@ module ForestAdminRails
|
|
38
38
|
# setup agent
|
39
39
|
require Rails.root.join('lib', 'forest_admin_rails', 'create_agent.rb')
|
40
40
|
ForestAdminRails::CreateAgent.setup!
|
41
|
+
|
42
|
+
sse = ForestAdminAgent::Services::SSECacheInvalidation
|
43
|
+
sse.run if ForestAdminRails.config[:instant_cache_refresh]
|
41
44
|
end
|
42
45
|
|
43
46
|
def load_cors
|
data/lib/forest_admin_rails.rb
CHANGED
@@ -18,12 +18,13 @@ module ForestAdminRails
|
|
18
18
|
setting :forest_server_url, default: 'https://api.forestadmin.com'
|
19
19
|
setting :is_production, default: Rails.env.production?
|
20
20
|
setting :prefix, default: 'forest'
|
21
|
-
setting :permission_expiration, default:
|
21
|
+
setting :permission_expiration, default: 900
|
22
22
|
setting :cache_dir, default: :'tmp/cache/forest_admin'
|
23
23
|
setting :schema_path, default: File.join(Dir.pwd, '.forestadmin-schema.json')
|
24
24
|
setting :project_dir, default: Dir.pwd
|
25
25
|
setting :loggerLevel, default: 'info'
|
26
26
|
setting :logger, default: nil
|
27
|
+
setting :instant_cache_refresh, default: Rails.env.production?
|
27
28
|
|
28
29
|
if defined?(Rails::Railtie)
|
29
30
|
# logic for cors middleware,... here // or it might be into Engine
|
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.23
|
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: 2023-
|
12
|
+
date: 2023-12-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dry-configurable
|