thecore_backend_commons 2.2.4 → 2.2.5

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: 3fcecc224766d5f821032c8d6fd553c6aef6bae1d6f57a47511b3cba6a263633
4
- data.tar.gz: 98575087ff4be3f30c68a85ffb16a34a517e89e495926b243eb7d1ebc89f5c33
3
+ metadata.gz: 82149f563831770ec3f19bcd865462625a2cf8029312eeea7c3e25a9157960f3
4
+ data.tar.gz: e4cde439462a45b1f27d29a3cb60c0462c7a72d2ef8aa0d8b5064ca1b29a82f3
5
5
  SHA512:
6
- metadata.gz: 2ff4c636f60705b839aad89b496b73ecb2b671c0ca12c5972497ac297cc76cada7cee4d8238317868e1e6c5eaefac9109b9a838d708b74b7dee4260f013a7061
7
- data.tar.gz: aa555f4e0735c1e3c3ef35789c9de9793d79b0c4a32f5281c79a78aa6b2a6e32755e688f5139a9ad7c8174ab2417420d3384ef8d63349c16465bfaf1138ce655
6
+ metadata.gz: e355b6924cd95c543b86032493219de14b615ed686f1e45c7899b8d3af3b47cd01fe512fcd7032135a715d5103bd4c3363e253d2afd0a4fd16f17519246a5971
7
+ data.tar.gz: 7056954496cecf46edfdf9eec29c7c8f70e81ab854795c94ef6c1dbda9a61f1302193a539b1dba2825efe90f2812904214b5bcac36408706a629c7fb929e36c6
@@ -22,8 +22,6 @@ Rails.application.configure do
22
22
  ActiveRecord::Base.send(:include, ActiveRecordExtensions)
23
23
  Integer.send(:include, FixnumConcern)
24
24
  String.send(:include, StringConcern)
25
- RailsAdmin::Config::Actions::Export.send(:include, ExportConcern)
26
- RailsAdmin::Config::Actions::BulkDelete.send(:include, BulkDeleteConcern)
27
25
  User.send(:include, ThecoreBackendCommonsUser)
28
26
  end
29
27
  end
@@ -1,10 +1,12 @@
1
+ require 'active_support/concern'
2
+
1
3
  module ThecoreBackendCommonsUser
2
4
  extend ActiveSupport::Concern
3
5
 
4
6
  included do
5
7
  devise :rememberable
6
- devise :trackable
7
- devise :validatable
8
8
  devise :timeoutable, timeout_in: 30.minutes
9
+ validates :username, uniqueness: { case_sensitive: false }, presence: true, length: { in: 4..15 }
10
+ validates_format_of :username, with: /\A[a-zA-Z0-9]*\z/, on: :create, message: "can only contain letters and digits"
9
11
  end
10
12
  end
@@ -1,12 +1,9 @@
1
- require 'thecore_rails_admin_export_concern'
2
- require 'thecore_rails_admin_bulk_delete_concern'
1
+ require 'patches/date_format'
3
2
 
4
- require 'date_format'
3
+ require 'patches/string_extensions'
4
+ require 'patches/integer_extensions'
5
+ require 'patches/active_record_extensions'
5
6
 
6
- require 'string_extensions'
7
- require 'integer_extensions'
8
- require 'active_record_extensions'
7
+ require 'patches/postgresql_drop_replacement'
9
8
 
10
- require 'postgresql_drop_replacement'
11
-
12
- require 'application_record_loader'
9
+ require 'patches/application_record_loader'
@@ -1,3 +1,3 @@
1
1
  module ThecoreBackendCommons
2
- VERSION = '2.2.4'
2
+ VERSION = '2.2.5'
3
3
  end
@@ -1,11 +1,12 @@
1
- require "thecore_backend_commons/engine"
2
-
3
1
  require 'thecore_auth_commons'
4
2
  require 'devise-i18n'
5
3
  require 'http_accept_language'
6
4
  require 'rails-i18n'
7
5
 
8
6
  require 'patches/thecore'
7
+ require 'concerns/thecore_backend_commons_user'
8
+
9
+ require "thecore_backend_commons/engine"
9
10
 
10
11
  module ThecoreBackendCommons
11
12
  # Your code goes here...
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.2.4
4
+ version: 2.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-12 00:00:00.000000000 Z
11
+ date: 2020-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_auth_commons
@@ -98,8 +98,6 @@ files:
98
98
  - lib/patches/postgresql_drop_replacement.rb
99
99
  - lib/patches/string_extensions.rb
100
100
  - lib/patches/thecore.rb
101
- - lib/patches/thecore_rails_admin_bulk_delete_concern.rb
102
- - lib/patches/thecore_rails_admin_export_concern.rb
103
101
  - lib/tasks/thecore_backend_commons_tasks.rake
104
102
  - lib/thecore_backend_commons.rb
105
103
  - lib/thecore_backend_commons/engine.rb
@@ -1,16 +0,0 @@
1
- require 'active_support/concern'
2
-
3
- module BulkDeleteConcern
4
- extend ActiveSupport::Concern
5
- included do
6
- # Should the action be visible
7
- # Edit By taris, it shows the button only if there are records displayed
8
- register_instance_option :visible? do
9
- # If not in index, then return true,
10
- # otherwise it wont' be added to the list
11
- # of all Actions during rails initialization
12
- # In index, instead, I show it only if there are records in the current view
13
- bindings[:controller].action_name == "index" ? (authorized? && !bindings[:controller].instance_variable_get("@objects").blank?) : true
14
- end
15
- end
16
- end
@@ -1,16 +0,0 @@
1
- require 'active_support/concern'
2
-
3
- module ExportConcern
4
- extend ActiveSupport::Concern
5
- included do
6
- # Should the action be visible
7
- # Edit By taris, it shows the button only if there are records displayed
8
- register_instance_option :visible? do
9
- # If not in index, then return true,
10
- # otherwise it wont' be added to the list
11
- # of all Actions during rails initialization
12
- # In index, instead, I show it only if there are records in the current view
13
- bindings[:controller].action_name == "index" ? (authorized? && !bindings[:controller].instance_variable_get("@objects").blank?) : true
14
- end
15
- end
16
- end