thecore_backend_commons 2.3.3 → 2.3.7

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: a71a84f3ec7b4d1f7b04f5364a3fe06cb276780877e7e42f900e2dc127db08f5
4
- data.tar.gz: 1e4864c9729010d64fb31c01cc83cd239c926624b35490d761693220a57a81f9
3
+ metadata.gz: 5ee4ecdbd341f7445539331e8678e7ec1f26926e67a9f4e22aedc024f751b46b
4
+ data.tar.gz: 939b0f3bc29138f049df4ba054a447028a27d3c3ef44d29743264d45d6816035
5
5
  SHA512:
6
- metadata.gz: f3461a0da170cbab9aeae2fa65b7a2c0f57bcbc454b491ae4378a4a6cbd31cf991f8e3a7c1d31132ee4b78f505269c5d055c4f8b683207b0e966975b32d830db
7
- data.tar.gz: ed8dd31419464a8c1bc486646add1ddd099438500a478747ae93006e62403735837da75aa00b85519f240946e001c55c9a3984f9be272587a30fb825e192b13b
6
+ metadata.gz: 4a5772b09a6a0d84bd15311761655212176199c69eaef0ee86ece981338dc7f25404806f113d057c7217077e8fad2a29837637ac5d14e29b40ea227825600a81
7
+ data.tar.gz: ded97fa05e0ada92cda27203fc6b7fa8ed6cc26d38cb8250a18abcf2cb60396e477fdc470b00e8a8f93ea43e6c6c03330cc5e4ca4d9c605a18a2098e728e6151
@@ -0,0 +1,4 @@
1
+ class ApplicationMailer < ActionMailer::Base
2
+ layout 'mailer'
3
+ end
4
+
@@ -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
data/db/seeds.rb CHANGED
@@ -1,2 +1,12 @@
1
1
  puts "Loading ThecoreBackendCommons seeds"
2
2
  Settings.app_name = "The Core by Gabriele Tassoni"
3
+
4
+ Thecore::Seed.save_setting :smtp, :delivery_method, nil
5
+ Thecore::Seed.save_setting :smtp, :from, nil
6
+ Thecore::Seed.save_setting :smtp, :address, nil
7
+ Thecore::Seed.save_setting :smtp, :port, nil
8
+ Thecore::Seed.save_setting :smtp, :domain, nil
9
+ Thecore::Seed.save_setting :smtp, :user_name, nil
10
+ Thecore::Seed.save_setting :smtp, :password, nil
11
+ Thecore::Seed.save_setting :smtp, :authentication, nil
12
+ Thecore::Seed.save_setting :smtp, :enable_starttls_auto, nil
@@ -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
@@ -2,13 +2,24 @@ require 'thecore_auth_commons'
2
2
  require 'devise-i18n'
3
3
  require 'http_accept_language'
4
4
  require 'rails-i18n'
5
- require 'rails_admin_settings'
5
+ require 'thecore_settings'
6
6
 
7
7
  require 'patches/thecore'
8
8
  require 'concerns/thecore_backend_commons_user'
9
9
 
10
+ require 'roo'
11
+ require 'roo-xls'
12
+
10
13
  require "thecore_backend_commons/engine"
11
14
 
12
15
  module ThecoreBackendCommons
13
16
  # Your code goes here...
14
17
  end
18
+
19
+ module Thecore
20
+ class Seed
21
+ def self.save_setting ns, setting, value
22
+ Settings.ns(ns)[setting] = value if Settings.ns(ns)[setting].blank?
23
+ end
24
+ end
25
+ 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.3
4
+ version: 2.3.7
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-03-16 00:00:00.000000000 Z
11
+ date: 2021-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_auth_commons
@@ -67,19 +67,47 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '2.1'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rails_admin_settings
70
+ name: thecore_settings
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.5'
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: '1.5'
82
+ version: '2.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: roo
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '2.8'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '2.8'
97
+ - !ruby/object:Gem::Dependency
98
+ name: roo-xls
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.2'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.2'
83
111
  description: Wrapper to keep all the common libraries and setups needed by Thecore
84
112
  UI Backend(s).
85
113
  email:
@@ -93,11 +121,12 @@ files:
93
121
  - Rakefile
94
122
  - app/assets/config/thecore_backend_commons_manifest.js
95
123
  - app/jobs/application_job.rb
124
+ - app/mailers/application_mailer.rb
125
+ - config/initializers/thecore_backend_commons_app_archetypes.rb
96
126
  - config/initializers/thecore_backend_commons_app_configs.rb
97
127
  - config/locales/en.devise.custom.yml
98
128
  - config/locales/it.devise.custom.yml
99
129
  - config/routes.rb
100
- - db/migrate/20161227101954_create_rails_admin_settings.rb
101
130
  - db/seeds.rb
102
131
  - lib/concerns/thecore_backend_commons_user.rb
103
132
  - lib/patches/active_record_extensions.rb
@@ -131,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
160
  - !ruby/object:Gem::Version
132
161
  version: '0'
133
162
  requirements: []
134
- rubygems_version: 3.0.3
163
+ rubygems_version: 3.0.3.1
135
164
  signing_key:
136
165
  specification_version: 4
137
166
  summary: Thecore 2 foundations for the Web UI Backend.
@@ -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