validates_phone_format_of 1.0.5 → 2.0.1
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 +5 -5
- data/.gitignore +2 -1
- data/.travis.yml +14 -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/gemfiles/Gemfile.active_model_6_0 +5 -0
- data/gemfiles/Gemfile.active_model_6_1 +5 -0
- data/gemfiles/Gemfile.active_model_6_2 +5 -0
- data/gemfiles/Gemfile.active_model_7_0 +5 -0
- data/lib/validates_phone_format_of.rb +1 -1
- data/validates_phone_format_of.gemspec +21 -16
- metadata +41 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 849be72ebc3b9c3ae6720150b2d049055e99a54e3f0601145a307b2fde8a43a1
|
4
|
+
data.tar.gz: 4e43a14824d83644200b50ce9a9edf542aa4045e452c35d2e20f232b13c713c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8589fd239626e36374bb9a17ea4f5675e33ae2fcbdd4f98f84b0618fb88800d3f998da0b5427c9c3a7ecd2400d61d45909e1767752632912b232f6783989b9fa
|
7
|
+
data.tar.gz: 10315583536e9bccc2019498f1b5b6155dcd54949792b7e0ce40416554b17d6236ddf8f01457bcb4d314c975d09358663f77bba9eb69a5a4b3ef61d67fa5b267
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -4,11 +4,25 @@ rvm:
|
|
4
4
|
- 2.0.0
|
5
5
|
- 2.1.0
|
6
6
|
- 2.4.0
|
7
|
+
- 2.5.0
|
8
|
+
- 2.6.0
|
9
|
+
- 2.7.0
|
10
|
+
- 3.0.0
|
11
|
+
- 3.1.0
|
12
|
+
- 3.2.0
|
7
13
|
- jruby
|
8
14
|
gemfile:
|
9
15
|
- gemfiles/Gemfile.active_model_3_1
|
10
16
|
- gemfiles/Gemfile.active_model_3_2
|
11
17
|
- gemfiles/Gemfile.active_model_4_0
|
12
18
|
- gemfiles/Gemfile.active_model_4_1
|
19
|
+
- gemfiles/Gemfile.active_model_4_2
|
20
|
+
- gemfiles/Gemfile.active_model_5_0
|
21
|
+
- gemfiles/Gemfile.active_model_5_1
|
22
|
+
- gemfiles/Gemfile.active_model_5_2
|
23
|
+
- gemfiles/Gemfile.active_model_6_0
|
24
|
+
- gemfiles/Gemfile.active_model_6_1
|
25
|
+
- gemfiles/Gemfile.active_model_6_2
|
26
|
+
- gemfiles/Gemfile.active_model_7_0
|
13
27
|
install: bundle install
|
14
28
|
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,25 @@
|
|
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.1'
|
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'
|
24
|
+
spec.add_development_dependency 'rspec', '~> 3.6'
|
20
25
|
end
|
metadata
CHANGED
@@ -1,60 +1,84 @@
|
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Jonathan TRIBOUHARET
|
8
|
-
autorequire:
|
7
|
+
- Jonathan VUKOVICH-TRIBOUHARET
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-18 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
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
25
39
|
- !ruby/object:Gem::Version
|
26
40
|
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rspec
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
|
-
- - ~>
|
45
|
+
- - "~>"
|
32
46
|
- !ruby/object:Gem::Version
|
33
47
|
version: '3.6'
|
34
48
|
type: :development
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
|
-
- - ~>
|
52
|
+
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '3.6'
|
41
55
|
description: Validate phone numbers against E.164 format with this Ruby on Rails gem
|
42
|
-
email:
|
56
|
+
email:
|
57
|
+
- jonathan.tribouharet@gmail.com
|
43
58
|
executables: []
|
44
59
|
extensions: []
|
45
60
|
extra_rdoc_files: []
|
46
61
|
files:
|
47
|
-
- .gitignore
|
48
|
-
- .rspec
|
49
|
-
- .travis.yml
|
62
|
+
- ".gitignore"
|
63
|
+
- ".rspec"
|
64
|
+
- ".travis.yml"
|
50
65
|
- Gemfile
|
51
66
|
- LICENSE
|
52
67
|
- README.md
|
68
|
+
- Rakefile
|
53
69
|
- gemfiles/Gemfile.active_model_3_1
|
54
70
|
- gemfiles/Gemfile.active_model_3_2
|
55
71
|
- gemfiles/Gemfile.active_model_3_3
|
56
72
|
- gemfiles/Gemfile.active_model_4_0
|
57
73
|
- gemfiles/Gemfile.active_model_4_1
|
74
|
+
- gemfiles/Gemfile.active_model_4_2
|
75
|
+
- gemfiles/Gemfile.active_model_5_0
|
76
|
+
- gemfiles/Gemfile.active_model_5_1
|
77
|
+
- gemfiles/Gemfile.active_model_5_2
|
78
|
+
- gemfiles/Gemfile.active_model_6_0
|
79
|
+
- gemfiles/Gemfile.active_model_6_1
|
80
|
+
- gemfiles/Gemfile.active_model_6_2
|
81
|
+
- gemfiles/Gemfile.active_model_7_0
|
58
82
|
- lib/validates_phone_format_of.rb
|
59
83
|
- spec/validates_phone_format_of_spec.rb
|
60
84
|
- validates_phone_format_of.gemspec
|
@@ -62,24 +86,23 @@ homepage: https://github.com/jonathantribouharet/validates_phone_format_of
|
|
62
86
|
licenses:
|
63
87
|
- MIT
|
64
88
|
metadata: {}
|
65
|
-
post_install_message:
|
89
|
+
post_install_message:
|
66
90
|
rdoc_options: []
|
67
91
|
require_paths:
|
68
92
|
- lib
|
69
93
|
required_ruby_version: !ruby/object:Gem::Requirement
|
70
94
|
requirements:
|
71
|
-
- -
|
95
|
+
- - ">="
|
72
96
|
- !ruby/object:Gem::Version
|
73
97
|
version: 1.9.3
|
74
98
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
99
|
requirements:
|
76
|
-
- -
|
100
|
+
- - ">="
|
77
101
|
- !ruby/object:Gem::Version
|
78
102
|
version: '0'
|
79
103
|
requirements: []
|
80
|
-
|
81
|
-
|
82
|
-
signing_key:
|
104
|
+
rubygems_version: 3.4.6
|
105
|
+
signing_key:
|
83
106
|
specification_version: 4
|
84
107
|
summary: Validate phone numbers against E.164 format with this Ruby on Rails gem
|
85
108
|
test_files: []
|