thecore_backend_commons 2.2.7 → 2.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/db/migrate/20161227101954_create_rails_admin_settings.rb +25 -0
- data/db/seeds.rb +2 -0
- data/lib/concerns/thecore_backend_commons_user.rb +0 -2
- data/lib/thecore_backend_commons.rb +1 -0
- data/lib/thecore_backend_commons/engine.rb +3 -0
- data/lib/thecore_backend_commons/version.rb +1 -1
- metadata +18 -3
- data/db/migrate/20190920115549_create_active_storage_tables.active_storage.rb +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a71a84f3ec7b4d1f7b04f5364a3fe06cb276780877e7e42f900e2dc127db08f5
|
4
|
+
data.tar.gz: 1e4864c9729010d64fb31c01cc83cd239c926624b35490d761693220a57a81f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3461a0da170cbab9aeae2fa65b7a2c0f57bcbc454b491ae4378a4a6cbd31cf991f8e3a7c1d31132ee4b78f505269c5d055c4f8b683207b0e966975b32d830db
|
7
|
+
data.tar.gz: ed8dd31419464a8c1bc486646add1ddd099438500a478747ae93006e62403735837da75aa00b85519f240946e001c55c9a3984f9be272587a30fb825e192b13b
|
@@ -0,0 +1,25 @@
|
|
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
|
data/db/seeds.rb
ADDED
@@ -4,7 +4,5 @@ module ThecoreBackendCommonsUser
|
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
6
|
included do
|
7
|
-
validates :username, uniqueness: { case_sensitive: false }, presence: true, length: { in: 4..15 }
|
8
|
-
validates_format_of :username, with: /\A[a-zA-Z0-9]*\z/, on: :create, message: "can only contain letters and digits"
|
9
7
|
end
|
10
8
|
end
|
@@ -1,6 +1,9 @@
|
|
1
1
|
module ThecoreBackendCommons
|
2
2
|
class Engine < ::Rails::Engine
|
3
3
|
initializer 'thecore_backend_commons.add_to_migrations' do |app|
|
4
|
+
# Adds the list of Thecore Engines, so to manage seeds loading, i.e.:
|
5
|
+
# Thecore::Base.thecore_engines.each { |engine| engine.load_seed }
|
6
|
+
Thecore::Base.thecore_engines << self.class
|
4
7
|
unless app.root.to_s.match root.to_s
|
5
8
|
# APPEND TO MAIN APP MIGRATIONS FROM THIS GEM
|
6
9
|
config.paths['db/migrate'].expanded.each do |expanded_path|
|
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
|
+
version: 2.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_auth_commons
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '2.1'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rails_admin_settings
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.5'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.5'
|
69
83
|
description: Wrapper to keep all the common libraries and setups needed by Thecore
|
70
84
|
UI Backend(s).
|
71
85
|
email:
|
@@ -83,7 +97,8 @@ files:
|
|
83
97
|
- config/locales/en.devise.custom.yml
|
84
98
|
- config/locales/it.devise.custom.yml
|
85
99
|
- config/routes.rb
|
86
|
-
- db/migrate/
|
100
|
+
- db/migrate/20161227101954_create_rails_admin_settings.rb
|
101
|
+
- db/seeds.rb
|
87
102
|
- lib/concerns/thecore_backend_commons_user.rb
|
88
103
|
- lib/patches/active_record_extensions.rb
|
89
104
|
- lib/patches/application_record_loader.rb
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# This migration comes from active_storage (originally 20170806125915)
|
2
|
-
class CreateActiveStorageTables < ActiveRecord::Migration[5.2]
|
3
|
-
def change
|
4
|
-
create_table :active_storage_blobs do |t|
|
5
|
-
t.string :key, null: false
|
6
|
-
t.string :filename, null: false
|
7
|
-
t.string :content_type
|
8
|
-
t.text :metadata
|
9
|
-
t.bigint :byte_size, null: false
|
10
|
-
t.string :checksum, null: false
|
11
|
-
t.datetime :created_at, null: false
|
12
|
-
|
13
|
-
t.index [ :key ], unique: true
|
14
|
-
end
|
15
|
-
|
16
|
-
create_table :active_storage_attachments do |t|
|
17
|
-
t.string :name, null: false
|
18
|
-
t.references :record, null: false, polymorphic: true, index: false
|
19
|
-
t.references :blob, null: false
|
20
|
-
|
21
|
-
t.datetime :created_at, null: false
|
22
|
-
|
23
|
-
t.index [ :record_type, :record_id, :name, :blob_id ], name: "index_active_storage_attachments_uniqueness", unique: true
|
24
|
-
t.foreign_key :active_storage_blobs, column: :blob_id
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|