spf 0.0.41 → 0.0.42
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.
- data/Gemfile +1 -0
- data/Gemfile.lock +15 -16
- data/README.rdoc +21 -1
- data/lib/spf/version.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spf.gemspec +6 -3
- metadata +18 -2
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
GEM
|
|
2
2
|
remote: http://rubygems.org/
|
|
3
3
|
specs:
|
|
4
|
-
addressable (2.3.
|
|
4
|
+
addressable (2.3.6)
|
|
5
5
|
builder (3.2.2)
|
|
6
6
|
diff-lcs (1.1.3)
|
|
7
|
-
faraday (0.8.
|
|
7
|
+
faraday (0.8.9)
|
|
8
8
|
multipart-post (~> 1.2.0)
|
|
9
|
-
git (1.2.
|
|
9
|
+
git (1.2.7)
|
|
10
10
|
github_api (0.10.1)
|
|
11
11
|
addressable
|
|
12
12
|
faraday (~> 0.8.1)
|
|
@@ -14,9 +14,8 @@ GEM
|
|
|
14
14
|
multi_json (~> 1.4)
|
|
15
15
|
nokogiri (~> 1.5.2)
|
|
16
16
|
oauth2
|
|
17
|
-
hashie (
|
|
18
|
-
highline (1.6.
|
|
19
|
-
httpauth (0.2.0)
|
|
17
|
+
hashie (3.1.0)
|
|
18
|
+
highline (1.6.21)
|
|
20
19
|
jeweler (1.8.8)
|
|
21
20
|
builder
|
|
22
21
|
bundler (~> 1.0)
|
|
@@ -26,22 +25,20 @@ GEM
|
|
|
26
25
|
nokogiri (= 1.5.10)
|
|
27
26
|
rake
|
|
28
27
|
rdoc
|
|
29
|
-
json (1.8.
|
|
30
|
-
jwt (0.
|
|
31
|
-
|
|
32
|
-
multi_json (1.8.2)
|
|
28
|
+
json (1.8.1)
|
|
29
|
+
jwt (1.0.0)
|
|
30
|
+
multi_json (1.10.1)
|
|
33
31
|
multi_xml (0.5.5)
|
|
34
32
|
multipart-post (1.2.0)
|
|
35
33
|
nokogiri (1.5.10)
|
|
36
|
-
oauth2 (0.9.
|
|
37
|
-
faraday (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
multi_json (~> 1.0)
|
|
34
|
+
oauth2 (0.9.4)
|
|
35
|
+
faraday (>= 0.8, < 0.10)
|
|
36
|
+
jwt (~> 1.0)
|
|
37
|
+
multi_json (~> 1.3)
|
|
41
38
|
multi_xml (~> 0.5)
|
|
42
39
|
rack (~> 1.2)
|
|
43
40
|
rack (1.5.2)
|
|
44
|
-
rake (10.
|
|
41
|
+
rake (10.3.2)
|
|
45
42
|
rdoc (3.12.2)
|
|
46
43
|
json (~> 1.4)
|
|
47
44
|
rspec (2.8.0)
|
|
@@ -52,6 +49,7 @@ GEM
|
|
|
52
49
|
rspec-expectations (2.8.0)
|
|
53
50
|
diff-lcs (~> 1.1.2)
|
|
54
51
|
rspec-mocks (2.8.0)
|
|
52
|
+
ruby-ip (0.9.3)
|
|
55
53
|
|
|
56
54
|
PLATFORMS
|
|
57
55
|
ruby
|
|
@@ -61,3 +59,4 @@ DEPENDENCIES
|
|
|
61
59
|
jeweler (~> 1.8.7)
|
|
62
60
|
rdoc (~> 3.12)
|
|
63
61
|
rspec (~> 2.8.0)
|
|
62
|
+
ruby-ip (~> 0.9.1)
|
data/README.rdoc
CHANGED
|
@@ -1,12 +1,32 @@
|
|
|
1
1
|
= SPF
|
|
2
2
|
|
|
3
3
|
The +spf+ Ruby gem, also known as +spf-ruby+, is an implementation of the Sender Policy Framework (SPF) e-mail sender
|
|
4
|
-
authentication system.
|
|
4
|
+
authentication system. It is closely based on the Mail::SPF Perl library at <http://search.cpan.org/~jmehnle/Mail-SPF-v2.005/>, so most of Mail::SPF's documentation is applicable.
|
|
5
5
|
|
|
6
6
|
See <http://www.openspf.org> for more information about SPF.
|
|
7
7
|
|
|
8
8
|
Note: This gem is currently very early in its lifecycle. The API is *not* guaranteed to be stable.
|
|
9
9
|
|
|
10
|
+
== Usage
|
|
11
|
+
|
|
12
|
+
require 'spf'
|
|
13
|
+
|
|
14
|
+
spf_server = SPF::Server.new
|
|
15
|
+
|
|
16
|
+
request = SPF::Request.new(
|
|
17
|
+
versions: [1, 2], # optional
|
|
18
|
+
scope: 'mfrom', # or 'helo', 'pra'
|
|
19
|
+
identity: 'fred@example.com',
|
|
20
|
+
ip_address: '192.168.0.1',
|
|
21
|
+
helo_identity: 'mta.example.com' # optional
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
result = spf_server.process(request)
|
|
25
|
+
|
|
26
|
+
puts result
|
|
27
|
+
|
|
28
|
+
result_code = result.code # :pass, :fail, etc.
|
|
29
|
+
|
|
10
30
|
== Copyright
|
|
11
31
|
|
|
12
32
|
Copyright 2013, 2014 Agari Data, Inc.
|
data/lib/spf/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
2
2
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
|
3
3
|
require 'rspec'
|
|
4
|
-
require 'spf
|
|
4
|
+
require 'spf'
|
|
5
5
|
|
|
6
6
|
# Requires supporting files with custom matchers and macros, etc,
|
|
7
7
|
# in ./support/ and its subdirectories.
|
data/spf.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = "spf"
|
|
8
|
-
s.version = "0.0.
|
|
8
|
+
s.version = "0.0.42"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Andrew Flury", "Julian Mehnle"]
|
|
12
|
-
s.date = "
|
|
12
|
+
s.date = "2014-07-08"
|
|
13
13
|
s.description = " An object-oriented Ruby implementation of the Sender Policy Framework (SPF)\n e-mail sender authentication system, fully compliant with RFC 4408.\n"
|
|
14
14
|
s.email = ["code@agari.com", "aflury@agari.com", "jmehnle@agari.com"]
|
|
15
15
|
s.extra_rdoc_files = [
|
|
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
|
|
|
39
39
|
s.homepage = "https://github.com/agaridata/spf-ruby"
|
|
40
40
|
s.licenses = ["none (all rights reserved)"]
|
|
41
41
|
s.require_paths = ["lib"]
|
|
42
|
-
s.rubygems_version = "1.8.23"
|
|
42
|
+
s.rubygems_version = "1.8.23.2"
|
|
43
43
|
s.summary = "Implementation of the Sender Policy Framework"
|
|
44
44
|
|
|
45
45
|
if s.respond_to? :specification_version then
|
|
@@ -50,17 +50,20 @@ Gem::Specification.new do |s|
|
|
|
50
50
|
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
|
51
51
|
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
|
52
52
|
s.add_development_dependency(%q<jeweler>, ["~> 1.8.7"])
|
|
53
|
+
s.add_development_dependency(%q<ruby-ip>, ["~> 0.9.1"])
|
|
53
54
|
else
|
|
54
55
|
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
|
55
56
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
|
56
57
|
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
|
57
58
|
s.add_dependency(%q<jeweler>, ["~> 1.8.7"])
|
|
59
|
+
s.add_dependency(%q<ruby-ip>, ["~> 0.9.1"])
|
|
58
60
|
end
|
|
59
61
|
else
|
|
60
62
|
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
|
61
63
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
|
62
64
|
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
|
63
65
|
s.add_dependency(%q<jeweler>, ["~> 1.8.7"])
|
|
66
|
+
s.add_dependency(%q<ruby-ip>, ["~> 0.9.1"])
|
|
64
67
|
end
|
|
65
68
|
end
|
|
66
69
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spf
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.42
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 2014-07-08 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: rspec
|
|
@@ -76,6 +76,22 @@ dependencies:
|
|
|
76
76
|
- - ~>
|
|
77
77
|
- !ruby/object:Gem::Version
|
|
78
78
|
version: 1.8.7
|
|
79
|
+
- !ruby/object:Gem::Dependency
|
|
80
|
+
name: ruby-ip
|
|
81
|
+
requirement: !ruby/object:Gem::Requirement
|
|
82
|
+
none: false
|
|
83
|
+
requirements:
|
|
84
|
+
- - ~>
|
|
85
|
+
- !ruby/object:Gem::Version
|
|
86
|
+
version: 0.9.1
|
|
87
|
+
type: :development
|
|
88
|
+
prerelease: false
|
|
89
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
90
|
+
none: false
|
|
91
|
+
requirements:
|
|
92
|
+
- - ~>
|
|
93
|
+
- !ruby/object:Gem::Version
|
|
94
|
+
version: 0.9.1
|
|
79
95
|
description: ! " An object-oriented Ruby implementation of the Sender Policy Framework
|
|
80
96
|
(SPF)\n e-mail sender authentication system, fully compliant with RFC 4408.\n"
|
|
81
97
|
email:
|