forest_liana 2.14.0 → 2.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/forest_liana/bootstraper.rb +9 -17
- data/lib/forest_liana/engine.rb +9 -6
- data/lib/forest_liana/version.rb +1 -1
- data/lib/tasks/display_apimap.rake +1 -1
- data/lib/tasks/send_apimap.rake +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ce4030cedcac769bd40e4afd1306ad13ed9dea3
|
4
|
+
data.tar.gz: bf9dc1cdd5707b44785d01d25d0ffa430209c50e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74ae6028636c45a649ffaa79feac4e87cbdff5a3a2998280f2334ae4f5c156949751fb5646e382c172a3a2a941ffff677f84e37a173a02317e34269ed31d94c7
|
7
|
+
data.tar.gz: 4973bc1d6fe9fd409fee6541c309093d1aa21a25a3645f12f59618c207cdc4cc4d39ed1855c19c9249b0fcdd0d7e4b773b456c875acc2354305f80868c8aae8f
|
@@ -13,35 +13,27 @@ module ForestLiana
|
|
13
13
|
ForestLiana.env_secret = ForestLiana.secret_key
|
14
14
|
ForestLiana.auth_secret = ForestLiana.auth_key
|
15
15
|
end
|
16
|
-
end
|
17
16
|
|
18
|
-
|
19
|
-
|
17
|
+
fetch_models
|
18
|
+
check_integrations_setup
|
19
|
+
namespace_duplicated_models
|
20
|
+
create_factories
|
20
21
|
|
21
|
-
if ForestLiana.env_secret
|
22
|
-
generate_apimap
|
23
|
-
send_apimap(with_feedback)
|
24
|
-
end
|
22
|
+
generate_apimap if ForestLiana.env_secret
|
25
23
|
end
|
26
24
|
|
27
|
-
def
|
28
|
-
|
25
|
+
def synchronize(with_feedback=false)
|
26
|
+
send_apimap(with_feedback) if ForestLiana.env_secret
|
27
|
+
end
|
29
28
|
|
29
|
+
def display_apimap
|
30
30
|
if ForestLiana.env_secret
|
31
|
-
generate_apimap
|
32
31
|
puts " = Current Forest Apimap:\n#{JSON.pretty_generate(get_apimap_serialized)}"
|
33
32
|
end
|
34
33
|
end
|
35
34
|
|
36
35
|
private
|
37
36
|
|
38
|
-
def introspect_and_generate_factories
|
39
|
-
fetch_models
|
40
|
-
check_integrations_setup
|
41
|
-
namespace_duplicated_models
|
42
|
-
create_factories
|
43
|
-
end
|
44
|
-
|
45
37
|
def generate_apimap
|
46
38
|
create_apimap
|
47
39
|
require_lib_forest_liana
|
data/lib/forest_liana/engine.rb
CHANGED
@@ -61,18 +61,21 @@ module ForestLiana
|
|
61
61
|
end
|
62
62
|
|
63
63
|
config.after_initialize do |app|
|
64
|
-
if !Rails.env.test?
|
64
|
+
if !Rails.env.test?
|
65
65
|
if error
|
66
66
|
FOREST_LOGGER.error "Impossible to set the whitelisted Forest " \
|
67
67
|
"domains for CORS constraint:\n#{error}"
|
68
68
|
end
|
69
69
|
|
70
|
-
|
71
|
-
eager_load_active_record_descendants(app)
|
70
|
+
eager_load_active_record_descendants(app)
|
72
71
|
|
73
|
-
|
74
|
-
|
75
|
-
|
72
|
+
if database_available?
|
73
|
+
# NOTICE: Do not run the code below on rails g forest_liana:install.
|
74
|
+
if ForestLiana.env_secret || ForestLiana.secret_key
|
75
|
+
unless rake?
|
76
|
+
bootstraper = Bootstraper.new
|
77
|
+
bootstraper.synchronize unless ENV['FOREST_DEACTIVATE_AUTOMATIC_APIMAP']
|
78
|
+
end
|
76
79
|
end
|
77
80
|
end
|
78
81
|
end
|
data/lib/forest_liana/version.rb
CHANGED
@@ -2,7 +2,7 @@ namespace :forest do
|
|
2
2
|
desc "Display the current Forest Apimap version"
|
3
3
|
task(:display_apimap).clear
|
4
4
|
task display_apimap: :environment do
|
5
|
-
bootstraper = ForestLiana::Bootstraper.new
|
5
|
+
bootstraper = ForestLiana::Bootstraper.new
|
6
6
|
bootstraper.display_apimap
|
7
7
|
end
|
8
8
|
end
|
data/lib/tasks/send_apimap.rake
CHANGED
@@ -3,8 +3,8 @@ namespace :forest do
|
|
3
3
|
task(:send_apimap).clear
|
4
4
|
task send_apimap: :environment do
|
5
5
|
if ForestLiana.env_secret
|
6
|
-
bootstraper = ForestLiana::Bootstraper.new
|
7
|
-
bootstraper.
|
6
|
+
bootstraper = ForestLiana::Bootstraper.new
|
7
|
+
bootstraper.synchronize(true)
|
8
8
|
else
|
9
9
|
puts 'Cannot send the Apimap, Forest cannot find your env_secret'
|
10
10
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest_liana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.14.
|
4
|
+
version: 2.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandro Munda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|