valid_email2 3.1.1 → 3.1.2

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
  SHA256:
3
- metadata.gz: 63b864a75746bfe17f788bb3b57052c34f2ac4970d827c66bee6b0d13e300fae
4
- data.tar.gz: 40ca941d76160a68fcda81b2313ba2df94d9e979d9e688d7e79e2c732cfabe14
3
+ metadata.gz: 81f002d3f49ad0c6c47542c4551e19d4f3c4eee5e7ac8a880843c72afca63580
4
+ data.tar.gz: 83048195af9517187e998511ef33ba58813802110557305e5b0e195f5085833b
5
5
  SHA512:
6
- metadata.gz: 0d192c49f1d30c39e94b0d3af97114e75c3c298be5201e62988650fcf90158714cd0595db060138709ebf17cd938e7b930e928ddd03a4c634820a41e12fe26aa
7
- data.tar.gz: a19ca613dab66f590075509db6e702d583d714ea4203499d26a0b635a1ac60648a146bca65978c52b5490e81cbf2c2a036f80342ce1ad621c7bac59d42274207
6
+ metadata.gz: e1404b591d8639273063daeeaecdd8c53012d58c18e33286418f651372f8dd06513560ce2e0c2aac55db53ac081a8b11b9cb450520a66cf7b4506d86bce5f4b0
7
+ data.tar.gz: 6c739f6f71eacb00db48cf0ed72ae6dbd564275e54943a5bb88f10d64878d96cf32600f60ff6ee4dd525e7e47968e0809306f9d88fc13aef1d2af5a91a2bc6cf
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## Version 3.1.2
2
+ * Disallow ` ` in addresses https://github.com/micke/valid_email2/pull/139
3
+
1
4
  ## Version 3.1.1
2
5
  * Disallow domains starting or ending with `-` https://github.com/micke/valid_email2/pull/140
3
6
 
@@ -6,7 +6,7 @@ module ValidEmail2
6
6
  class Address
7
7
  attr_accessor :address
8
8
 
9
- PROHIBITED_DOMAIN_CHARACTERS_REGEX = /[+!_]/
9
+ PROHIBITED_DOMAIN_CHARACTERS_REGEX = /[+!_\s]/
10
10
  DEFAULT_RECIPIENT_DELIMITER = '+'.freeze
11
11
 
12
12
  def initialize(address)
@@ -1,3 +1,3 @@
1
1
  module ValidEmail2
2
- VERSION = "3.1.1"
2
+ VERSION = "3.1.2"
3
3
  end
@@ -84,6 +84,11 @@ describe ValidEmail2 do
84
84
  expect(user.valid?).to be_falsy
85
85
  end
86
86
 
87
+ it "is invalid if the domain contains spaces" do
88
+ user = TestUser.new(email: "user@gmail .com")
89
+ expect(user.valid?).to be_falsy
90
+ end
91
+
87
92
  it "is invalid if the domain begins with a dash" do
88
93
  user = TestUser.new(email: "foo@-gmail.com")
89
94
  expect(user.valid?).to be_falsy
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: valid_email2
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micke Lisinge