thecore_backend_commons 2.3.5 → 2.3.9

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: 3c5596374237552d4ec0b1c9834ebd0961020ec277d82b559f858b68896cfc6f
4
- data.tar.gz: 72f57b2e229e9edab1aa0b286464dee9e0fbf7345a5f8d1a2c3304032aca0d61
3
+ metadata.gz: 4f0f91b3e84ddc6c4806ad7817c33ba79b7a74c5ce7dcfa0d239da3b0a8ef7a7
4
+ data.tar.gz: 370f4986ee52a29add02d79c9c79a689f7106ff5534f90068a30f55af558213f
5
5
  SHA512:
6
- metadata.gz: f3d47655895f9939f7cfd43f3c4a0b909e5b461eacc558a143a6519789ee847f6adb2fe789adbdde54beca625fc1040a606000100fe22b61ea37b5bd6e1a0995
7
- data.tar.gz: d2155a112323a484eed5ea02c8d01af0dea485a306b4df4fa552f92707cb9ff785e744280b7c4228dbca16202ba113fa275819ef771c0a3146266e835f228638
6
+ metadata.gz: ad589b533c28130ec41e4f95597ac125a697859647b18ab6290fd0d94afb885b08ef7839117145ba6fe873f6c320e20e1ee0605913283aa2ea074a8808704b18
7
+ data.tar.gz: aa2342d04722a22fe29c5594d94e93be100f03009b206c9e79c3ea37d97e7e8b694076d1e82e7d377ed7927a1ef8692ca8d4ccbc627fd06d738abc363178b153
@@ -0,0 +1,4 @@
1
+ class ApplicationMailer < ActionMailer::Base
2
+ layout 'mailer'
3
+ end
4
+
@@ -0,0 +1,7 @@
1
+ Rails.application.config.session_store :cookie_store, {
2
+ :key => "_#{ENV["COMPOSE_PROJECT_NAME"].presence || "development"}_session",
3
+ :domain => :all,
4
+ :same_site => :none,
5
+ :secure => :true,
6
+ :tld_length => 3
7
+ }
@@ -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, ""
@@ -1,12 +1,12 @@
1
- module ActiveRecord
2
- module Tasks
3
- class PostgreSQLDatabaseTasks
4
- # Allows drop on DBs currently in use.
5
- def drop
6
- establish_master_connection
7
- connection.select_all "select pg_terminate_backend(pg_stat_activity.pid) from pg_stat_activity where datname='#{configuration['database']}' AND state='idle';"
8
- connection.drop_database configuration['database']
9
- end
10
- end
11
- end
12
- end
1
+ # module ActiveRecord
2
+ # module Tasks
3
+ # class PostgreSQLDatabaseTasks
4
+ # # Allows drop on DBs currently in use.
5
+ # def drop
6
+ # establish_master_connection
7
+ # connection.select_all "select pg_terminate_backend(pg_stat_activity.pid) from pg_stat_activity where datname='#{configuration['database']}' AND state='idle';"
8
+ # connection.drop_database configuration['database']
9
+ # end
10
+ # end
11
+ # end
12
+ # end
@@ -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.5
4
+ version: 2.3.9
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-25 00:00:00.000000000 Z
11
+ date: 2021-10-07 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