spam_email 0.0.42 → 0.0.44

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
  SHA1:
3
- metadata.gz: 869d8a6f5f445b884f23918ac937f03aeb5d2383
4
- data.tar.gz: 43bc1fea1270b218a6d098ce836de15c35051b17
3
+ metadata.gz: 29d25dad00eaf78e6b55d2d6715858d0f2752990
4
+ data.tar.gz: b7460d488e6cc094cf7b791a62db1859ffed9ac4
5
5
  SHA512:
6
- metadata.gz: 8d229a3c08196757ece93a5fa35b97f946c0ff1c97e680773f29f22ab34828ae88e76cb0f4eb3893ea4f536742a45fe55696867e4c092a5a98245a39e8f2975b
7
- data.tar.gz: 9984793c3f1db98935d595473093bc63476edd9c8d44c3babb2aa931fc91995e5a7535f6136708dace52fa2c51348564b9086880454bc3ceca686bb35214bcaf
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
- `validates :email, presence: true, spam_email: { message: "is a blacklisted provider!" }`
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.