thecore_backend_commons 2.3.6 → 2.3.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 867b27ac90b393d9a597085fc1dabc9eed6d7ac11de2184fe7c93c34a3c68e86
4
- data.tar.gz: 64a51cb562f243ab30f61a4ae7fa6da45916a25cd92bde0ab3124903c80ddd40
3
+ metadata.gz: ca25b36fe1e16f465bccf07afc6ced0be87794ff7078f22bea10ee204881d685
4
+ data.tar.gz: 754cb8354072e6f6e57bc8f23cbb02963cf7a5629e9725d7937e24b768a1dc01
5
5
  SHA512:
6
- metadata.gz: 1607bd4f56df8bad489fa46f16b6f515316352824b9c7758d73d6a618336fa383bee801301f77d2391d625844053e424cbcc71231997c904b2b736076c484e16
7
- data.tar.gz: 0e0c81d36aa25c19aae726752a2b8b5b31182ca97c653de0c3d7ef502c541cd141984acb30a6d3ba279d66bcca92a6939df89557caac32b16ec60d84d95a8c67
6
+ metadata.gz: 95d1116496a846a77e22f0490969db21ff718d1a3b22e83c825c98910dcf85f97ed49881a2e4e9068f7b007432047e7c45d05ab318d8ab8b1b6f4803f66c199d
7
+ data.tar.gz: 0f5579c5e35064d337a8acf50b22265cce4e296bfb870cb85bab08ef34d76a7191eed655a9aa3b12fdb7b1c32bb213f9e34bee2d233dd55ccd2e8b610a1edf20
@@ -0,0 +1,4 @@
1
+ class ApplicationMailer < ActionMailer::Base
2
+ layout 'mailer'
3
+ end
4
+
@@ -0,0 +1,9 @@
1
+ # Rails.application.config.session_store :cookie_store, {
2
+ # :key => "_#{ENV["COMPOSE_PROJECT_NAME"].presence || "localhost"}_session",
3
+ # :domain => :all,
4
+ # :same_site => :none,
5
+ # :secure => :true,
6
+ # :compress => true,
7
+ # :pool_size => 10,
8
+ # :expire_after => 1.year
9
+ # }
@@ -0,0 +1,15 @@
1
+ class NilClass
2
+ def self.to_bool
3
+ false
4
+ end
5
+ def to_bool
6
+ false
7
+ end
8
+ end
9
+
10
+ class String
11
+ def to_bool
12
+ return true if self.downcase == "true"
13
+ false
14
+ end
15
+ end
@@ -8,6 +8,9 @@ Rails.application.configure do
8
8
  :Disk,
9
9
  root: Rails.root.join("storage")
10
10
  )
11
+
12
+ # ActionMailer
13
+ config.action_mailer.delivery_method = :smtp
11
14
  # AFTER INITIALIZE Good place to load things that must have a bit of initialization
12
15
  # setup on order to work (and not be overrided).
13
16
  config.after_initialize do
@@ -15,6 +18,5 @@ Rails.application.configure do
15
18
  ActiveRecord::Base.send(:include, ActiveRecordExtensions)
16
19
  Integer.send(:include, FixnumConcern)
17
20
  String.send(:include, StringConcern)
18
- User.send(:include, ThecoreBackendCommonsUser)
19
21
  end
20
22
  end
data/db/seeds.rb CHANGED
@@ -1,2 +1,13 @@
1
1
  puts "Loading ThecoreBackendCommons seeds"
2
- Settings.app_name = "The Core by Gabriele Tassoni"
2
+ Thecore::Seed.save_setting :main, :app_name, "The Core by Gabriele Tassoni"
3
+
4
+ puts "Loading ThecoreBackendCommons SMTP config"
5
+ Thecore::Seed.save_setting :smtp, :delivery_method, ""
6
+ Thecore::Seed.save_setting :smtp, :from, ""
7
+ Thecore::Seed.save_setting :smtp, :address, ""
8
+ Thecore::Seed.save_setting :smtp, :port, ""
9
+ Thecore::Seed.save_setting :smtp, :domain, ""
10
+ Thecore::Seed.save_setting :smtp, :user_name, ""
11
+ Thecore::Seed.save_setting :smtp, :password, ""
12
+ Thecore::Seed.save_setting :smtp, :authentication, ""
13
+ Thecore::Seed.save_setting :smtp, :enable_starttls_auto, ""
@@ -5,7 +5,6 @@ require 'rails-i18n'
5
5
  require 'thecore_settings'
6
6
 
7
7
  require 'patches/thecore'
8
- require 'concerns/thecore_backend_commons_user'
9
8
 
10
9
  require 'roo'
11
10
  require 'roo-xls'
@@ -15,3 +14,15 @@ require "thecore_backend_commons/engine"
15
14
  module ThecoreBackendCommons
16
15
  # Your code goes here...
17
16
  end
17
+
18
+ module Thecore
19
+ class Seed
20
+ def self.save_setting ns, setting, value
21
+ puts "Saving setting if nil #{ns}: #{setting} = #{value}"
22
+ if Settings.ns(ns)[setting].blank?
23
+ Settings.ns(ns)[setting] if value.blank?
24
+ Settings.ns(ns)[setting] = value unless value.blank?
25
+ end
26
+ end
27
+ end
28
+ 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.3.6
4
+ version: 2.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-27 00:00:00.000000000 Z
11
+ date: 2021-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_auth_commons
@@ -121,12 +121,14 @@ files:
121
121
  - Rakefile
122
122
  - app/assets/config/thecore_backend_commons_manifest.js
123
123
  - app/jobs/application_job.rb
124
+ - app/mailers/application_mailer.rb
125
+ - config/initializers/session_store.rb
126
+ - config/initializers/thecore_backend_commons_app_archetypes.rb
124
127
  - config/initializers/thecore_backend_commons_app_configs.rb
125
128
  - config/locales/en.devise.custom.yml
126
129
  - config/locales/it.devise.custom.yml
127
130
  - config/routes.rb
128
131
  - db/seeds.rb
129
- - lib/concerns/thecore_backend_commons_user.rb
130
132
  - lib/patches/active_record_extensions.rb
131
133
  - lib/patches/application_record_loader.rb
132
134
  - lib/patches/date_format.rb
@@ -1,8 +0,0 @@
1
- require 'active_support/concern'
2
-
3
- module ThecoreBackendCommonsUser
4
- extend ActiveSupport::Concern
5
-
6
- included do
7
- end
8
- end