validates_phone_format_of 2.0.1 → 3.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 849be72ebc3b9c3ae6720150b2d049055e99a54e3f0601145a307b2fde8a43a1
4
- data.tar.gz: 4e43a14824d83644200b50ce9a9edf542aa4045e452c35d2e20f232b13c713c4
3
+ metadata.gz: d95a25f704075668e80dad65c4903488996b764b1a85e60e8d9a637e7f98bc78
4
+ data.tar.gz: 6c88e26d10508dfb05de2610d4acf89095f72e47299e02f3f89b1118e98fc98f
5
5
  SHA512:
6
- metadata.gz: 8589fd239626e36374bb9a17ea4f5675e33ae2fcbdd4f98f84b0618fb88800d3f998da0b5427c9c3a7ecd2400d61d45909e1767752632912b232f6783989b9fa
7
- data.tar.gz: 10315583536e9bccc2019498f1b5b6155dcd54949792b7e0ce40416554b17d6236ddf8f01457bcb4d314c975d09358663f77bba9eb69a5a4b3ef61d67fa5b267
6
+ metadata.gz: eba1ad5e95181fbe86f91777d2a0af98d68417ec518bd59051e8763f81c9f1fb9647325893c2e56064d9f94bd5fc9276385b1962097e0b17ca3f65489f2cb011
7
+ data.tar.gz: b0622962cd4bf44e9eff7b20c1ae58cfeda0c659f2373cb343e7e9a446de8a512fa29451f61cc240c0ad466090aa9916b9570e79dc38c72382154e9dacf6fefe
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', '~> 2.0'
14
+ gem 'validates_phone_format_of', '~> 3.0'
15
15
 
16
16
  ## Usage
17
17
 
@@ -27,7 +27,7 @@ class User < ActiveRecord::Base
27
27
  # Same thing as
28
28
  validates_format_of :phone, with: ValidatesPhoneFormatOf::Regexp
29
29
  # Or
30
- validates_format_of :phone, with: /\A\+?[1-9]\d{1,14}\z/
30
+ validates_format_of :phone, with: /\A\+\d{1,15}\z/
31
31
 
32
32
  end
33
33
  ```
@@ -1,7 +1,7 @@
1
1
  require 'active_model'
2
2
 
3
3
  module ValidatesPhoneFormatOf
4
- Regexp = /\A\+?[1-9]\d{1,14}\z/
4
+ Regexp = /\A\+\d{1,15}\z/
5
5
  end
6
6
 
7
7
  module ActiveModel
@@ -28,7 +28,7 @@ describe ValidatesPhoneFormatOf do
28
28
  end
29
29
  end
30
30
 
31
- ['test', '0000', '(312) 555-1212'].each do |phone|
31
+ ['test', '0000', '(312) 555-1212', '3125551212'].each do |phone|
32
32
  it "#{phone} is not valid" do
33
33
  user = @user_class.new(phone)
34
34
  expect(user.valid?).to_not be_truthy
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'validates_phone_format_of'
5
- spec.version = '2.0.1'
5
+ spec.version = '3.0.0'
6
6
  spec.authors = ['Jonathan VUKOVICH-TRIBOUHARET']
7
7
  spec.email = ['jonathan.tribouharet@gmail.com']
8
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validates_phone_format_of
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan VUKOVICH-TRIBOUHARET