string_length_conformable 0.2.1 → 0.2.2
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 +4 -4
- data/lib/string_length_conformable/version.rb +1 -1
- data/string_length_conformable.gemspec +9 -1
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11f6e238983fb8b5cf16c80a2276844cfcdbe68715125bc16ad24ae4df795513
|
4
|
+
data.tar.gz: 76c610eafdf7ba8afec2e312f09f030d68d2ff57b2a9c2613ce52a1b1569d276
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d53481114e511eeec0d389f969a9ffedb371908623e6cbdf6004eacbb4e495c36913a6dcc84966029392cda6dbe94fb08d029798e975c9a319014c57728ec66a
|
7
|
+
data.tar.gz: 7ec708e0332ccaba21f5e6dc0a74573ca680cec200daf1ce35499db00c46721f844549b2c27b76794ca5af062128339d0d6335825653eb3ff634858999b7a581
|
@@ -10,18 +10,26 @@ Gem::Specification.new do |spec|
|
|
10
10
|
|
11
11
|
spec.summary = 'Gem for validate string length'
|
12
12
|
spec.description = <<-TEXT
|
13
|
+
\n
|
13
14
|
This gem resolves basically two problems.
|
15
|
+
\n
|
14
16
|
---
|
17
|
+
\n
|
15
18
|
1. MySQL for strings(VARCHAR(255)) by default has limit 255 characters. And when developer left this attribute without any length validation, then it's possible to face with situation when user unintentionally or intentionally will pass in text field more characters. So, then, probably you will get 500...
|
19
|
+
\n
|
16
20
|
---
|
21
|
+
\n
|
17
22
|
2. PostgreSQL. The maximum number of characters for variable unlimited length types (text, varchar) is undefined. There is a limit of size in bytes for all string types: In any case, the longest possible character string that can be stored is about 1 GB.
|
18
23
|
And when developer left this attribute without any length validation, then it's possible to face with situation when user unintentionally or intentionally will try to full up your database with lots of GB of 'important' info.
|
24
|
+
\n
|
19
25
|
---
|
20
|
-
|
26
|
+
\n
|
21
27
|
Both of this cases, I guess, are not very pleasant.
|
28
|
+
\n
|
22
29
|
|
23
30
|
This gem adds default length validation for all string attributes.
|
24
31
|
Except those which are already vlidated in standart rails way.
|
32
|
+
\n
|
25
33
|
|
26
34
|
TEXT
|
27
35
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: string_length_conformable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir
|
@@ -52,20 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
|
-
description:
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
55
|
+
description: " \n\n This gem resolves basically two problems.\n \n\n ---\n \n\n
|
56
|
+
\ 1. MySQL for strings(VARCHAR(255)) by default has limit 255 characters. And when
|
57
|
+
developer left this attribute without any length validation, then it's possible
|
58
|
+
to face with situation when user unintentionally or intentionally will pass in text
|
59
|
+
field more characters. So, then, probably you will get 500...\n \n\n ---\n \n\n
|
60
|
+
\ 2. PostgreSQL. The maximum number of characters for variable unlimited length
|
61
|
+
types (text, varchar) is undefined. There is a limit of size in bytes for all string
|
62
|
+
types: In any case, the longest possible character string that can be stored is
|
63
|
+
about 1 GB.\n And when developer left this attribute without any length validation,
|
64
|
+
then it's possible to face with situation when user unintentionally or intentionally
|
65
|
+
will try to full up your database with lots of GB of 'important' info.\n \n\n ---\n
|
66
|
+
\ \n\n Both of this cases, I guess, are not very pleasant.\n \n\n\n This gem
|
67
|
+
adds default length validation for all string attributes.\n Except those which
|
68
|
+
are already vlidated in standart rails way.\n \n\n\n"
|
69
69
|
email:
|
70
70
|
- raileanv@gmail.com
|
71
71
|
executables: []
|