spam_email 0.0.42 → 0.0.44
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -3
- data/lib/spam_email/blacklist.rb +898 -93
- data/lib/spam_email/check.rb +12 -0
- data/lib/spam_email/version.rb +1 -1
- data/lib/spam_email.rb +5 -13
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29d25dad00eaf78e6b55d2d6715858d0f2752990
|
4
|
+
data.tar.gz: b7460d488e6cc094cf7b791a62db1859ffed9ac4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 594c0c7a1aabef9c441049bca9feb83239ed527d264733174016fcbebe40e83dfd50da710841181ba3de3508f2c2728207046f8e3c520f67d1b8b2a4b4e62210
|
7
|
+
data.tar.gz: 90c454f801c74503e23d43c94e27f51d15d62faecb3fbad158baa0f6f77c9a0ac2c9ea4007180ae0947ab23afbcb4290712e406bde4487e41c942622c094dda2
|
data/README.md
CHANGED
@@ -24,7 +24,7 @@ Or install it yourself as:
|
|
24
24
|
Validation will pass with empty string/`nil` value! Checking the input with
|
25
25
|
`valid_email` or at least checking `presence: true` is strongly recommendend!**
|
26
26
|
|
27
|
-
```
|
27
|
+
```ruby
|
28
28
|
class User < ActiveRecord::Base
|
29
29
|
validates :email, presence: true, spam_email: true
|
30
30
|
end
|
@@ -32,12 +32,20 @@ end
|
|
32
32
|
|
33
33
|
or specify a custom message with (the gem comes with en/de/fr locales):
|
34
34
|
|
35
|
-
|
35
|
+
```ruby
|
36
|
+
validates :email, presence: true, spam_email: { message: "is a blacklisted provider!" }
|
37
|
+
```
|
36
38
|
|
37
39
|
If you want to add/remove providers you can use an initializer and modify `SpamEmail::Blacklist`.
|
38
40
|
To disable a provider just set the hash value for the domain to false.
|
39
41
|
You can add new domainsby modifing the hash.
|
40
42
|
|
43
|
+
You can also check the blacklist directly:
|
44
|
+
|
45
|
+
```ruby
|
46
|
+
SpamEmail.blacklisted?(email)
|
47
|
+
```
|
48
|
+
|
41
49
|
## Contributing
|
42
50
|
|
43
51
|
1. Fork it
|
@@ -49,4 +57,4 @@ You can add new domainsby modifing the hash.
|
|
49
57
|
## Thanks
|
50
58
|
|
51
59
|
Thanks go to Chris Birner (cbhp@lima-city.de) for the (inital) blacklist and
|
52
|
-
to https://github.com/hallelujah/valid_email for inspiration.
|
60
|
+
to https://github.com/hallelujah/valid_email for inspiration.
|