activemodel-email_address_validator 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ce2a072316b678fe8c0d2ff17aea99236ed8bc3
4
- data.tar.gz: 51375ce7b16243a3effda6b54debe99a66d6e1f5
3
+ metadata.gz: e27f8200f0c5dd161f5cf45fdd5478f01d94d79f
4
+ data.tar.gz: e50b9c48333da5ceb5d8978fab9dbf8318327761
5
5
  SHA512:
6
- metadata.gz: 5f85d09177319828de0188138f85e2e8a65d018852303a0be59112efe949ef799830a06c16bca06c4647f503c1cd17b59015135a653cb611a90cff4d80ce4af8
7
- data.tar.gz: b33d0ff7a9dd8f73db1aca22a1de9b814862a8f021d67aada6d302bc0a3b1e06e088297c060f11369fb1bd0e2213983187da85897b78b74e4424dceb367422aa
6
+ metadata.gz: ed0ccfaaa18235cf55836b75bacfc43e5502e08bdf12f49575f11e205bd9f5aa9241135bed8fada104ec7f4fc8a036dea85c3af854fab939e27f3401d10a33fb
7
+ data.tar.gz: a0444e291646101a56a8a781932fd0db04d79358a52f657b5113874110ddd80e18e9da28765c36f0e874ea33a0d9d15de3208dbd8c24a464bd58d2e86b7fbe89
data/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/).
7
7
 
8
+ ## [1.0.1]
9
+
10
+ ### Added
11
+
12
+ - Reject email addresses with tildes in the hostname
13
+
8
14
  ## [1.0.0]
9
15
 
10
16
  ### Added
@@ -32,7 +32,7 @@ module ActiveModelEmailAddressValidator
32
32
 
33
33
  user, host = *email_parts
34
34
  return false unless user =~ /^([^.]+\S)*[^. ]+$/
35
- return false unless host =~ /^([^,. ]+\.)+[^,. ]+$/
35
+ return false unless host =~ /^([^,. ~]+\.)+[^,. ]+$/
36
36
  true
37
37
  end
38
38
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveModelEmailAddressValidator
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -101,6 +101,10 @@ class EmailAddressValidTest < MiniTest::Test
101
101
  reject("my@domain.com,")
102
102
  end
103
103
 
104
+ def test_rejects_tildes_in_hostname
105
+ reject("my@~domain.com")
106
+ end
107
+
104
108
  def test_handles_long_failing_strings
105
109
  reject("fernandeztorralbofrancisco@sabadellatlantico.")
106
110
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activemodel-email_address_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakob Skjerning
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-23 00:00:00.000000000 Z
11
+ date: 2017-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  version: '0'
115
115
  requirements: []
116
116
  rubyforge_project:
117
- rubygems_version: 2.4.8
117
+ rubygems_version: 2.5.2
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: ActiveModel-style email address format validator