thecore_auth_commons 3.2.2 → 3.2.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 77d175fb8de34406d076515673bca031991b42fac0e5562a3b4c01d7b207baac
4
- data.tar.gz: 58e37efaf6e443e55c8af1c556703ea6e47cfa16721f712280667c15492c0e2f
3
+ metadata.gz: d01976e6049e0a9167596a63997019663b04bab90675d7d4e3386517a9f38c93
4
+ data.tar.gz: 6a0b3e04d0f92840aff1b4af73df107b98949243500126779d29f201f03a4c0b
5
5
  SHA512:
6
- metadata.gz: ef223878f5bb30c360529e0fcdd6ce9db2e6425660fb6a6a4ce9813f7e0cb73f3882e2e09d1971bbf9e217dfcbeb0bac1570a43ce8bcc07503ff8c101987e66d
7
- data.tar.gz: ded1ed3a1b67e21eaf01c063096ac15ce7ed1b53d7f84f116573fcdfc08fa780689701431a7710ed86a97d72364cfb6564a2b758fd3b06d68e118de896635c5d
6
+ metadata.gz: 97e08cc352e3024d2f68d43f71e7e9836a9d2d6e0cbe4df5dc796853374009d17291904a70907f50f57ed38aab023434324a0e1d2bc756734c18c8261f9b4458
7
+ data.tar.gz: c420c037d2d559e495347e72dcb4f835b57c0d2581e1b8dcd99aa3db42e64dddcfb243303144be0a11f1d5b851f40af928e78f286ca5c712fd05d827a790488b
data/README.md CHANGED
@@ -1 +1,6 @@
1
1
  This is part of Thecore framework: https://github.com/gabrieletassoni/thecore/tree/release/3
2
+
3
+ It exposes two Env vars to chage the behaviour of Devise at startup:
4
+
5
+ - MIN_PASSWORD_LENGTH: the minimum length of the password (default: 8)
6
+ - SESSION_TIMEOUT_IN_MINUTES: the session timeout in minutes (default: 30)
data/app/models/user.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  class User < ApplicationRecord
2
- devise :database_authenticatable, :rememberable, :validatable
2
+ # Get the minimum password length from the Environemnt or set it to 8
3
+ devise :database_authenticatable, :rememberable, :trackable, :timeoutable, :validatable, password_length: ENV.fetch('MIN_PASSWORD_LENGTH', 8).to_i..128, timeout_in: ENV.fetch('SESSION_TIMEOUT_IN_MINUTES', 31).to_i.minutes
3
4
  end
@@ -3,6 +3,9 @@ Rails.application.configure do
3
3
  # In development be sure to load all the namespaces
4
4
  # in order to have working reflection
5
5
  Zeitwerk::Loader.eager_load_all if Rails.env.development?
6
+
7
+ # Devise.timeout_in = ENV.fetch('SESSION_TIMEOUT_IN_MINUTES', 31).to_i.minutes
8
+ # Devise.password_length = ENV.fetch('MIN_PASSWORD_LENGTH', 8).to_i..128
6
9
 
7
10
  Ability.send(:include, ThecoreAuthCommonsCanCanCanConcern)
8
11
  User.send(:include, ThecoreAuthCommonsUserConcern)
@@ -1,3 +1,3 @@
1
1
  module ThecoreAuthCommons
2
- VERSION = "3.2.2".freeze
2
+ VERSION = "3.2.3".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_auth_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.2
4
+ version: 3.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-09-11 00:00:00.000000000 Z
10
+ date: 2025-02-12 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: devise
@@ -212,7 +211,6 @@ metadata:
212
211
  homepage_uri: https://github.com/gabrieletassoni/thecore_auth_commons
213
212
  source_code_uri: https://github.com/gabrieletassoni/thecore_auth_commons
214
213
  changelog_uri: https://github.com/gabrieletassoni/thecore_auth_commons/blob/master/CHANGELOG.md
215
- post_install_message:
216
214
  rdoc_options: []
217
215
  require_paths:
218
216
  - lib
@@ -227,8 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
227
225
  - !ruby/object:Gem::Version
228
226
  version: '0'
229
227
  requirements: []
230
- rubygems_version: 3.5.16
231
- signing_key:
228
+ rubygems_version: 3.6.2
232
229
  specification_version: 4
233
230
  summary: Common Auth methods and models to be used in thecore components.
234
231
  test_files: []