validates_phone_format_of 1.0.5 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -3
- data/.travis.yml +6 -0
- data/LICENSE +1 -1
- data/README.md +3 -4
- data/Rakefile +1 -0
- data/gemfiles/Gemfile.active_model_4_2 +5 -0
- data/gemfiles/Gemfile.active_model_5_0 +5 -0
- data/gemfiles/Gemfile.active_model_5_1 +5 -0
- data/gemfiles/Gemfile.active_model_5_2 +5 -0
- data/lib/validates_phone_format_of.rb +1 -1
- data/validates_phone_format_of.gemspec +20 -16
- metadata +23 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df2f7be38c26923b2e3218c89ec1612a245e3d9e
|
4
|
+
data.tar.gz: e83d8f93830e08762ab19011037a4c51acefa067
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21df763c5a8a2ef7fea78f8c26ae9098b148786b0a1e2267b33e3f7881c6691f35daadd15c0d54edd53cad300a40e7edf28c0295aec697397264361492a47043
|
7
|
+
data.tar.gz: ee2df071f8b947402d1d5f177eaa42200b961ff6449a1c26a83187780ddfd1f6fc684be18cfb66bb19a897eb4c1c46bc1ef1bac964284a887dd476c589acbf70
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -4,11 +4,17 @@ rvm:
|
|
4
4
|
- 2.0.0
|
5
5
|
- 2.1.0
|
6
6
|
- 2.4.0
|
7
|
+
- 2.5.0
|
8
|
+
- 2.6.0
|
7
9
|
- jruby
|
8
10
|
gemfile:
|
9
11
|
- gemfiles/Gemfile.active_model_3_1
|
10
12
|
- gemfiles/Gemfile.active_model_3_2
|
11
13
|
- gemfiles/Gemfile.active_model_4_0
|
12
14
|
- gemfiles/Gemfile.active_model_4_1
|
15
|
+
- gemfiles/Gemfile.active_model_4_2
|
16
|
+
- gemfiles/Gemfile.active_model_5_0
|
17
|
+
- gemfiles/Gemfile.active_model_5_1
|
18
|
+
- gemfiles/Gemfile.active_model_5_2
|
13
19
|
install: bundle install
|
14
20
|
script: bundle exec rspec
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -11,7 +11,7 @@ validates_phone_format_of is distributed as a gem, which is how it should be use
|
|
11
11
|
|
12
12
|
Include the gem in your Gemfile:
|
13
13
|
|
14
|
-
gem 'validates_phone_format_of', '~>
|
14
|
+
gem 'validates_phone_format_of', '~> 2.0'
|
15
15
|
|
16
16
|
## Usage
|
17
17
|
|
@@ -35,13 +35,12 @@ end
|
|
35
35
|
## Others libraries useful
|
36
36
|
|
37
37
|
- [intl-tel-input](https://github.com/jackocnr/intl-tel-input) Javascript library forcing users to set the region
|
38
|
-
- [intl-tel-input-rails](https://github.com/jonathantribouharet/intl-tel-input-rails) Gem for `intl-tel-input`
|
39
38
|
- [global_phone](https://github.com/sstephenson/global_phone)
|
40
39
|
|
41
40
|
## Author
|
42
41
|
|
43
|
-
- [Jonathan
|
42
|
+
- [Jonathan VUKOVICH-TRIBOUHARET](https://github.com/jonathantribouharet) ([@johnvuko](https://twitter.com/johnvuko))
|
44
43
|
|
45
44
|
## License
|
46
45
|
|
47
|
-
|
46
|
+
This project is released under the MIT license. See the LICENSE file for more info.
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
@@ -8,7 +8,7 @@ module ActiveModel
|
|
8
8
|
module Validations
|
9
9
|
class PhoneFormatValidator < EachValidator
|
10
10
|
def validate_each(record, attribute, value)
|
11
|
-
record.errors.add(attribute, :
|
11
|
+
record.errors.add(attribute, :invalid_phone, options.merge({:value => value})) if value.to_s !~ ValidatesPhoneFormatOf::Regexp
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
@@ -1,20 +1,24 @@
|
|
1
|
-
$:.
|
1
|
+
$:.push File.expand_path("../lib", __FILE__)
|
2
2
|
|
3
|
-
Gem::Specification.new do |
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
s.version = '1.0.5'
|
9
|
-
s.files = `git ls-files`.split("\n")
|
10
|
-
s.require_paths = ['lib']
|
11
|
-
s.authors = ['Jonathan TRIBOUHARET']
|
12
|
-
s.email = 'jonathan.tribouharet@gmail.com'
|
13
|
-
s.license = 'MIT'
|
14
|
-
s.platform = Gem::Platform::RUBY
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = 'validates_phone_format_of'
|
5
|
+
spec.version = '2.0.0'
|
6
|
+
spec.authors = ['Jonathan VUKOVICH-TRIBOUHARET']
|
7
|
+
spec.email = ['jonathan.tribouharet@gmail.com']
|
15
8
|
|
16
|
-
|
9
|
+
spec.summary = 'Validate phone numbers against E.164 format with this Ruby on Rails gem'
|
10
|
+
spec.description = 'Validate phone numbers against E.164 format with this Ruby on Rails gem'
|
11
|
+
spec.homepage = 'https://github.com/jonathantribouharet/validates_phone_format_of'
|
12
|
+
spec.license = 'MIT'
|
17
13
|
|
18
|
-
|
19
|
-
|
14
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
15
|
+
`git ls-files -z`.split("\x0")
|
16
|
+
end
|
17
|
+
spec.require_paths = ['lib']
|
18
|
+
|
19
|
+
spec.platform = Gem::Platform::RUBY
|
20
|
+
spec.required_ruby_version = '>= 1.9.3'
|
21
|
+
|
22
|
+
spec.add_development_dependency 'bundler'
|
23
|
+
spec.add_development_dependency 'rake'
|
20
24
|
end
|
metadata
CHANGED
@@ -1,60 +1,66 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: validates_phone_format_of
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Jonathan TRIBOUHARET
|
7
|
+
- Jonathan VUKOVICH-TRIBOUHARET
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
description: Validate phone numbers against E.164 format with this Ruby on Rails gem
|
42
|
-
email:
|
42
|
+
email:
|
43
|
+
- jonathan.tribouharet@gmail.com
|
43
44
|
executables: []
|
44
45
|
extensions: []
|
45
46
|
extra_rdoc_files: []
|
46
47
|
files:
|
47
|
-
- .gitignore
|
48
|
-
- .rspec
|
49
|
-
- .travis.yml
|
48
|
+
- ".gitignore"
|
49
|
+
- ".rspec"
|
50
|
+
- ".travis.yml"
|
50
51
|
- Gemfile
|
51
52
|
- LICENSE
|
52
53
|
- README.md
|
54
|
+
- Rakefile
|
53
55
|
- gemfiles/Gemfile.active_model_3_1
|
54
56
|
- gemfiles/Gemfile.active_model_3_2
|
55
57
|
- gemfiles/Gemfile.active_model_3_3
|
56
58
|
- gemfiles/Gemfile.active_model_4_0
|
57
59
|
- gemfiles/Gemfile.active_model_4_1
|
60
|
+
- gemfiles/Gemfile.active_model_4_2
|
61
|
+
- gemfiles/Gemfile.active_model_5_0
|
62
|
+
- gemfiles/Gemfile.active_model_5_1
|
63
|
+
- gemfiles/Gemfile.active_model_5_2
|
58
64
|
- lib/validates_phone_format_of.rb
|
59
65
|
- spec/validates_phone_format_of_spec.rb
|
60
66
|
- validates_phone_format_of.gemspec
|
@@ -68,17 +74,17 @@ require_paths:
|
|
68
74
|
- lib
|
69
75
|
required_ruby_version: !ruby/object:Gem::Requirement
|
70
76
|
requirements:
|
71
|
-
- -
|
77
|
+
- - ">="
|
72
78
|
- !ruby/object:Gem::Version
|
73
79
|
version: 1.9.3
|
74
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
81
|
requirements:
|
76
|
-
- -
|
82
|
+
- - ">="
|
77
83
|
- !ruby/object:Gem::Version
|
78
84
|
version: '0'
|
79
85
|
requirements: []
|
80
86
|
rubyforge_project:
|
81
|
-
rubygems_version: 2.
|
87
|
+
rubygems_version: 2.4.5
|
82
88
|
signing_key:
|
83
89
|
specification_version: 4
|
84
90
|
summary: Validate phone numbers against E.164 format with this Ruby on Rails gem
|