forest_liana 9.15.8 → 9.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/forest_liana/bootstrapper.rb +21 -1
- data/lib/forest_liana/version.rb +1 -1
- data/lib/forest_liana.rb +2 -0
- data/spec/spec_helper.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e5b410cf0b004c0b725119f7f0d4328165b344579181d022930a3965c53569b6
|
|
4
|
+
data.tar.gz: 0c69947edf290b25d2fa53503f9f754a3d0d73e571ef6af525969c201bb0e469
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8391f47c0f3731827d4170eaae994e230b8567a6166b344581876576d10eabf1df964ae51b1480823ba2d50b3ef08bd53a99851d29dc4db26b92fe60d3df126e
|
|
7
|
+
data.tar.gz: 5a934a2555b71fed7b80d49546435c1141223b9d6ba00a7443bf8503e76c1aa38211c906cd95da091242a024e30da9c1007ce5491a4d70a1731cbf4df1b19b07
|
|
@@ -264,6 +264,11 @@ module ForestLiana
|
|
|
264
264
|
end
|
|
265
265
|
|
|
266
266
|
def send_apimap(with_feedback=false)
|
|
267
|
+
if should_skip_schema_update?
|
|
268
|
+
log_schema_skip
|
|
269
|
+
return
|
|
270
|
+
end
|
|
271
|
+
|
|
267
272
|
if ForestLiana.env_secret && ForestLiana.env_secret.length != 64
|
|
268
273
|
FOREST_LOGGER.error "Your env_secret does not seem to be correct. " \
|
|
269
274
|
"Can you check on Forest that you copied it properly in the " \
|
|
@@ -275,7 +280,12 @@ module ForestLiana
|
|
|
275
280
|
puts " = Sending Forest Apimap:\n#{JSON.pretty_generate(apimap)}" if with_feedback
|
|
276
281
|
uri = URI.parse("#{forest_url}/forest/apimaps")
|
|
277
282
|
http = Net::HTTP.new(uri.host, uri.port)
|
|
278
|
-
|
|
283
|
+
if forest_url.start_with?('https')
|
|
284
|
+
http.use_ssl = true
|
|
285
|
+
if ENV['FOREST_URL'].present?
|
|
286
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
|
287
|
+
end
|
|
288
|
+
end
|
|
279
289
|
http.start do |client|
|
|
280
290
|
request = Net::HTTP::Post.new(uri.path)
|
|
281
291
|
request.body = apimap.to_json
|
|
@@ -667,5 +677,15 @@ module ForestLiana
|
|
|
667
677
|
'unknown'
|
|
668
678
|
end
|
|
669
679
|
end
|
|
680
|
+
|
|
681
|
+
def should_skip_schema_update?
|
|
682
|
+
ForestLiana.skip_schema_update == true
|
|
683
|
+
end
|
|
684
|
+
|
|
685
|
+
def log_schema_skip
|
|
686
|
+
FOREST_LOGGER.warn '[ForestAdmin] Schema update skipped (skip_schema_update flag is true)'
|
|
687
|
+
environment = Rails.env.production? ? 'production' : 'development'
|
|
688
|
+
FOREST_LOGGER.info "[ForestAdmin] Running in #{environment} mode"
|
|
689
|
+
end
|
|
670
690
|
end
|
|
671
691
|
end
|
data/lib/forest_liana/version.rb
CHANGED
data/lib/forest_liana.rb
CHANGED
|
@@ -29,6 +29,7 @@ module ForestLiana
|
|
|
29
29
|
mattr_accessor :meta
|
|
30
30
|
mattr_accessor :logger
|
|
31
31
|
mattr_accessor :reporter
|
|
32
|
+
mattr_accessor :skip_schema_update
|
|
32
33
|
# TODO: Remove once lianas prior to 2.0.0 are not supported anymore.
|
|
33
34
|
mattr_accessor :names_old_overriden
|
|
34
35
|
|
|
@@ -42,6 +43,7 @@ module ForestLiana
|
|
|
42
43
|
self.meta = {}
|
|
43
44
|
self.logger = nil
|
|
44
45
|
self.reporter = nil
|
|
46
|
+
self.skip_schema_update = false
|
|
45
47
|
|
|
46
48
|
@config_dir = 'lib/forest_liana/**/*.rb'
|
|
47
49
|
|
data/spec/spec_helper.rb
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
require 'simplecov'
|
|
2
|
+
require 'simplecov_json_formatter'
|
|
3
|
+
require 'simplecov-html'
|
|
4
|
+
|
|
5
|
+
SimpleCov.formatters = [SimpleCov::Formatter::JSONFormatter, SimpleCov::Formatter::HTMLFormatter]
|
|
2
6
|
SimpleCov.start 'rails'
|
|
3
7
|
SimpleCov.add_filter ['app/services/forest_liana/ability/fetch.rb', 'lib/forest_liana/version.rb']
|
|
4
8
|
|
|
9
|
+
SimpleCov.coverage_dir 'coverage'
|
|
10
|
+
SimpleCov.at_exit do
|
|
11
|
+
result = SimpleCov.result
|
|
12
|
+
result.format!
|
|
13
|
+
end
|
|
14
|
+
|
|
5
15
|
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
|
|
6
16
|
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
|
7
17
|
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
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: 9.
|
|
4
|
+
version: 9.16.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sandro Munda
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-12-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|