flash_validators 1.0.0 → 1.1.0
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/README.md +39 -2
- data/config/locales/en.yml +4 -0
- data/flash_validators.gemspec +1 -1
- data/lib/flash_validators.rb +2 -0
- data/lib/flash_validators/matchers/ensure_valid_isbn_format_of.rb +18 -0
- data/lib/flash_validators/validators/isbn_validator.rb +31 -0
- data/lib/flash_validators/version.rb +1 -1
- data/spec/lib/alpha_numeric_validator_spec.rb +2 -2
- data/spec/lib/alpha_validator_spec.rb +4 -4
- data/spec/lib/boolean_validator_spec.rb +1 -1
- data/spec/lib/credit_card_validator_spec.rb +8 -8
- data/spec/lib/currency_validator_spec.rb +2 -2
- data/spec/lib/email_validator_spec.rb +4 -6
- data/spec/lib/equality_validator_spec.rb +6 -12
- data/spec/lib/hex_validator_spec.rb +1 -1
- data/spec/lib/imei_validator_spec.rb +1 -1
- data/spec/lib/ip_validator_spec.rb +1 -1
- data/spec/lib/isbn_validator_spec.rb +41 -0
- data/spec/lib/latitude_validator_spec.rb +1 -1
- data/spec/lib/longitude_validator_spec.rb +1 -1
- data/spec/lib/mac_address_validator_spec.rb +1 -1
- data/spec/lib/name_validator_spec.rb +1 -1
- data/spec/lib/password_validator_spec.rb +1 -1
- data/spec/lib/phone_validator_spec.rb +1 -1
- data/spec/lib/slug_validator_spec.rb +1 -1
- data/spec/lib/ssn_validator_spec.rb +1 -1
- data/spec/lib/url_validator_spec.rb +1 -1
- data/spec/lib/username_validator_spec.rb +1 -1
- metadata +9 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62a1fe02cdb774704575c71fd9e94dd70eb4ac61
|
4
|
+
data.tar.gz: 77c9c4f93e1b1010e1e989d8b639a4a77d0a1602
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 159e1bff68ddcec3ea18ba7dad44d6b0cf4b1a66e49ccb99aa7a0df57bc7642e508ba4a32578ddc491f75d470981eb4bb3a875fe8b77ec7767ee611ebc17247b
|
7
|
+
data.tar.gz: e890f7b6401d9f551c2f3b1ee7c24183c9c4d064e54679bffd41366f8c98acb6616d2374b1dcdd93878f7338af1d5d4c82eae9751f9522baf6840ae8daaf44c0
|
data/README.md
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
# Flash Validators
|
2
2
|
|
3
|
+
[](http://badge.fury.io/rb/flash_validators)
|
3
4
|
[](https://travis-ci.org/drexed/flash_validators)
|
4
5
|
[](https://coveralls.io/r/drexed/flash_validators)
|
5
6
|
[](https://codeclimate.com/github/drexed/flash_validators)
|
6
7
|
|
7
8
|
Flash Validators is a collection of custom validators that are often required in Rails applications plus shoulda-style RSpec matchers to test the validation rules.
|
8
9
|
|
9
|
-
Currently supported validators: alpha, alpha-numeric, boolean, credit card, currency, email, equality, hex, IMEI, IP, latitude, longitude, mac address, name, password, phone, slug, ssn, url, and username.
|
10
|
+
Currently supported validators: alpha, alpha-numeric, boolean, credit card, currency, email, equality, hex, IMEI, IP, ISBN, latitude, longitude, mac address, name, password, phone, slug, ssn, url, and username.
|
10
11
|
|
11
12
|
Highly recommended validators:
|
12
13
|
* **DateTime:** Validates Timeliness - https://github.com/adzap/validates_timeliness
|
@@ -438,6 +439,42 @@ describe User do
|
|
438
439
|
end
|
439
440
|
```
|
440
441
|
|
442
|
+
### IsbnValidator
|
443
|
+
|
444
|
+
**Ex:** 9519854894 or 0-9722051-1-x or 978 159059 9938
|
445
|
+
|
446
|
+
**Rules:**
|
447
|
+
* Length: 10 or 13
|
448
|
+
* Characters: 0-9 -|
|
449
|
+
|
450
|
+
With an ActiveRecord model:
|
451
|
+
|
452
|
+
```ruby
|
453
|
+
class User < ActiveRecord::Base
|
454
|
+
attr_accessor :isbn, :name
|
455
|
+
validates :isbn, isbn: true
|
456
|
+
end
|
457
|
+
```
|
458
|
+
|
459
|
+
Or any ruby class:
|
460
|
+
|
461
|
+
```ruby
|
462
|
+
class User
|
463
|
+
include ActiveModel::Validations
|
464
|
+
attr_accessor :isbn, :name
|
465
|
+
validates :isbn, isbn: true
|
466
|
+
end
|
467
|
+
```
|
468
|
+
|
469
|
+
RSpec matcher is also available for your convenience:
|
470
|
+
|
471
|
+
```ruby
|
472
|
+
describe User do
|
473
|
+
it { should ensure_valid_isbn_format_of(:isbn) }
|
474
|
+
it { should_not ensure_valid_isbn_format_of(:name) }
|
475
|
+
end
|
476
|
+
```
|
477
|
+
|
441
478
|
### LatitudeValidator
|
442
479
|
|
443
480
|
**Ex:** 78.213 or -34.985
|
@@ -611,7 +648,7 @@ Or any ruby class:
|
|
611
648
|
class User
|
612
649
|
include ActiveModel::Validations
|
613
650
|
attr_accessor :password, :name
|
614
|
-
validates :password,
|
651
|
+
validates :password, password: true
|
615
652
|
end
|
616
653
|
```
|
617
654
|
|
data/config/locales/en.yml
CHANGED
@@ -11,6 +11,7 @@ en:
|
|
11
11
|
hex: "is not a valid hex color"
|
12
12
|
imei: "is not a valid IMEI"
|
13
13
|
ip: "is not a valid IP"
|
14
|
+
isbn: "is not a valid ISBN"
|
14
15
|
longitude: "is not a valid latitude"
|
15
16
|
longitude: "is not a valid longitude"
|
16
17
|
mac_address: "is not a valid MAC address"
|
@@ -53,6 +54,9 @@ en:
|
|
53
54
|
ensure_valid_ip_format_of:
|
54
55
|
failure_message_for_should: "#{model} should ensure valid IP address format of attribute #{attr}"
|
55
56
|
failure_message_for_should_not: "#{model} should not ensure valid IP address format of attribute #{attr}"
|
57
|
+
ensure_valid_isbn_format_of:
|
58
|
+
failure_message_for_should: "#{model} should ensure valid ISBN format of attribute #{attr}"
|
59
|
+
failure_message_for_should_not: "#{model} should not ensure valid ISBN format of attribute #{attr}"
|
56
60
|
ensure_valid_latitude_format_of:
|
57
61
|
failure_message_for_should: "#{model} should ensure valid latitude format of attribute #{attr}"
|
58
62
|
failure_message_for_should_not: "#{model} should not ensure valid latitude format of attribute #{attr}"
|
data/flash_validators.gemspec
CHANGED
@@ -23,6 +23,6 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.5"
|
24
24
|
spec.add_development_dependency "coveralls"
|
25
25
|
spec.add_development_dependency "rake"
|
26
|
-
spec.add_development_dependency "rspec", "~> 3.0.0
|
26
|
+
spec.add_development_dependency "rspec", "~> 3.0.0"
|
27
27
|
spec.add_development_dependency "shoulda-matchers"
|
28
28
|
end
|
data/lib/flash_validators.rb
CHANGED
@@ -12,6 +12,7 @@ require 'flash_validators/validators/equality_validator'
|
|
12
12
|
require 'flash_validators/validators/hex_validator'
|
13
13
|
require 'flash_validators/validators/imei_validator'
|
14
14
|
require 'flash_validators/validators/ip_validator'
|
15
|
+
require 'flash_validators/validators/isbn_validator'
|
15
16
|
require 'flash_validators/validators/latitude_validator'
|
16
17
|
require 'flash_validators/validators/longitude_validator'
|
17
18
|
require 'flash_validators/validators/mac_address_validator'
|
@@ -34,6 +35,7 @@ if defined?(RSpec)
|
|
34
35
|
require 'flash_validators/matchers/ensure_valid_hex_format_of'
|
35
36
|
require 'flash_validators/matchers/ensure_valid_imei_format_of'
|
36
37
|
require 'flash_validators/matchers/ensure_valid_ip_format_of'
|
38
|
+
require 'flash_validators/matchers/ensure_valid_isbn_format_of'
|
37
39
|
require 'flash_validators/matchers/ensure_valid_latitude_format_of'
|
38
40
|
require 'flash_validators/matchers/ensure_valid_longitude_format_of'
|
39
41
|
require 'flash_validators/matchers/ensure_valid_mac_address_format_of'
|
@@ -0,0 +1,18 @@
|
|
1
|
+
RSpec::Matchers.define :ensure_valid_isbn_format_of do |attribute|
|
2
|
+
match do |model|
|
3
|
+
model.send("#{attribute}=", "12345")
|
4
|
+
model.valid?
|
5
|
+
|
6
|
+
if model.errors.has_key?(attribute)
|
7
|
+
model.errors[attribute].include?(I18n.t('errors.messages.isbn'))
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
failure_message do |model|
|
12
|
+
I18n.t('flash_validators.matchers.ensure_valid_isbn_format_of.failure_message_for_should', model: model.class)
|
13
|
+
end
|
14
|
+
|
15
|
+
failure_message_when_negated do |model|
|
16
|
+
I18n.t('flash_validators.matchers.ensure_valid_isbn_format_of.failure_message_for_should_not', model: model.class)
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
class IsbnValidator < ActiveModel::EachValidator
|
2
|
+
|
3
|
+
def validate_each(record, attribute, value)
|
4
|
+
unless valid?(value.to_s, options)
|
5
|
+
record.errors[attribute] << (options[:message] || I18n.t('errors.messages.isbn'))
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def valid_format?(isbn)
|
12
|
+
['0','1','2','3','4','5','6','7','8','9','0','x'].include?(isbn)
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.validate_format(isbn)
|
16
|
+
isbn = '' if isbn.nil?
|
17
|
+
isbn.gsub!(/-| /, '')
|
18
|
+
isbn.downcase!
|
19
|
+
|
20
|
+
if isbn.size == 10 || isbn.size == 13
|
21
|
+
isbn.chars.all? { |char| ['0','1','2','3','4','5','6','7','8','9','0','x'].include?(char) }
|
22
|
+
else
|
23
|
+
return false
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def valid?(isbn, options)
|
28
|
+
self.class.validate_format(isbn)
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe AlphaNumericValidator do
|
4
4
|
|
5
|
-
context "
|
5
|
+
context "has a valid value" do
|
6
6
|
let(:klass) do
|
7
7
|
Class.new do
|
8
8
|
include ActiveModel::Validations
|
@@ -30,7 +30,7 @@ describe AlphaNumericValidator do
|
|
30
30
|
it { should_not ensure_valid_alpha_numeric_format_of(:name) }
|
31
31
|
end
|
32
32
|
|
33
|
-
context "
|
33
|
+
context "with :strict option has a valid value" do
|
34
34
|
let(:klass) do
|
35
35
|
Class.new do
|
36
36
|
include ActiveModel::Validations
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe AlphaValidator do
|
4
4
|
|
5
|
-
context "
|
5
|
+
context "has a valid value" do
|
6
6
|
let(:klass) do
|
7
7
|
Class.new do
|
8
8
|
include ActiveModel::Validations
|
@@ -30,7 +30,7 @@ describe AlphaValidator do
|
|
30
30
|
it { should_not ensure_valid_alpha_format_of(:name) }
|
31
31
|
end
|
32
32
|
|
33
|
-
context "
|
33
|
+
context "with :strict option has a valid value" do
|
34
34
|
let(:klass) do
|
35
35
|
Class.new do
|
36
36
|
include ActiveModel::Validations
|
@@ -58,7 +58,7 @@ describe AlphaValidator do
|
|
58
58
|
it { should_not ensure_valid_alpha_format_of(:name) }
|
59
59
|
end
|
60
60
|
|
61
|
-
context "
|
61
|
+
context "with :lowercase option has a valid value" do
|
62
62
|
let(:klass) do
|
63
63
|
Class.new do
|
64
64
|
include ActiveModel::Validations
|
@@ -87,7 +87,7 @@ describe AlphaValidator do
|
|
87
87
|
it { should_not ensure_valid_alpha_format_of(:name) }
|
88
88
|
end
|
89
89
|
|
90
|
-
context "
|
90
|
+
context "with :uppercase option has a valid value" do
|
91
91
|
let(:klass) do
|
92
92
|
Class.new do
|
93
93
|
include ActiveModel::Validations
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe CreditCardValidator do
|
4
4
|
|
5
|
-
context "
|
5
|
+
context "has a valid value" do
|
6
6
|
let(:klass) do
|
7
7
|
Class.new do
|
8
8
|
include ActiveModel::Validations
|
@@ -44,7 +44,7 @@ describe CreditCardValidator do
|
|
44
44
|
it { should_not ensure_valid_credit_card_format_of(:name) }
|
45
45
|
end
|
46
46
|
|
47
|
-
context "
|
47
|
+
context "with :american_express option has a valid value" do
|
48
48
|
let(:klass) do
|
49
49
|
Class.new do
|
50
50
|
include ActiveModel::Validations
|
@@ -73,7 +73,7 @@ describe CreditCardValidator do
|
|
73
73
|
it { should_not ensure_valid_credit_card_format_of(:name) }
|
74
74
|
end
|
75
75
|
|
76
|
-
context "
|
76
|
+
context "with :american_express option has a valid value" do
|
77
77
|
let(:klass) do
|
78
78
|
Class.new do
|
79
79
|
include ActiveModel::Validations
|
@@ -113,7 +113,7 @@ describe CreditCardValidator do
|
|
113
113
|
it { should_not ensure_valid_credit_card_format_of(:name) }
|
114
114
|
end
|
115
115
|
|
116
|
-
context "
|
116
|
+
context "with :diners_club option has a valid value" do
|
117
117
|
let(:klass) do
|
118
118
|
Class.new do
|
119
119
|
include ActiveModel::Validations
|
@@ -153,7 +153,7 @@ describe CreditCardValidator do
|
|
153
153
|
it { should_not ensure_valid_credit_card_format_of(:name) }
|
154
154
|
end
|
155
155
|
|
156
|
-
context "
|
156
|
+
context "with :discover option has a valid value" do
|
157
157
|
let(:klass) do
|
158
158
|
Class.new do
|
159
159
|
include ActiveModel::Validations
|
@@ -193,7 +193,7 @@ describe CreditCardValidator do
|
|
193
193
|
it { should_not ensure_valid_credit_card_format_of(:name) }
|
194
194
|
end
|
195
195
|
|
196
|
-
context "
|
196
|
+
context "with :jbc option has a valid value" do
|
197
197
|
let(:klass) do
|
198
198
|
Class.new do
|
199
199
|
include ActiveModel::Validations
|
@@ -233,7 +233,7 @@ describe CreditCardValidator do
|
|
233
233
|
it { should_not ensure_valid_credit_card_format_of(:name) }
|
234
234
|
end
|
235
235
|
|
236
|
-
context "
|
236
|
+
context "with :master_card option has a valid value" do
|
237
237
|
let(:klass) do
|
238
238
|
Class.new do
|
239
239
|
include ActiveModel::Validations
|
@@ -273,7 +273,7 @@ describe CreditCardValidator do
|
|
273
273
|
it { should_not ensure_valid_credit_card_format_of(:name) }
|
274
274
|
end
|
275
275
|
|
276
|
-
context "
|
276
|
+
context "with :visa option has a valid value" do
|
277
277
|
let(:klass) do
|
278
278
|
Class.new do
|
279
279
|
include ActiveModel::Validations
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe CurrencyValidator do
|
4
4
|
|
5
|
-
context "
|
5
|
+
context "has a valid value" do
|
6
6
|
let(:klass) do
|
7
7
|
Class.new do
|
8
8
|
include ActiveModel::Validations
|
@@ -31,7 +31,7 @@ describe CurrencyValidator do
|
|
31
31
|
it { should_not ensure_valid_currency_format_of(:name) }
|
32
32
|
end
|
33
33
|
|
34
|
-
context "
|
34
|
+
context "with :strict option has a valid value" do
|
35
35
|
let(:klass) do
|
36
36
|
Class.new do
|
37
37
|
include ActiveModel::Validations
|
@@ -4,8 +4,7 @@ describe EmailValidator do
|
|
4
4
|
|
5
5
|
subject { klass.new }
|
6
6
|
|
7
|
-
|
8
|
-
context "Email with valid format" do
|
7
|
+
context "with valid format" do
|
9
8
|
let(:klass) do
|
10
9
|
Class.new do
|
11
10
|
include ActiveModel::Validations
|
@@ -70,9 +69,8 @@ describe EmailValidator do
|
|
70
69
|
it { should_not ensure_valid_email_format_of(:name) }
|
71
70
|
end
|
72
71
|
|
73
|
-
|
74
|
-
|
75
|
-
context "Email domain specified as string" do
|
72
|
+
context "is in the specific domain" do
|
73
|
+
context "domain specified as string" do
|
76
74
|
let(:klass) do
|
77
75
|
Class.new do
|
78
76
|
include ActiveModel::Validations
|
@@ -88,7 +86,7 @@ describe EmailValidator do
|
|
88
86
|
it { should_not ensure_valid_email_format_of(:name) }
|
89
87
|
end
|
90
88
|
|
91
|
-
context "
|
89
|
+
context "set as an array of strings and symbols" do
|
92
90
|
let(:klass) do
|
93
91
|
Class.new do
|
94
92
|
include ActiveModel::Validations
|
@@ -2,8 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe EqualityValidator do
|
4
4
|
|
5
|
-
|
6
|
-
context "Value less than" do
|
5
|
+
context "value less than" do
|
7
6
|
let(:klass) do
|
8
7
|
Class.new do
|
9
8
|
include ActiveModel::Validations
|
@@ -45,8 +44,7 @@ describe EqualityValidator do
|
|
45
44
|
end
|
46
45
|
end
|
47
46
|
|
48
|
-
|
49
|
-
context "Value less than or equal to" do
|
47
|
+
context "value less than or equal to" do
|
50
48
|
let(:klass) do
|
51
49
|
Class.new do
|
52
50
|
include ActiveModel::Validations
|
@@ -98,8 +96,7 @@ describe EqualityValidator do
|
|
98
96
|
end
|
99
97
|
end
|
100
98
|
|
101
|
-
|
102
|
-
context "Value greater than" do
|
99
|
+
context "value greater than" do
|
103
100
|
let(:klass) do
|
104
101
|
Class.new do
|
105
102
|
include ActiveModel::Validations
|
@@ -141,8 +138,7 @@ describe EqualityValidator do
|
|
141
138
|
end
|
142
139
|
end
|
143
140
|
|
144
|
-
|
145
|
-
context "Value greater than or equal to" do
|
141
|
+
context "value greater than or equal to" do
|
146
142
|
let(:klass) do
|
147
143
|
Class.new do
|
148
144
|
include ActiveModel::Validations
|
@@ -194,8 +190,7 @@ describe EqualityValidator do
|
|
194
190
|
end
|
195
191
|
end
|
196
192
|
|
197
|
-
|
198
|
-
context "Value equal to" do
|
193
|
+
context "value equal to" do
|
199
194
|
let(:klass) do
|
200
195
|
Class.new do
|
201
196
|
include ActiveModel::Validations
|
@@ -264,8 +259,7 @@ describe EqualityValidator do
|
|
264
259
|
end
|
265
260
|
end
|
266
261
|
|
267
|
-
|
268
|
-
context "Value not equal to" do
|
262
|
+
context "value not equal to" do
|
269
263
|
let(:klass) do
|
270
264
|
Class.new do
|
271
265
|
include ActiveModel::Validations
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe IsbnValidator do
|
4
|
+
|
5
|
+
context "has a valid value" do
|
6
|
+
let(:klass) do
|
7
|
+
Class.new do
|
8
|
+
include ActiveModel::Validations
|
9
|
+
attr_accessor :isbn, :name
|
10
|
+
validates :isbn, isbn: true
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
subject { klass.new }
|
15
|
+
|
16
|
+
it { should allow_value("9519854894").for(:isbn) }
|
17
|
+
it { should allow_value("951 98548 9 4").for(:isbn) }
|
18
|
+
it { should allow_value("951-98548-9-4").for(:isbn) }
|
19
|
+
it { should allow_value("951-98548 9 4").for(:isbn) }
|
20
|
+
it { should allow_value("0-9722051-1-X").for(:isbn) }
|
21
|
+
it { should allow_value("0-9722051-1-x").for(:isbn) }
|
22
|
+
it { should allow_value("9781590599938").for(:isbn) }
|
23
|
+
it { should allow_value("978 159059 9938").for(:isbn) }
|
24
|
+
it { should allow_value("978-159059-9938").for(:isbn) }
|
25
|
+
it { should allow_value("978-159059 9938").for(:isbn) }
|
26
|
+
|
27
|
+
it { should_not allow_value('').for(:isbn) }
|
28
|
+
it { should_not allow_value(' ').for(:isbn) }
|
29
|
+
it { should_not allow_value(nil).for(:isbn) }
|
30
|
+
it { should_not allow_value("951-98548-9-p").for(:isbn) }
|
31
|
+
it { should_not allow_value("abc123ab3344").for(:isbn) }
|
32
|
+
it { should_not allow_value("12345678901234").for(:isbn) }
|
33
|
+
it { should_not allow_value("9991a9010599938").for(:isbn) }
|
34
|
+
it { should_not allow_value("! \#$%\`|").for(:isbn) }
|
35
|
+
it { should_not allow_value("<>@[]\`|").for(:isbn) }
|
36
|
+
|
37
|
+
it { should ensure_valid_isbn_format_of(:isbn) }
|
38
|
+
it { should_not ensure_valid_isbn_format_of(:name) }
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flash_validators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 3.0.0
|
89
|
+
version: 3.0.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 3.0.0
|
96
|
+
version: 3.0.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: shoulda-matchers
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,6 +136,7 @@ files:
|
|
136
136
|
- lib/flash_validators/matchers/ensure_valid_hex_format_of.rb
|
137
137
|
- lib/flash_validators/matchers/ensure_valid_imei_format_of.rb
|
138
138
|
- lib/flash_validators/matchers/ensure_valid_ip_format_of.rb
|
139
|
+
- lib/flash_validators/matchers/ensure_valid_isbn_format_of.rb
|
139
140
|
- lib/flash_validators/matchers/ensure_valid_latitude_format_of.rb
|
140
141
|
- lib/flash_validators/matchers/ensure_valid_longitude_format_of.rb
|
141
142
|
- lib/flash_validators/matchers/ensure_valid_mac_address_format_of.rb
|
@@ -156,6 +157,7 @@ files:
|
|
156
157
|
- lib/flash_validators/validators/hex_validator.rb
|
157
158
|
- lib/flash_validators/validators/imei_validator.rb
|
158
159
|
- lib/flash_validators/validators/ip_validator.rb
|
160
|
+
- lib/flash_validators/validators/isbn_validator.rb
|
159
161
|
- lib/flash_validators/validators/latitude_validator.rb
|
160
162
|
- lib/flash_validators/validators/longitude_validator.rb
|
161
163
|
- lib/flash_validators/validators/mac_address_validator.rb
|
@@ -177,6 +179,7 @@ files:
|
|
177
179
|
- spec/lib/hex_validator_spec.rb
|
178
180
|
- spec/lib/imei_validator_spec.rb
|
179
181
|
- spec/lib/ip_validator_spec.rb
|
182
|
+
- spec/lib/isbn_validator_spec.rb
|
180
183
|
- spec/lib/latitude_validator_spec.rb
|
181
184
|
- spec/lib/longitude_validator_spec.rb
|
182
185
|
- spec/lib/mac_address_validator_spec.rb
|
@@ -208,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
208
211
|
version: '0'
|
209
212
|
requirements: []
|
210
213
|
rubyforge_project:
|
211
|
-
rubygems_version: 2.
|
214
|
+
rubygems_version: 2.4.1
|
212
215
|
signing_key:
|
213
216
|
specification_version: 4
|
214
217
|
summary: Gem for commonly used model validators.
|
@@ -223,6 +226,7 @@ test_files:
|
|
223
226
|
- spec/lib/hex_validator_spec.rb
|
224
227
|
- spec/lib/imei_validator_spec.rb
|
225
228
|
- spec/lib/ip_validator_spec.rb
|
229
|
+
- spec/lib/isbn_validator_spec.rb
|
226
230
|
- spec/lib/latitude_validator_spec.rb
|
227
231
|
- spec/lib/longitude_validator_spec.rb
|
228
232
|
- spec/lib/mac_address_validator_spec.rb
|