spam_email 0.0.3 → 0.0.4

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: 1c6e6ba472dbf76b65ff7364a940bd6ddbede1c1
4
- data.tar.gz: 68e07e5dd70c1a06d92ae7be9ea6d8261fef3fa2
3
+ metadata.gz: 577da8114f1ffb9ace8045cf16db492156415c27
4
+ data.tar.gz: 72417ef2f5f5df8e3d32f6d6a52533963ba9f237
5
5
  SHA512:
6
- metadata.gz: b363d212ef9223bb0397701cb734d9cc173a2b30f8ef005cf54b69656a88ae7cba0bed85a8c04a78d1a2c7e12f38db4ab3c5f64c74f7bae19ec2b3ddd7ea3037
7
- data.tar.gz: 6bbc16a152f6c5bb4a8873a6945d93b4bb4d4d35fbe0a6b35df95f8a18dec64ac94c429dad6d6586da3bfff834c277c5d963f25a2ea5433a869eb67f38de1fa0
6
+ metadata.gz: def45d8cee3201f3d705a190b83f8ec74acf4c436f6472110cd63b8208a4b246104ed9bc57a12fb0d82c2d93c0fc3bb4acdb9ee996379385746af1b8a9d62866
7
+ data.tar.gz: 0e8e78abbaa3cca446a997bf4c6b1cf8693af06156b824a86d7959d7540163e2deb31dc38fded38e38c3e657882fd4484e08852a0f586282e4ecb9c32a675325
data/README.md CHANGED
@@ -24,15 +24,20 @@ 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
- ``class User < ActiveRecord::Base
27
+ ```
28
+ class User < ActiveRecord::Base
28
29
  validates :email, presence: true, spam_email: true
29
30
  end
30
- ``
31
+ ```
31
32
 
32
33
  or specify a custom message with (the gem comes with en/de/fr locales):
33
34
 
34
35
  `validates :email, presence: true, spam_email: { message: "is a blacklisted provider!" }`
35
36
 
37
+ If you want to add/remove providers you can use an initializer and modify `SpamEmail::Blacklist`.
38
+ To disable a provider just set the hash value for the domain to false.
39
+ You can add new domainsby modifing the hash.
40
+
36
41
  ## Contributing
37
42
 
38
43
  1. Fork it
@@ -44,4 +49,4 @@ or specify a custom message with (the gem comes with en/de/fr locales):
44
49
  ## Thanks
45
50
 
46
51
  Thanks go to Chris Birner (cbhp@lima-city.de) for the (inital) blacklist and
47
- to https://github.com/hallelujah/valid_email for inspiration.
52
+ to https://github.com/hallelujah/valid_email for inspiration.
data/Rakefile CHANGED
@@ -1,9 +1,18 @@
1
+ require 'bundler'
1
2
  require "bundler/gem_tasks"
3
+ require 'rspec/core/rake_task'
4
+ require 'spam_email/list_compiler'
2
5
 
3
6
  desc "Run specs"
4
7
  RSpec::Core::RakeTask.new do |t|
5
8
  t.pattern = 'spec/**/*_spec.rb'
6
9
  end
7
10
 
11
+ desc "Compile provider list"
12
+ task :compile do |t|
13
+ SpamEmail::ListCompiler.compile_list
14
+ end
15
+
16
+
8
17
  task :default => [:spec]
9
18
  task :build => [:spec]