thecore_backend_commons 2.4.0 → 2.4.2

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: 9a5898c5ad05a5670c1019f14d29998378b71d653266ff04ad8d524b381d7c6e
4
- data.tar.gz: 1d9a36cf0d5ddb19d7c4b3746b608fde574b828a4de2f230d7717a6447a2780e
3
+ metadata.gz: 9d9b50144b153933f5f112d06654851f419d676bbf8870a860d7ff0950f6cfdc
4
+ data.tar.gz: 846b3a2f1199272bba51015bcc8227892f0e66fffd4491ba11b290f24f464ede
5
5
  SHA512:
6
- metadata.gz: 5ee8e9252e1f257b01607401025da9ad4dd3928f5e7a70299284873af7a8e8f1767d8aca5da6c2e9792a329d4b7d04dc3cb4c79401fcc7da0200afd14cf773e9
7
- data.tar.gz: afef0a21cbf27e3c8f01802ce2935018ce7823fe23c91f02d4b00c46136bf7381a724e0d2df92a6e0423f2c00bb827c91d66b569359eb02d65537e5fde30543a
6
+ metadata.gz: 7c8ae19d1f950f7ff645ef0a155825dc76fe828d9b53818d0589bde79df7cb5d4103c8172b5ed016d7a1875b85a3e9de693d079d743306c89e3fcbf3110fc0f5
7
+ data.tar.gz: 89322cd50c81acffa5323ee5d2f470149f00feb65beef474cbe08d31e8427f60e572165a3a8987c59a7e5e86b537304fd6f71ed090a563e9dca7337a6bf63a81
@@ -1,5 +1,25 @@
1
1
  module ThecoreBackendCommons
2
2
  class Engine < ::Rails::Engine
3
+ initializer "thecore_backend_commons.assets.precompile" do |app|
4
+ # Here you can place the assets provided by this engine in order for them to be precompiled in production and JIT
5
+ # compiled in development.
6
+ # As an example:
7
+ # app.config.assets.precompile += %w( overrides.css )
8
+ # app.config.assets.precompile += %w( android-chrome-192x192.png )
9
+ if ENV['COMPOSE_PROJECT_NAME'].present? && ENV['BASE_DOMAIN'].present?
10
+ puts "WHITE LABEL is in place for vendor/custombuilds/#{ENV['COMPOSE_PROJECT_NAME']}.#{ENV['BASE_DOMAIN']}/deltas/app"
11
+ # Somewhat white label support
12
+ app.config.autoload_paths += %W(
13
+ vendor/custombuilds/#{ENV['COMPOSE_PROJECT_NAME']}.#{ENV['BASE_DOMAIN']}/deltas/app/models
14
+ vendor/custombuilds/#{ENV['COMPOSE_PROJECT_NAME']}.#{ENV['BASE_DOMAIN']}/deltas/app/jobs
15
+ vendor/custombuilds/#{ENV['COMPOSE_PROJECT_NAME']}.#{ENV['BASE_DOMAIN']}/deltas/app/mailers
16
+ vendor/custombuilds/#{ENV['COMPOSE_PROJECT_NAME']}.#{ENV['BASE_DOMAIN']}/deltas/db
17
+ )
18
+ end
19
+ end
20
+ initializer 'thecore_backend_commons.add_to_thecore_engines_list' do |app|
21
+ Thecore::Base.thecore_engines << self.class
22
+ end
3
23
  initializer 'thecore_backend_commons.add_to_migrations' do |app|
4
24
  # Adds the list of Thecore Engines, so to manage seeds loading, i.e.:
5
25
  # Thecore::Base.thecore_engines.each { |engine| engine.load_seed }
@@ -24,5 +24,10 @@ module Thecore
24
24
  Settings.ns(ns)[setting] = value unless value.blank?
25
25
  end
26
26
  end
27
+
28
+ def self.delete_setting ns, setting
29
+ puts "Removing setting #{ns}: #{setting}"
30
+ ThecoreSettings::Setting.where(ns: ns, key: setting).destroy_all
31
+ end
27
32
  end
28
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_backend_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-11 00:00:00.000000000 Z
11
+ date: 2022-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_auth_commons