servactory 2.5.0.rc3 → 2.5.0.rc5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81e8630b2ea211b5dc7e84b9fdb0a3617a1f6d6dd4dc257eedd1b654b79af5d5
|
4
|
+
data.tar.gz: 2f91e9ecb08c940be78d22e2b737af42470fd0c9ec593a4bb8eae1f4905d0fa7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7b5ebee2a8041b78007a610b13b247df76382d33eae9f47b6d2fb2f443a1f25a67805815a756712b0f179867ee8485b3eaee61e6c03ebd4b51e0125578f77a3
|
7
|
+
data.tar.gz: 1c9df4f3145e43768edfec44bf9e49d8eebd22a5d213f71d7b938be2871dfcc927e544ae5e3856f0183ac12f3ceb382ef7153c20e11a4f8b4d551a37bad0aaba
|
data/README.md
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
<p align="center">
|
16
16
|
<a href="https://rubygems.org/gems/servactory"><img src="https://img.shields.io/gem/v/servactory?logo=rubygems&logoColor=fff" alt="Gem version"></a>
|
17
|
-
<a href="https://github.com/
|
17
|
+
<a href="https://github.com/servactory/servactory/releases"><img src="https://img.shields.io/github/release-date/servactory/servactory" alt="Release Date"></a>
|
18
18
|
</p>
|
19
19
|
|
20
20
|
## Documentation
|
@@ -213,7 +213,7 @@ module Servactory
|
|
213
213
|
)
|
214
214
|
end
|
215
215
|
|
216
|
-
def register_prepare_option # rubocop:disable Metrics/MethodLength
|
216
|
+
def register_prepare_option # rubocop:disable Metrics/MethodLength
|
217
217
|
collection << Servactory::Maintenance::Attributes::Option.new(
|
218
218
|
name: :prepare,
|
219
219
|
attribute: @attribute,
|
@@ -227,9 +227,6 @@ module Servactory
|
|
227
227
|
define_conflicts: [
|
228
228
|
Servactory::Maintenance::Attributes::DefineConflict.new(
|
229
229
|
content: -> { :prepare_vs_inclusion if @attribute.prepare_present? && @attribute.inclusion_present? }
|
230
|
-
),
|
231
|
-
Servactory::Maintenance::Attributes::DefineConflict.new(
|
232
|
-
content: -> { :prepare_vs_must if @attribute.prepare_present? && @attribute.must_present? }
|
233
230
|
)
|
234
231
|
],
|
235
232
|
need_for_checks: false,
|
@@ -3,16 +3,24 @@
|
|
3
3
|
module Servactory
|
4
4
|
module ToolKit
|
5
5
|
module DynamicOptions
|
6
|
-
class Format < Must
|
6
|
+
class Format < Must # rubocop:disable Metrics/ClassLength
|
7
7
|
DEFAULT_FORMATS = {
|
8
|
-
|
9
|
-
pattern: /^
|
10
|
-
validator: ->(value:) {
|
8
|
+
uuid: {
|
9
|
+
pattern: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,
|
10
|
+
validator: ->(value:) { value.present? }
|
11
11
|
},
|
12
12
|
email: {
|
13
13
|
pattern: URI::MailTo::EMAIL_REGEXP,
|
14
14
|
validator: ->(value:) { value.present? }
|
15
15
|
},
|
16
|
+
password: {
|
17
|
+
# NOTE: Pattern 4 » https://dev.to/rasaf_ibrahim/write-regex-password-validation-like-a-pro-5175
|
18
|
+
# Password must contain one digit from 1 to 9, one lowercase letter, one
|
19
|
+
# uppercase letter, and one underscore, and it must be 8-16 characters long.
|
20
|
+
# Usage of any other special character and usage of space is optional.
|
21
|
+
pattern: /^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]).{8,16}$/,
|
22
|
+
validator: ->(value:) { value.present? }
|
23
|
+
},
|
16
24
|
date: {
|
17
25
|
pattern: nil,
|
18
26
|
validator: lambda do |value:|
|
@@ -29,14 +37,6 @@ module Servactory
|
|
29
37
|
false
|
30
38
|
end
|
31
39
|
},
|
32
|
-
password: {
|
33
|
-
# NOTE: Pattern 4 » https://dev.to/rasaf_ibrahim/write-regex-password-validation-like-a-pro-5175
|
34
|
-
# Password must contain one digit from 1 to 9, one lowercase letter, one
|
35
|
-
# uppercase letter, and one underscore, and it must be 8-16 characters long.
|
36
|
-
# Usage of any other special character and usage of space is optional.
|
37
|
-
pattern: /^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]).{8,16}$/,
|
38
|
-
validator: ->(value:) { value.present? }
|
39
|
-
},
|
40
40
|
time: {
|
41
41
|
pattern: nil,
|
42
42
|
validator: lambda do |value:|
|
@@ -44,6 +44,10 @@ module Servactory
|
|
44
44
|
rescue ArgumentError
|
45
45
|
false
|
46
46
|
end
|
47
|
+
},
|
48
|
+
boolean: {
|
49
|
+
pattern: /^(true|false|0|1)$/i,
|
50
|
+
validator: ->(value:) { %w[true 1].include?(value&.downcase) }
|
47
51
|
}
|
48
52
|
}.freeze
|
49
53
|
private_constant :DEFAULT_FORMATS
|
data/lib/servactory/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: servactory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.0.
|
4
|
+
version: 2.5.0.rc5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Sokolov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -341,15 +341,15 @@ files:
|
|
341
341
|
- lib/servactory/tool_kit/dynamic_options/must.rb
|
342
342
|
- lib/servactory/utils.rb
|
343
343
|
- lib/servactory/version.rb
|
344
|
-
homepage: https://github.com/
|
344
|
+
homepage: https://github.com/servactory/servactory
|
345
345
|
licenses:
|
346
346
|
- MIT
|
347
347
|
metadata:
|
348
|
-
homepage_uri: https://github.com/
|
348
|
+
homepage_uri: https://github.com/servactory/servactory
|
349
349
|
documentation_uri: https://servactory.com
|
350
|
-
source_code_uri: https://github.com/
|
351
|
-
bug_tracker_uri: https://github.com/
|
352
|
-
changelog_uri: https://github.com/
|
350
|
+
source_code_uri: https://github.com/servactory/servactory
|
351
|
+
bug_tracker_uri: https://github.com/servactory/servactory/issues
|
352
|
+
changelog_uri: https://github.com/servactory/servactory/blob/master/CHANGELOG.md
|
353
353
|
rubygems_mfa_required: 'true'
|
354
354
|
post_install_message:
|
355
355
|
rdoc_options: []
|