coppertone 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +1 -13
- data/.github/dependabot.yml +7 -0
- data/.rubocop.yml +41 -12
- data/Gemfile +2 -0
- data/Rakefile +6 -5
- data/coppertone.gemspec +2 -1
- data/lib/coppertone/directive.rb +2 -1
- data/lib/coppertone/error.rb +5 -0
- data/lib/coppertone/ip_address_wrapper.rb +1 -0
- data/lib/coppertone/macro_context.rb +10 -3
- data/lib/coppertone/macro_string.rb +3 -2
- data/lib/coppertone/macro_string/macro_parser.rb +4 -3
- data/lib/coppertone/mechanism.rb +1 -0
- data/lib/coppertone/mechanism/domain_spec_mechanism.rb +1 -1
- data/lib/coppertone/mechanism/include_matcher.rb +1 -0
- data/lib/coppertone/mechanism/ip_mechanism.rb +3 -2
- data/lib/coppertone/modifier.rb +2 -1
- data/lib/coppertone/modifier/base.rb +1 -0
- data/lib/coppertone/modifier/unknown.rb +1 -0
- data/lib/coppertone/qualifier.rb +1 -0
- data/lib/coppertone/record.rb +1 -0
- data/lib/coppertone/record_evaluator.rb +1 -0
- data/lib/coppertone/record_finder.rb +2 -3
- data/lib/coppertone/record_term_parser.rb +4 -2
- data/lib/coppertone/redirect_record_finder.rb +1 -0
- data/lib/coppertone/request.rb +3 -5
- data/lib/coppertone/request_count_limiter.rb +1 -0
- data/lib/coppertone/result.rb +1 -0
- data/lib/coppertone/sender_identity.rb +1 -0
- data/lib/coppertone/terms_parser.rb +1 -0
- data/lib/coppertone/utils/domain_utils.rb +1 -1
- data/lib/coppertone/utils/validated_domain_finder.rb +2 -1
- data/lib/coppertone/version.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3752897202805df2380313ece71a3fda42830bc636b29f6c48c92a3d4b4e91d6
|
4
|
+
data.tar.gz: 76cf7084e4f25c8198c9f534a66eb9cbf6584df5b3004aa4d07317aabd89fd99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d9b2a1e83a88e89c6226183ecf64db0cbe7206049dd34c922cbb707add141277c0b69edcffafb46100122a348fbecbe0a4ca339108882c389781514314ea324
|
7
|
+
data.tar.gz: 71c1abefd7b43713bc00933d9448d3746da5d52d15552ffa9a18918fbb4ec1afbd105a0b0738a412f42d7df05208ab01badedc8fa3d3ae52bb83546af2045981
|
data/.circleci/config.yml
CHANGED
@@ -1,10 +1,7 @@
|
|
1
1
|
version: 2
|
2
2
|
aliases:
|
3
3
|
- ¤t_ruby_image
|
4
|
-
circleci/ruby:2.
|
5
|
-
|
6
|
-
- &previous_ruby_image
|
7
|
-
circleci/ruby:2.4.4
|
4
|
+
circleci/ruby:2.7.2
|
8
5
|
|
9
6
|
- &defaults
|
10
7
|
working_directory: ~/repo
|
@@ -72,12 +69,6 @@ jobs:
|
|
72
69
|
- *step_store_test_artifacts
|
73
70
|
- *step_store_coverage_artifacts
|
74
71
|
|
75
|
-
previous_ruby-job:
|
76
|
-
working_directory: ~/repo
|
77
|
-
docker:
|
78
|
-
- image: *previous_ruby_image
|
79
|
-
steps: *test_run_steps
|
80
|
-
|
81
72
|
workflows:
|
82
73
|
version: 2
|
83
74
|
build-test_current-ruby:
|
@@ -86,6 +77,3 @@ workflows:
|
|
86
77
|
- code-quality-job:
|
87
78
|
requires:
|
88
79
|
- current_ruby-job # let primary job fetch all dependencies first
|
89
|
-
build-test_previous-ruby:
|
90
|
-
jobs:
|
91
|
-
- previous_ruby-job
|
data/.rubocop.yml
CHANGED
@@ -1,32 +1,61 @@
|
|
1
1
|
AllCops:
|
2
|
-
|
2
|
+
NewCops: enable
|
3
|
+
TargetRubyVersion: 2.7
|
3
4
|
|
5
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
6
|
+
Enabled: true
|
7
|
+
Layout/LineLength:
|
8
|
+
Enabled: false
|
9
|
+
Layout/SpaceAroundMethodCallOperator:
|
10
|
+
Enabled: true
|
11
|
+
Lint/DeprecatedOpenSSLConstant:
|
12
|
+
Enabled: true
|
13
|
+
Lint/EmptyBlock:
|
14
|
+
Enabled: false
|
15
|
+
Lint/MixedRegexpCaptureTypes:
|
16
|
+
Enabled: true
|
17
|
+
Lint/RaiseException:
|
18
|
+
Enabled: true
|
19
|
+
Lint/StructNewOverride:
|
20
|
+
Enabled: true
|
21
|
+
Lint/UriEscapeUnescape:
|
22
|
+
Enabled: false
|
4
23
|
Metrics/AbcSize:
|
5
24
|
Exclude:
|
6
25
|
- 'Rakefile'
|
7
26
|
Metrics/BlockLength:
|
8
27
|
Exclude:
|
9
28
|
- 'spec/**/*'
|
10
|
-
Metrics/LineLength:
|
11
|
-
Enabled: false
|
12
29
|
Metrics/MethodLength:
|
13
30
|
Exclude:
|
14
31
|
- 'Rakefile'
|
15
|
-
|
32
|
+
Naming/FileName:
|
33
|
+
Exclude:
|
34
|
+
- 'spec/open_spf/**/*'
|
35
|
+
Naming/MethodParameterName:
|
16
36
|
Enabled: false
|
17
|
-
|
37
|
+
Style/Documentation:
|
18
38
|
Enabled: false
|
39
|
+
Style/ExponentialNotation:
|
40
|
+
Enabled: true
|
19
41
|
Style/FrozenStringLiteralComment:
|
20
42
|
Enabled: false
|
21
|
-
Naming/FileName:
|
22
|
-
Exclude:
|
23
|
-
- 'spec/open_spf/**/*'
|
24
43
|
Style/FormatStringToken:
|
25
44
|
Enabled: false
|
45
|
+
Style/HashEachMethods:
|
46
|
+
Enabled: true
|
47
|
+
Style/HashTransformKeys:
|
48
|
+
Enabled: true
|
49
|
+
Style/HashTransformValues:
|
50
|
+
Enabled: true
|
51
|
+
Style/RedundantFetchBlock:
|
52
|
+
Enabled: true
|
53
|
+
Style/RedundantRegexpCharacterClass:
|
54
|
+
Enabled: true
|
55
|
+
Style/RedundantRegexpEscape:
|
56
|
+
Enabled: true
|
57
|
+
Style/SlicingWithRange:
|
58
|
+
Enabled: true
|
26
59
|
Style/SymbolArray:
|
27
60
|
Exclude:
|
28
61
|
- 'spec/open_spf/**/*'
|
29
|
-
Naming/UncommunicativeMethodParamName:
|
30
|
-
Enabled: false
|
31
|
-
Lint/UriEscapeUnescape:
|
32
|
-
Enabled: false
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -23,15 +23,16 @@ desc 'Parse OpenSPF tests'
|
|
23
23
|
|
24
24
|
def spec_file_name(doc, output_path)
|
25
25
|
description = doc['description']
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
file_prefix = description.gsub(/[^\w\s_-]+/, '')
|
27
|
+
.gsub(/(^|\b\s)\s+($|\s?\b)/, '\\1\\2')
|
28
|
+
.gsub(/\s+/, '_')
|
29
|
+
file_name = "#{file_prefix}_spec.rb"
|
29
30
|
File.join(output_path, file_name)
|
30
31
|
end
|
31
32
|
|
32
33
|
INDENT_STRING = ' '.freeze
|
33
34
|
def indented_string(num_indents = 1)
|
34
|
-
Array.new(num_indents) { INDENT_STRING }.join
|
35
|
+
Array.new(num_indents) { INDENT_STRING }.join
|
35
36
|
end
|
36
37
|
|
37
38
|
def puts_prefixed_string(f, s, indent = 0)
|
@@ -89,7 +90,7 @@ def write_result(f, host, mailfrom, helo, indent)
|
|
89
90
|
end
|
90
91
|
|
91
92
|
def write_expects(f, results, explanation, indent)
|
92
|
-
results_array = "[#{results.map { |r|
|
93
|
+
results_array = "[#{results.map { |r| ":#{r}" }.join(',')}]"
|
93
94
|
code_expect = "expect(#{results_array}).to include(result.code)"
|
94
95
|
puts_prefixed_string(f, code_expect, indent)
|
95
96
|
return unless explanation
|
data/coppertone.gemspec
CHANGED
@@ -15,6 +15,7 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
16
16
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
17
17
|
spec.require_paths = ['lib']
|
18
|
+
spec.required_ruby_version = '>= 2.7'
|
18
19
|
|
19
20
|
spec.add_runtime_dependency 'activesupport', '>= 3.0'
|
20
21
|
spec.add_runtime_dependency 'addressable'
|
@@ -22,6 +23,6 @@ Gem::Specification.new do |spec|
|
|
22
23
|
spec.add_runtime_dependency 'i18n'
|
23
24
|
spec.add_development_dependency 'bundler'
|
24
25
|
spec.add_development_dependency 'flay'
|
25
|
-
spec.add_development_dependency 'rake', '~>
|
26
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
26
27
|
spec.add_development_dependency 'rspec', '>= 3.0'
|
27
28
|
end
|
data/lib/coppertone/directive.rb
CHANGED
@@ -7,6 +7,7 @@ module Coppertone
|
|
7
7
|
# SPF specification (see section 4.6.1).
|
8
8
|
class Directive
|
9
9
|
attr_reader :qualifier, :mechanism
|
10
|
+
|
10
11
|
delegate :context_dependent?, :dns_lookup_term?,
|
11
12
|
:includes_ptr?, to: :mechanism
|
12
13
|
|
@@ -38,7 +39,7 @@ module Coppertone
|
|
38
39
|
qualifier.default? ? mechanism_s : "#{qualifier}#{mechanism_s}"
|
39
40
|
end
|
40
41
|
|
41
|
-
DIRECTIVE_REGEXP = /\A([
|
42
|
+
DIRECTIVE_REGEXP = /\A([+\-~?]?)([a-zA-Z0-9]*)((:?)\S*)\z/.freeze
|
42
43
|
def self.matching_term(text)
|
43
44
|
return nil if text.include?('=')
|
44
45
|
|
data/lib/coppertone/error.rb
CHANGED
@@ -4,11 +4,13 @@ module Coppertone
|
|
4
4
|
|
5
5
|
# Error classes mapping to the SPF result codes
|
6
6
|
class TemperrorError < Coppertone::Error; end
|
7
|
+
|
7
8
|
class PermerrorError < Coppertone::Error; end
|
8
9
|
|
9
10
|
# Errors occurring when the string representation of a MacroString
|
10
11
|
# or DomainSpec does not obey the syntax requirements.
|
11
12
|
class MacroStringParsingError < Coppertone::PermerrorError; end
|
13
|
+
|
12
14
|
class DomainSpecParsingError < MacroStringParsingError; end
|
13
15
|
|
14
16
|
# Occurs when an SPF record cannot be parsed.
|
@@ -42,8 +44,11 @@ module Coppertone
|
|
42
44
|
|
43
45
|
# Errors generated when certain spec-defined limits are exceeded.
|
44
46
|
class LimitExceededError < Coppertone::PermerrorError; end
|
47
|
+
|
45
48
|
class TermLimitExceededError < PermerrorError; end
|
49
|
+
|
46
50
|
class VoidLimitExceededError < PermerrorError; end
|
51
|
+
|
47
52
|
class MXLimitExceededError < PermerrorError; end
|
48
53
|
|
49
54
|
# Raised when context is required to evaluate a value, but
|
@@ -7,7 +7,7 @@ module Coppertone
|
|
7
7
|
# A context used to evaluate MacroStrings. Responds to all of the
|
8
8
|
# macro letter directives except 'p'.
|
9
9
|
class MacroContext
|
10
|
-
attr_reader :domain, :ip_address_wrapper, :sender_identity, :helo_domain
|
10
|
+
attr_reader :domain, :ip_address_wrapper, :sender_identity, :helo_domain, :hostname
|
11
11
|
|
12
12
|
delegate :s, :l, :o, to: :sender_identity
|
13
13
|
alias d domain
|
@@ -16,7 +16,6 @@ module Coppertone
|
|
16
16
|
to: :ip_address_wrapper
|
17
17
|
alias h helo_domain
|
18
18
|
|
19
|
-
attr_reader :hostname
|
20
19
|
def initialize(domain, ip_as_s, sender, helo_domain = 'unknown',
|
21
20
|
options = {})
|
22
21
|
@ip_address_wrapper = IPAddressWrapper.new(ip_as_s)
|
@@ -37,10 +36,18 @@ module Coppertone
|
|
37
36
|
end
|
38
37
|
|
39
38
|
RESERVED_REGEXP = Regexp.new("[^#{URI::PATTERN::UNRESERVED}]")
|
39
|
+
|
40
|
+
def escape(string)
|
41
|
+
encoding = string.encoding
|
42
|
+
string.b.gsub(RESERVED_REGEXP) do |m|
|
43
|
+
"%#{m.unpack('H2' * m.bytesize).join('%').upcase}"
|
44
|
+
end.force_encoding(encoding)
|
45
|
+
end
|
46
|
+
|
40
47
|
%w[s l o d i v h c r t].each do |m|
|
41
48
|
define_method(m.upcase) do
|
42
49
|
unencoded = send(m)
|
43
|
-
unencoded ?
|
50
|
+
unencoded ? escape(unencoded) : nil
|
44
51
|
end
|
45
52
|
end
|
46
53
|
|
@@ -9,6 +9,7 @@ module Coppertone
|
|
9
9
|
# context for interpolation.
|
10
10
|
class MacroString
|
11
11
|
attr_reader :macro_text
|
12
|
+
|
12
13
|
def initialize(macro_text)
|
13
14
|
@macro_text = macro_text
|
14
15
|
macros
|
@@ -19,11 +20,11 @@ module Coppertone
|
|
19
20
|
end
|
20
21
|
|
21
22
|
def expand(context, request = nil)
|
22
|
-
macros.map { |m| m.expand(context, request) }.join
|
23
|
+
macros.map { |m| m.expand(context, request) }.join
|
23
24
|
end
|
24
25
|
|
25
26
|
def to_s
|
26
|
-
macros.map(&:to_s).join
|
27
|
+
macros.map(&:to_s).join
|
27
28
|
end
|
28
29
|
|
29
30
|
def context_dependent?
|
@@ -9,6 +9,7 @@ module Coppertone
|
|
9
9
|
# in the context of a particular SPF check.
|
10
10
|
class MacroParser
|
11
11
|
attr_reader :macros
|
12
|
+
|
12
13
|
def initialize(s)
|
13
14
|
@s = s.dup
|
14
15
|
@macros = []
|
@@ -37,7 +38,7 @@ module Coppertone
|
|
37
38
|
|
38
39
|
interpolated_body = @s[2, closing_index - 2]
|
39
40
|
@macros << MacroExpand.new(interpolated_body)
|
40
|
-
@s = @s[(closing_index + 1)
|
41
|
+
@s = @s[(closing_index + 1)..]
|
41
42
|
end
|
42
43
|
|
43
44
|
SIMPLE_MACRO_LETTERS = %w[% _ -].freeze
|
@@ -47,7 +48,7 @@ module Coppertone
|
|
47
48
|
macro_code = @s[0, 2]
|
48
49
|
if MacroStaticExpand.exists_for?(macro_code)
|
49
50
|
@macros << MacroStaticExpand.macro_for(macro_code)
|
50
|
-
@s = @s[2
|
51
|
+
@s = @s[2..]
|
51
52
|
else
|
52
53
|
parse_contextual_interpolated_macro
|
53
54
|
end
|
@@ -57,7 +58,7 @@ module Coppertone
|
|
57
58
|
new_idx = @s.index('%')
|
58
59
|
new_idx ||= @s.length
|
59
60
|
@macros << MacroLiteral.new(@s[0, new_idx])
|
60
|
-
@s = @s[new_idx
|
61
|
+
@s = @s[new_idx..]
|
61
62
|
new_idx
|
62
63
|
end
|
63
64
|
end
|
data/lib/coppertone/mechanism.rb
CHANGED
@@ -3,6 +3,7 @@ module Coppertone
|
|
3
3
|
# Implements the ip4 mechanism.
|
4
4
|
class IPMechanism < Mechanism
|
5
5
|
attr_reader :netblock, :cidr_length
|
6
|
+
|
6
7
|
def self.create(attributes)
|
7
8
|
new(attributes)
|
8
9
|
end
|
@@ -10,13 +11,13 @@ module Coppertone
|
|
10
11
|
def initialize(attributes)
|
11
12
|
super(attributes)
|
12
13
|
unless attributes.blank?
|
13
|
-
attributes = attributes[1
|
14
|
+
attributes = attributes[1..] if attributes[0] == ':'
|
14
15
|
@netblock, @cidr_length = parse_netblock(attributes)
|
15
16
|
end
|
16
17
|
raise Coppertone::InvalidMechanismError if @netblock.nil?
|
17
18
|
end
|
18
19
|
|
19
|
-
LEADING_ZEROES_IN_CIDR_REGEXP = %r{
|
20
|
+
LEADING_ZEROES_IN_CIDR_REGEXP = %r{/0\d}.freeze
|
20
21
|
def validate_no_leading_zeroes_in_cidr(ip_as_s)
|
21
22
|
return unless LEADING_ZEROES_IN_CIDR_REGEXP.match?(ip_as_s)
|
22
23
|
|
data/lib/coppertone/modifier.rb
CHANGED
@@ -14,7 +14,7 @@ module Coppertone
|
|
14
14
|
class_builder.register(klass.label, klass)
|
15
15
|
end
|
16
16
|
|
17
|
-
MODIFIER_REGEXP = /\A([a-zA-Z]+[a-zA-Z0-9
|
17
|
+
MODIFIER_REGEXP = /\A([a-zA-Z]+[a-zA-Z0-9\-_.]*)=(\S*)\z/.freeze
|
18
18
|
def self.matching_term(text)
|
19
19
|
matches = MODIFIER_REGEXP.match(text)
|
20
20
|
return nil unless matches
|
@@ -29,6 +29,7 @@ module Coppertone
|
|
29
29
|
end
|
30
30
|
|
31
31
|
attr_reader :arguments
|
32
|
+
|
32
33
|
def initialize(arguments)
|
33
34
|
@arguments = arguments
|
34
35
|
end
|
data/lib/coppertone/qualifier.rb
CHANGED
data/lib/coppertone/record.rb
CHANGED
@@ -2,6 +2,7 @@ module Coppertone
|
|
2
2
|
# A helper class for finding SPF records for a domain.
|
3
3
|
class RecordFinder
|
4
4
|
attr_reader :dns_client, :domain
|
5
|
+
|
5
6
|
def initialize(dns_client, domain)
|
6
7
|
@dns_client = dns_client
|
7
8
|
@domain = domain
|
@@ -12,9 +13,7 @@ module Coppertone
|
|
12
13
|
begin
|
13
14
|
validate_txt_records
|
14
15
|
spf_dns_record = txt_records.first
|
15
|
-
|
16
|
-
|
17
|
-
Record.new(spf_dns_record)
|
16
|
+
spf_dns_record ? Record.new(spf_dns_record) : nil
|
18
17
|
end
|
19
18
|
end
|
20
19
|
|
@@ -7,11 +7,13 @@ module Coppertone
|
|
7
7
|
|
8
8
|
def self.record?(text)
|
9
9
|
return false if text.blank?
|
10
|
+
return true if RECORD_REGEXP.match?(text.strip)
|
10
11
|
|
11
|
-
|
12
|
+
false
|
12
13
|
end
|
13
14
|
|
14
15
|
attr_reader :text, :terms
|
16
|
+
|
15
17
|
def initialize(text)
|
16
18
|
raise RecordParsingError unless self.class.record?(text)
|
17
19
|
raise RecordParsingError unless ALLOWED_CHARACTERS.match?(text)
|
@@ -21,7 +23,7 @@ module Coppertone
|
|
21
23
|
end
|
22
24
|
|
23
25
|
def terms_segment
|
24
|
-
text[VERSION_STR.length
|
26
|
+
text[VERSION_STR.length..].strip
|
25
27
|
end
|
26
28
|
end
|
27
29
|
end
|
@@ -2,6 +2,7 @@ module Coppertone
|
|
2
2
|
# A helper class for finding SPF records for a redirect modifier.
|
3
3
|
class RedirectRecordFinder
|
4
4
|
attr_reader :redirect, :macro_context, :request_context
|
5
|
+
|
5
6
|
def initialize(redirect, macro_context, request_context)
|
6
7
|
@redirect = redirect
|
7
8
|
@macro_context = macro_context
|
data/lib/coppertone/request.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
module Coppertone
|
2
2
|
# Represents an SPF request.
|
3
3
|
class Request
|
4
|
-
attr_reader :ip_as_s, :sender, :helo_domain, :options, :result
|
5
|
-
|
4
|
+
attr_reader :ip_as_s, :sender, :helo_domain, :options, :result, :helo_result, :mailfrom_result
|
5
|
+
|
6
6
|
def initialize(ip_as_s, sender, helo_domain, options = {})
|
7
7
|
@ip_as_s = ip_as_s
|
8
8
|
@sender = sender
|
@@ -74,9 +74,7 @@ module Coppertone
|
|
74
74
|
def check_spf_for_context(macro_context, identity)
|
75
75
|
record = spf_record(macro_context)
|
76
76
|
@result = spf_request(macro_context, record, identity) if record
|
77
|
-
rescue DNSAdapter::Error => e
|
78
|
-
Result.temperror(e.message)
|
79
|
-
rescue Coppertone::TemperrorError => e
|
77
|
+
rescue DNSAdapter::Error, Coppertone::TemperrorError => e
|
80
78
|
Result.temperror(e.message)
|
81
79
|
rescue Coppertone::PermerrorError => e
|
82
80
|
Result.permerror(e.message)
|
@@ -3,6 +3,7 @@ module Coppertone
|
|
3
3
|
# used to track and limit the number of DNS queries of various types.
|
4
4
|
class RequestCountLimiter
|
5
5
|
attr_accessor :count, :limit, :counter_description
|
6
|
+
|
6
7
|
def initialize(limit = nil, counter_description = nil)
|
7
8
|
self.limit = limit
|
8
9
|
self.counter_description = counter_description
|
data/lib/coppertone/result.rb
CHANGED
@@ -42,7 +42,7 @@ module Coppertone
|
|
42
42
|
|
43
43
|
NO_DASH_NONNUMERIC_REGEXP = /\A[a-zA-Z0-9]*[a-zA-Z]+[a-zA-Z0-9]*\z/.freeze
|
44
44
|
NO_DASH_REGEXP = /\A[a-zA-Z0-9]+\z/.freeze
|
45
|
-
DASH_REGEXP = /\A[a-zA-Z0-9]
|
45
|
+
DASH_REGEXP = /\A[a-zA-Z0-9]+-[a-zA-Z0-9\-]*[a-zA-Z0-9]+\z/.freeze
|
46
46
|
|
47
47
|
def self.valid_hostname_label?(l)
|
48
48
|
return false unless valid_label?(l)
|
@@ -4,7 +4,8 @@ module Coppertone
|
|
4
4
|
# section 5.5 of the RFC.
|
5
5
|
class ValidatedDomainFinder
|
6
6
|
attr_reader :subdomain_only
|
7
|
-
|
7
|
+
|
8
|
+
def initialize(macro_context, request_context, subdomain_only = true) # rubocop:disable Style/OptionalBooleanParameter
|
8
9
|
@mc = macro_context
|
9
10
|
@request_context = request_context
|
10
11
|
@subdomain_only = subdomain_only
|
data/lib/coppertone/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coppertone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter M. Goldstein
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '13.0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '13.0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rspec
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -133,6 +133,7 @@ extra_rdoc_files: []
|
|
133
133
|
files:
|
134
134
|
- ".circleci/config.yml"
|
135
135
|
- ".codeclimate.yml"
|
136
|
+
- ".github/dependabot.yml"
|
136
137
|
- ".gitignore"
|
137
138
|
- ".rubocop.yml"
|
138
139
|
- ".travis.yml"
|
@@ -253,7 +254,7 @@ homepage: https://github.com/ValiMail/coppertone
|
|
253
254
|
licenses:
|
254
255
|
- MIT
|
255
256
|
metadata: {}
|
256
|
-
post_install_message:
|
257
|
+
post_install_message:
|
257
258
|
rdoc_options: []
|
258
259
|
require_paths:
|
259
260
|
- lib
|
@@ -261,15 +262,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
261
262
|
requirements:
|
262
263
|
- - ">="
|
263
264
|
- !ruby/object:Gem::Version
|
264
|
-
version: '
|
265
|
+
version: '2.7'
|
265
266
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
266
267
|
requirements:
|
267
268
|
- - ">="
|
268
269
|
- !ruby/object:Gem::Version
|
269
270
|
version: '0'
|
270
271
|
requirements: []
|
271
|
-
rubygems_version: 3.
|
272
|
-
signing_key:
|
272
|
+
rubygems_version: 3.2.8
|
273
|
+
signing_key:
|
273
274
|
specification_version: 4
|
274
275
|
summary: A Sender Policy Framework (SPF) toolkit
|
275
276
|
test_files:
|