thecore_backend_commons 2.3.4 → 2.3.8
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/app/mailers/application_mailer.rb +4 -0
- data/config/initializers/thecore_backend_commons_app_archetypes.rb +15 -0
- data/config/initializers/thecore_backend_commons_app_configs.rb +3 -1
- data/db/seeds.rb +12 -1
- data/lib/patches/postgresql_drop_replacement.rb +12 -12
- data/lib/thecore_backend_commons.rb +13 -2
- metadata +7 -7
- data/db/migrate/20161227101954_create_rails_admin_settings.rb +0 -25
- data/lib/concerns/thecore_backend_commons_user.rb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 915dc909c9d1f93bb28915d3fd4991f3864814cc97755fd592722bd8c03b0de9
|
4
|
+
data.tar.gz: cab3a82d76be74142b1ff1afa4b53a4c0c68b97232f21bd4118936da1eb9b394
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de0fab3dce0d736a33255f9ecc5d8f9574388fa8ab2cf430842593779b8579a67e2c8e9ea46e2840074d40bc374a1c05c065b01426c573de8818b3cb8420b54a
|
7
|
+
data.tar.gz: 9abb21b64a7426105086ea0a84dc1143f359c762843ca16094ac2b190584b53cfe3415bbdb253fb4b448a03e60ba287d99316c95091980095d4eb655d4c8184f
|
@@ -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
|
-
|
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
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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
|
@@ -2,10 +2,9 @@ require 'thecore_auth_commons'
|
|
2
2
|
require 'devise-i18n'
|
3
3
|
require 'http_accept_language'
|
4
4
|
require 'rails-i18n'
|
5
|
-
require '
|
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.
|
4
|
+
version: 2.3.8
|
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-
|
11
|
+
date: 2021-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_auth_commons
|
@@ -67,19 +67,19 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '2.1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: thecore_settings
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '2.0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '2.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: roo
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -121,13 +121,13 @@ 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/thecore_backend_commons_app_archetypes.rb
|
124
126
|
- config/initializers/thecore_backend_commons_app_configs.rb
|
125
127
|
- config/locales/en.devise.custom.yml
|
126
128
|
- config/locales/it.devise.custom.yml
|
127
129
|
- config/routes.rb
|
128
|
-
- db/migrate/20161227101954_create_rails_admin_settings.rb
|
129
130
|
- db/seeds.rb
|
130
|
-
- lib/concerns/thecore_backend_commons_user.rb
|
131
131
|
- lib/patches/active_record_extensions.rb
|
132
132
|
- lib/patches/application_record_loader.rb
|
133
133
|
- lib/patches/date_format.rb
|
@@ -1,25 +0,0 @@
|
|
1
|
-
class CreateRailsAdminSettings < ActiveRecord::Migration[5.0]
|
2
|
-
def change
|
3
|
-
create_table :rails_admin_settings do |t|
|
4
|
-
t.boolean :enabled, default: true
|
5
|
-
t.string :kind, null: false, default: 'string'
|
6
|
-
t.string :ns, default: 'main'
|
7
|
-
t.string :key, null: false
|
8
|
-
if Object.const_defined?('Geocoder')
|
9
|
-
t.float :latitude
|
10
|
-
t.float :longitude
|
11
|
-
end
|
12
|
-
t.text :raw
|
13
|
-
t.string :label
|
14
|
-
if defined?(Paperclip)
|
15
|
-
t.attachment :file
|
16
|
-
elsif defined?(CarrierWave)
|
17
|
-
t.string :file
|
18
|
-
end
|
19
|
-
t.timestamps
|
20
|
-
end
|
21
|
-
|
22
|
-
add_index :rails_admin_settings, :key
|
23
|
-
add_index :rails_admin_settings, [:ns, :key], unique: true
|
24
|
-
end
|
25
|
-
end
|