lite-validators 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/Gemfile.lock +1 -1
- data/README.md +23 -9
- data/docs/TIME_ZONE.md +1 -1
- data/lib/lite/validators.rb +1 -1
- data/lib/lite/validators/ein_validator.rb +7 -0
- data/lib/lite/validators/isbn_validator.rb +1 -1
- data/lib/lite/validators/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 457ae01657eae20eb4616d1ab54cea423c743469f571a37b4d0ccaddb8f60582
|
4
|
+
data.tar.gz: 2c05ea3dafb533e96251cc9b63947dbf1bdc868fa6a7bf824785fb09a66755fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b65070d22d816fe59211851cb4ad2c0f9513e471e6bcfe60eb28469aa4e1c2dc208ceb46f478be160f74035be164643031afa2b2f4e667306cbedf983978635a
|
7
|
+
data.tar.gz: 8cbb7ba5a58f1e612117d642737ce9037c63642b9dedfa326630378fc6b948cd973a648b46f9cdea5c31c6a4d90f9228d2cc5f71e3bcd57a61f0bf6ff2794f85
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
-
## [1.0.
|
9
|
+
## [1.0.1] - 2019-07-01
|
10
|
+
### Added
|
11
|
+
- Add EIN validator
|
12
|
+
- Add port section to docs
|
13
|
+
|
14
|
+
### Changed
|
15
|
+
- Remove duplicate 0 from isbn characters constant
|
16
|
+
|
17
|
+
## [1.0.0] - 2019-06-29
|
10
18
|
### Added
|
11
19
|
- Initial project version
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -5,6 +5,8 @@
|
|
5
5
|
|
6
6
|
Lite::Validators is a collection of validators useful for any Rails application.
|
7
7
|
|
8
|
+
**NOTE:** If you are coming from `ActiveValidation`, please read the [port](#port) section.
|
9
|
+
|
8
10
|
## Installation
|
9
11
|
|
10
12
|
Add this line to your application's Gemfile:
|
@@ -25,36 +27,38 @@ Or install it yourself as:
|
|
25
27
|
|
26
28
|
* [Validators](#validators)
|
27
29
|
* [3rd-party](#3rd-party)
|
30
|
+
* [Port](#port)
|
28
31
|
|
29
32
|
## Validators
|
30
33
|
|
31
34
|
* [Alpha](https://github.com/drexed/lite-validators/blob/master/docs/ALPHA.md)
|
32
|
-
* [
|
35
|
+
* [Alpha numeric](https://github.com/drexed/lite-validators/blob/master/docs/ALPHA_NUMERIC.md)
|
33
36
|
* [Base64](https://github.com/drexed/lite-validators/blob/master/docs/BASE64.md)
|
34
37
|
* [Boolean](https://github.com/drexed/lite-validators/blob/master/docs/BOOLEAN.md)
|
35
38
|
* [Compare](https://github.com/drexed/lite-validators/blob/master/docs/COMPARE.md)
|
36
39
|
* [Coordinates](https://github.com/drexed/lite-validators/blob/master/docs/COORDINATE.md)
|
37
|
-
* [Credit
|
40
|
+
* [Credit card](https://github.com/drexed/lite-validators/blob/master/docs/CREDIT_CARD.md)
|
38
41
|
* [Csv](https://github.com/drexed/lite-validators/blob/master/docs/CSV.md)
|
39
42
|
* [Currency](https://github.com/drexed/lite-validators/blob/master/docs/CURRENCY.md)
|
40
43
|
* [CUSIP](https://github.com/drexed/lite-validators/blob/master/docs/CUSIP.md)
|
41
44
|
* [Email](https://github.com/drexed/lite-validators/blob/master/docs/EMAIL.md)
|
42
|
-
* [
|
43
|
-
* [File
|
44
|
-
* [File
|
45
|
+
* [EIN](https://github.com/drexed/lite-validators/blob/master/docs/EIN.md)
|
46
|
+
* [File content Type](https://github.com/drexed/lite-validators/blob/master/docs/FILE_CONTENT_TYPE.md)
|
47
|
+
* [File extension](https://github.com/drexed/lite-validators/blob/master/docs/FILE_EXTENSION.md)
|
48
|
+
* [File size](https://github.com/drexed/lite-validators/blob/master/docs/FILE_SIZE.md)
|
45
49
|
* [HEX](https://github.com/drexed/lite-validators/blob/master/docs/HEX.md)
|
46
50
|
* [IMEI](https://github.com/drexed/lite-validators/blob/master/docs/IMEI.md)
|
47
|
-
* [IP
|
51
|
+
* [IP address](https://github.com/drexed/lite-validators/blob/master/docs/IP_ADDRESS.md)
|
48
52
|
* [ISBN](https://github.com/drexed/lite-validators/blob/master/docs/ISBN.md)
|
49
53
|
* [ISIN](https://github.com/drexed/lite-validators/blob/master/docs/ISIN.md)
|
50
|
-
* [MAC
|
54
|
+
* [MAC address](https://github.com/drexed/lite-validators/blob/master/docs/MAC.md)
|
51
55
|
* [Name](https://github.com/drexed/lite-validators/blob/master/docs/NAME.md)
|
52
56
|
* [Password](https://github.com/drexed/lite-validators/blob/master/docs/PASSWORD.md)
|
53
|
-
* [Phone
|
57
|
+
* [Phone number](https://github.com/drexed/lite-validators/blob/master/docs/PHONE_NUMBER.md)
|
54
58
|
* [SEDOL](https://github.com/drexed/lite-validators/blob/master/docs/SEDOL.md)
|
55
59
|
* [Slug](https://github.com/drexed/lite-validators/blob/master/docs/SLUG.md)
|
56
60
|
* [SSN](https://github.com/drexed/lite-validators/blob/master/docs/SSN.md)
|
57
|
-
* [Time
|
61
|
+
* [Time zone](https://github.com/drexed/lite-validators/blob/master/docs/TIME_ZONE.md)
|
58
62
|
* [Type](https://github.com/drexed/lite-validators/blob/master/docs/TYPE.md)
|
59
63
|
* [URL](https://github.com/drexed/lite-validators/blob/master/docs/URL.md)
|
60
64
|
* [Username](https://github.com/drexed/lite-validators/blob/master/docs/USERNAME.md)
|
@@ -69,6 +73,16 @@ The following are highly recommended 3rd party validators to supplement your wor
|
|
69
73
|
* **Group:** Group Validations - https://github.com/adzap/grouped_validations
|
70
74
|
* **Overlap:** Validates Overlap - https://github.com/robinbortlik/validates_overlap
|
71
75
|
|
76
|
+
## Port
|
77
|
+
|
78
|
+
`Lite::Validators` is a near compatible port of [ActiveValidation](https://github.com/drexed/active_validation).
|
79
|
+
|
80
|
+
The names for the following validators has been changed, so you will need to make the
|
81
|
+
appropriate changes: `equality #=> compare`, `phone #=> phone_number`
|
82
|
+
|
83
|
+
The syntax for the following validators has been reworked, so you will need to consult the docs
|
84
|
+
for making the appropriate changes: `csv`, `compare`
|
85
|
+
|
72
86
|
## Development
|
73
87
|
|
74
88
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/docs/TIME_ZONE.md
CHANGED
data/lib/lite/validators.rb
CHANGED
@@ -4,7 +4,7 @@ require 'active_model'
|
|
4
4
|
require 'lite/validators/version'
|
5
5
|
|
6
6
|
%w[
|
7
|
-
base alpha alpha_numeric base64 boolean compare coordinate credit_card currency cusip email
|
7
|
+
base alpha alpha_numeric base64 boolean compare coordinate credit_card currency cusip email ein
|
8
8
|
file_content_type file_extension file_size csv hex imei ip_address isbn isin mac_address name
|
9
9
|
password phone_number sedol slug ssn time_zone type url username uuid
|
10
10
|
].each do |name|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lite-validators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -216,6 +216,7 @@ files:
|
|
216
216
|
- lib/lite/validators/csv_validator.rb
|
217
217
|
- lib/lite/validators/currency_validator.rb
|
218
218
|
- lib/lite/validators/cusip_validator.rb
|
219
|
+
- lib/lite/validators/ein_validator.rb
|
219
220
|
- lib/lite/validators/email_validator.rb
|
220
221
|
- lib/lite/validators/file_content_type_validator.rb
|
221
222
|
- lib/lite/validators/file_extension_validator.rb
|