8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/forest_liana/bootstrapper.rb', line 8
def initialize(reset_api_map = false)
if reset_api_map
ForestLiana.apimap = []
ForestLiana.models = []
end
@integration_stripe_valid = false
@integration_intercom_valid = false
if ForestLiana.secret_key && ForestLiana.auth_key
FOREST_LOGGER.warn "DEPRECATION WARNING: The use of " \
"ForestLiana.secret_key and ForestLiana.auth_key " \
"(config/initializers/forest_liana.rb) is deprecated. Please use " \
"ForestLiana.env_secret and ForestLiana.auth_secret instead."
ForestLiana.env_secret = ForestLiana.secret_key
ForestLiana.auth_secret = ForestLiana.auth_key
end
if ForestLiana.forest_client_id
FOREST_LOGGER.warn "DEPRECATION WARNING: The use of " \
"ForestLiana.forest_client_id is deprecated. It's not needed anymore."
end
unless Rails.application.config.action_controller.perform_caching || Rails.env.test?
FOREST_LOGGER.error "You need to enable caching on your environment to use Forest Admin.\n" \
"For a development environment, run: `rails dev:cache`"
end
fetch_models
check_integrations_setup
namespace_duplicated_models
create_factories
generate_apimap if ForestLiana.env_secret
end
|