sanitize_email 2.0.3 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGELOG.md +97 -12
  4. data/CODE_OF_CONDUCT.md +84 -0
  5. data/CONTRIBUTING.md +47 -0
  6. data/{LICENSE → LICENSE.txt} +1 -1
  7. data/README.md +415 -59
  8. data/SECURITY.md +15 -0
  9. data/lib/sanitize_email/bleach.rb +75 -68
  10. data/lib/sanitize_email/config.rb +22 -22
  11. data/lib/sanitize_email/deprecation.rb +6 -6
  12. data/lib/sanitize_email/{engine.rb → engine_v5.rb} +4 -3
  13. data/lib/sanitize_email/engine_v6.rb +15 -0
  14. data/lib/sanitize_email/mail_ext.rb +2 -0
  15. data/lib/sanitize_email/mail_header_tools.rb +24 -16
  16. data/lib/sanitize_email/overridden_addresses.rb +84 -22
  17. data/lib/sanitize_email/railtie.rb +1 -1
  18. data/lib/sanitize_email/rspec_matchers.rb +66 -31
  19. data/lib/sanitize_email/test_helpers.rb +6 -6
  20. data/lib/sanitize_email/version.rb +4 -2
  21. data/lib/sanitize_email.rb +35 -19
  22. data.tar.gz.sig +0 -0
  23. metadata +108 -93
  24. metadata.gz.sig +0 -0
  25. data/.coveralls.yml +0 -1
  26. data/.gitignore +0 -12
  27. data/.pryrc +0 -11
  28. data/.reek +0 -9
  29. data/.rspec +0 -2
  30. data/.rubocop.yml +0 -73
  31. data/.rubocop_rspec.yml +0 -35
  32. data/.rubocop_todo.yml +0 -21
  33. data/.ruby-gemset +0 -1
  34. data/.ruby-version +0 -1
  35. data/.travis.yml +0 -71
  36. data/Appraisals +0 -29
  37. data/Gemfile +0 -22
  38. data/REEK +0 -2
  39. data/Rakefile +0 -52
  40. data/gemfiles/rails_4_2.gemfile +0 -17
  41. data/gemfiles/rails_5_0.gemfile +0 -17
  42. data/gemfiles/rails_5_1.gemfile +0 -17
  43. data/gemfiles/rails_5_2.gemfile +0 -17
  44. data/init.rb +0 -3
  45. data/sanitize_email.gemspec +0 -49
  46. data/spec/sanitize_email_spec.rb +0 -944
  47. data/spec/spec_helper.rb +0 -28
@@ -1,92 +1,127 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2008-16 Peter H. Boling of RailsBling.com
3
+ # Copyright (c) 2008 - 2018, 2020, 2022, 2024 Peter H. Boling of RailsBling.com
4
4
  # Released under the MIT license
5
5
  # Note: the RspecMatchers are composed matchers:
6
6
  # See: http://www.relishapp.com/rspec/rspec-expectations/v/3-5/docs/composing-matchers
7
7
 
8
- require 'sanitize_email/mail_ext'
8
+ require "sanitize_email/mail_ext"
9
9
 
10
10
  module SanitizeEmail
11
11
  # Provides matchers that can be used in
12
12
  # Rspec tests to assert the behavior of email
13
13
  module RspecMatchers
14
14
  %i[from to cc bcc subject reply_to].each do |attribute|
15
- RSpec::Matchers.define "have_#{attribute}" do |matcher|
15
+ RSpec::Matchers.define("have_#{attribute}") do |matcher|
16
16
  match do |actual|
17
17
  @actual = actual.send(attribute)
18
- @actual = @actual.join(', ') if @actual.respond_to?(:join)
19
- expect(@actual).to match(matcher)
18
+ @actual = @actual.join(", ") if @actual.respond_to?(:join)
19
+ expect(@actual).to(match(matcher))
20
20
  end
21
21
  end
22
22
  end
23
23
 
24
24
  %i[from to cc bcc subject reply_to].each do |attribute|
25
- RSpec::Matchers.define "match_#{attribute}" do |matcher|
25
+ RSpec::Matchers.define("match_#{attribute}") do |matcher|
26
26
  match do |actual|
27
27
  @actual = actual.send(attribute)
28
- @actual = @actual.join(', ') if @actual.respond_to?(:join)
29
- expect(@actual).to match(matcher)
28
+ @actual = @actual.join(", ") if @actual.respond_to?(:join)
29
+ expect(@actual).to(match(matcher))
30
30
  end
31
31
  end
32
32
  end
33
33
 
34
34
  %i[from to cc bcc subject reply_to].each do |attribute|
35
- RSpec::Matchers.define "be_#{attribute}" do |matcher|
35
+ RSpec::Matchers.define("be_#{attribute}") do |matcher|
36
36
  match do |actual|
37
37
  @actual = actual.send(attribute)
38
- @actual = @actual.join(', ') if @actual.respond_to?(:join)
39
- expect(@actual).to be(matcher)
38
+ @actual = @actual.join(", ") if @actual.respond_to?(:join)
39
+ expect(@actual).to(be(matcher))
40
40
  end
41
41
  end
42
42
  end
43
43
 
44
- RSpec::Matchers.define 'have_to_username' do |matcher|
45
- def get_to_username(email_message)
46
- username_header = email_message.header['X-Sanitize-Email-To']
47
- return username_header unless username_header.is_a?(Mail::Field)
48
- email_message.header.fields[3].value
44
+ RSpec::Matchers.define("have_to_username") do |matcher|
45
+ def get_to_usernames(email_message)
46
+ to_addrs = email_message[:to].addrs
47
+ to_addrs.map(&:name)
49
48
  end
50
49
  match do |actual|
51
- @actual = get_to_username(actual)
52
- expect(@actual).to match(matcher)
50
+ @actual = get_to_usernames(actual)
51
+ expect(@actual).to(include(match(matcher)))
53
52
  end
54
53
  end
55
54
 
56
- RSpec::Matchers.define 'have_cc_username' do |matcher|
57
- def get_cc_username(email_message)
58
- username_header = email_message.header['X-Sanitize-Email-Cc']
59
- return username_header unless username_header.is_a?(Mail::Field)
60
- email_message.header.fields[3].value
55
+ RSpec::Matchers.define("have_sanitized_to_header") do |matcher|
56
+ def get_sanitized_to_header(email_message)
57
+ sanitized_to_header = email_message.header["X-Sanitize-Email-To"]
58
+ return sanitized_to_header.value if sanitized_to_header.is_a?(Mail::Field)
59
+
60
+ "no header found at 'X-Sanitize-Email-To'"
61
+ end
62
+ match do |actual|
63
+ @actual = get_sanitized_to_header(actual)
64
+ expect(@actual).to(match(matcher))
65
+ end
66
+ end
67
+
68
+ RSpec::Matchers.define("have_cc_username") do |matcher|
69
+ def get_cc_usernames(email_message)
70
+ to_addrs = email_message[:cc].addrs
71
+ to_addrs.map(&:name)
72
+ end
73
+ match do |actual|
74
+ @actual = get_cc_usernames(actual)
75
+ expect(@actual).to(include(match(matcher)))
76
+ end
77
+ end
78
+
79
+ RSpec::Matchers.define("have_sanitized_cc_header") do |matcher|
80
+ def get_sanitized_cc_header(email_message)
81
+ sanitized_cc_header = email_message.header["X-Sanitize-Email-Cc"]
82
+ return sanitized_cc_header.value if sanitized_cc_header.is_a?(Mail::Field)
83
+
84
+ "no header found at 'X-Sanitize-Email-Cc'"
85
+ end
86
+ match do |actual|
87
+ @actual = get_sanitized_cc_header(actual)
88
+ expect(@actual).to(match(matcher))
89
+ end
90
+ end
91
+
92
+ RSpec::Matchers.define("have_bcc_username") do |matcher|
93
+ def get_bcc_usernames(email_message)
94
+ to_addrs = email_message[:bcc].addrs
95
+ to_addrs.map(&:name)
61
96
  end
62
97
  match do |actual|
63
- @actual = get_cc_username(actual)
64
- expect(@actual).to match(matcher)
98
+ @actual = get_bcc_usernames(actual)
99
+ expect(@actual).to(include(match(matcher)))
65
100
  end
66
101
  end
67
102
 
68
103
  # Cribbed from email_spec gem
69
- RSpec::Matchers.define 'have_body_text' do |matcher|
104
+ RSpec::Matchers.define("have_body_text") do |matcher|
70
105
  def get_fuzzy_body(email_message)
71
- email_message.default_part_body.to_s.gsub(/\s+/, ' ')
106
+ email_message.default_part_body.to_s.gsub(/\s+/, " ")
72
107
  end
73
108
 
74
109
  def get_fuzzy_matcher(to_fuzz)
75
- to_fuzz.gsub(/\s+/, ' ')
110
+ to_fuzz.gsub(/\s+/, " ")
76
111
  end
77
112
  match do |actual|
78
113
  @actual = get_fuzzy_body(actual)
79
114
  fuzzy_matcher = get_fuzzy_matcher(matcher)
80
- expect(@actual).to match(fuzzy_matcher)
115
+ expect(@actual).to(match(fuzzy_matcher))
81
116
  end
82
117
  end
83
118
 
84
119
  # Cribbed from email_spec gem
85
- RSpec::Matchers.define 'have_header' do |name, matcher|
120
+ RSpec::Matchers.define("have_header") do |name, matcher|
86
121
  match do |actual|
87
122
  @actual = actual.header[name]
88
123
  @actual = @actual.value unless @actual.nil?
89
- expect(@actual).to match(matcher)
124
+ expect(@actual).to(match(matcher))
90
125
  end
91
126
  end
92
127
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2008-16 Peter H. Boling of RailsBling.com
3
+ # Copyright (c) 2008 - 2018, 2020, 2022, 2024 Peter H. Boling of RailsBling.com
4
4
  # Released under the MIT license
5
5
  # Note: the RspecMatchers no longer use these methods. Instead they are composed matchers:
6
6
  # See: http://www.relishapp.com/rspec/rspec-expectations/v/3-5/docs/composing-matchers
@@ -19,15 +19,15 @@ module SanitizeEmail
19
19
  # Can we match a regex against it?
20
20
  raise UnexpectedMailType, "Cannot match #{matcher} for #{part}" unless attribute.respond_to?(:=~)
21
21
  attribute =~ if matcher.is_a?(Regexp)
22
- matcher
23
- else
24
- Regexp.new(Regexp.escape(matcher))
25
- end
22
+ matcher
23
+ else
24
+ Regexp.new(Regexp.escape(matcher))
25
+ end
26
26
  end
27
27
 
28
28
  # Normalize arrays to strings
29
29
  def array_matching(matcher, part, attribute)
30
- attribute = attribute.join(', ') if attribute.respond_to?(:join)
30
+ attribute = attribute.join(", ") if attribute.respond_to?(:join)
31
31
  string_matching(matcher, part, attribute)
32
32
  end
33
33
 
@@ -1,8 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2008-16 Peter H. Boling of RailsBling.com
3
+ # Copyright (c) 2008 - 2018, 2020, 2022, 2024 Peter H. Boling of RailsBling.com
4
4
  # Released under the MIT license
5
5
 
6
6
  module SanitizeEmail
7
- VERSION = '2.0.3'
7
+ module Version
8
+ VERSION = "2.0.5"
9
+ end
8
10
  end
@@ -1,28 +1,40 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2008-16 Peter H. Boling of RailsBling.com
3
+ # Copyright (c) 2008 - 2018, 2020, 2022, 2024 Peter H. Boling of RailsBling.com
4
4
  # Released under the MIT license
5
5
 
6
- require 'sanitize_email/version'
7
- require 'sanitize_email/deprecation'
8
- require 'sanitize_email/config'
9
- require 'sanitize_email/mail_header_tools'
10
- require 'sanitize_email/overridden_addresses'
11
- require 'sanitize_email/bleach'
6
+ # External Libraries
7
+ require "version_gem"
8
+
9
+ # This Library
10
+ require "sanitize_email/version"
11
+ require "sanitize_email/deprecation"
12
+ require "sanitize_email/config"
13
+ require "sanitize_email/mail_header_tools"
14
+ require "sanitize_email/overridden_addresses"
15
+ require "sanitize_email/bleach"
12
16
 
13
17
  module SanitizeEmail
14
18
  # Error is raised when a block parameter is required and not provided to a method
15
19
  class MissingBlockParameter < StandardError; end
16
20
 
17
21
  # Allow non-rails implementations to use this gem
18
- if defined?(::Rails)
22
+ if defined?(::Rails) && defined?(::Rails::VERSION)
19
23
  if defined?(::Rails::Engine)
20
- require 'sanitize_email/engine'
24
+ if ::Rails::VERSION::MAJOR >= 6
25
+ # Rails 6.0+
26
+ require "sanitize_email/engine_v6"
27
+ else
28
+ # Rails 3.1 to 5.2
29
+ require "sanitize_email/engine_v5"
30
+ end
21
31
  elsif ::Rails::VERSION::MAJOR == 3 && ::Rails::VERSION::MINOR.zero?
22
- require 'sanitize_email/railtie'
32
+ require "sanitize_email/railtie"
23
33
  else
24
- raise 'Please use the 0.X.X versions of sanitize_email for Rails 2.X and below.'
34
+ raise "Please use the 0.X.X versions of sanitize_email for Rails 2.X and below."
25
35
  end
36
+ elsif defined?(ActionMailer)
37
+ ActionMailer::Base.register_interceptor(SanitizeEmail::Bleach)
26
38
  else
27
39
  if defined?(Mailer)
28
40
  mailer = Mailer
@@ -32,12 +44,12 @@ module SanitizeEmail
32
44
  if mailer.respond_to?(:register_interceptor)
33
45
  mailer.register_interceptor(SanitizeEmail::Bleach)
34
46
  else
35
- warn 'SanitizeEmail was unable to detect a compatible Mail class to register an interceptor on.'
47
+ warn "SanitizeEmail was unable to detect a compatible Mail class to register an interceptor on."
36
48
  end
37
49
  end
38
50
 
39
51
  def self.[](key)
40
- return nil unless key.respond_to?(:to_sym)
52
+ return unless key.respond_to?(:to_sym)
41
53
  SanitizeEmail::Config.config[key.to_sym]
42
54
  end
43
55
 
@@ -48,7 +60,7 @@ module SanitizeEmail
48
60
  # NOTE: Deprecated method
49
61
  # We have to actually define because we can't deprecate methods that are hooked up via method_missing
50
62
  def self.sanitized_recipients
51
- SanitizeEmail::Config.config[:sanitized_recipients]
63
+ # NOOP - This method is never actually executed, because the deprecations redirects the call to sanitized_to
52
64
  end
53
65
 
54
66
  # NOTE: Deprecated method
@@ -83,8 +95,8 @@ module SanitizeEmail
83
95
  # end
84
96
  #
85
97
  def self.sanitary(config_options = {})
86
- raise MissingBlockParameter, 'SanitizeEmail.sanitary must be called with a block' unless block_given?
87
- janitor(:forcing => true) do
98
+ raise MissingBlockParameter, "SanitizeEmail.sanitary must be called with a block" unless block_given?
99
+ janitor(forcing: true) do
88
100
  original = SanitizeEmail::Config.config.dup
89
101
  SanitizeEmail::Config.config.merge!(config_options)
90
102
  yield
@@ -105,14 +117,14 @@ module SanitizeEmail
105
117
  # end
106
118
  #
107
119
  def self.unsanitary
108
- raise MissingBlockParameter, 'SanitizeEmail.unsanitary must be called with a block' unless block_given?
109
- janitor(:forcing => false) do
120
+ raise MissingBlockParameter, "SanitizeEmail.unsanitary must be called with a block" unless block_given?
121
+ janitor(forcing: false) do
110
122
  yield
111
123
  end
112
124
  end
113
125
 
114
126
  def self.janitor(options)
115
- raise MissingBlockParameter, 'SanitizeEmail.janitor must be called with a block' unless block_given?
127
+ raise MissingBlockParameter, "SanitizeEmail.janitor must be called with a block" unless block_given?
116
128
  original = SanitizeEmail.force_sanitize
117
129
  SanitizeEmail.force_sanitize = options[:forcing]
118
130
  yield
@@ -126,3 +138,7 @@ module SanitizeEmail
126
138
  deprecated :local_environments, :activation_proc
127
139
  end
128
140
  end
141
+
142
+ SanitizeEmail::Version.class_eval do
143
+ extend VersionGem::Basic
144
+ end
data.tar.gz.sig ADDED
Binary file
metadata CHANGED
@@ -1,101 +1,107 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sanitize_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Boling
8
8
  - John Trupiano
9
9
  - George Anderson
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
- cert_chain: []
13
- date: 2018-09-08 00:00:00.000000000 Z
12
+ cert_chain:
13
+ - |
14
+ -----BEGIN CERTIFICATE-----
15
+ MIIEgDCCAuigAwIBAgIBATANBgkqhkiG9w0BAQsFADBDMRUwEwYDVQQDDAxwZXRl
16
+ ci5ib2xpbmcxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkW
17
+ A2NvbTAeFw0yMzA5MjAxNzMwMjhaFw0yNDA5MTkxNzMwMjhaMEMxFTATBgNVBAMM
18
+ DHBldGVyLmJvbGluZzEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPy
19
+ LGQBGRYDY29tMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEA+a9UvHo3
20
+ 84k96WgU5Kk5HB+cLZs/modjorsTfqY67MJF5nNvAoqcKTUBW4uG+Zpfnm3jaDO5
21
+ GxhJEIZWfndYzycHT2KMVQ1uTP82ba8ZaKrPlPIafkbui3mdds47qsmqHiblKERg
22
+ U532lkwfqHDlJwE7OBZQ59EwWWLynlT/yAUHpOBbqIuHKUxdpmBI+sIjrZcD1e05
23
+ WmjkO6fwIdC5oM757aoPxIgXD587VOViH11Vkm2doskj4T8yONtwVHlcrrhJ9Bzd
24
+ /zdp6vEn7GZQrABvpOlqwWxQ72ZnFhJe/RJZf6CXOPOh69Ai0QKYl2a1sYuCJKS3
25
+ nsBnxXJINEEznjR7rZjNUmYD+CZqfjzgPqedRxTlASe7iA4w7xZOqMDzcuhNwcUQ
26
+ tMEH6BTktxKP3jXZPXRfHCf6s+HRVb6vezAonTBVyydf5Xp5VwWkd6cwm+2BzHl5
27
+ 7kc/3lLxKMcsyEUprAsk8LdHohwZdC267l+RS++AP6Cz6x+nB3oGob19AgMBAAGj
28
+ fzB9MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQCSSas60GqqMjt
29
+ xR7LoY1gucEvtzAhBgNVHREEGjAYgRZwZXRlci5ib2xpbmdAZ21haWwuY29tMCEG
30
+ A1UdEgQaMBiBFnBldGVyLmJvbGluZ0BnbWFpbC5jb20wDQYJKoZIhvcNAQELBQAD
31
+ ggGBAMl9ifcw5p+PdvB7dCPoNKoVdp/2LbC9ztETHuYL2gUMJB6UoS3o9c/piSuR
32
+ V3ZMQaijmNu6ms1bWAtJ66LjmYrVflJtf9yp31Kierr9LpisMSUx2qbMOHGa8d2Z
33
+ vCUWPF8E9Cg0mP3GAyZ6qql8jDh/anUKeksPXqJvNxNPDu2DVYsa/IWdl96whzS4
34
+ Bl7SwB1E7agps40UcshCSKaVDOU0M+XN6SrnJMElnBic+KSAkBkVFbzS0BE4ODZM
35
+ BgE6nYzQ05qhuvbE+oGdACTlemNtDDWCh0uw+7x0q2PocGIDU5zsPn/WNTkCXPmB
36
+ CHGvqDNWq4M7ncTKAaS2XExgyb7uPdq9fKiOW8nmH+zCiGzJXzBWwZlKf7L4Ht9E
37
+ a3f0e5C+zvee9Z5Ng9ciyfav9/fcXgYt5MjoBv27THr5XfBhgOCIHSYW2tqJmWKi
38
+ KuxrfYrN+9HvMdm+nZ6TypmKftHY3Gj+/uu+g8Icm/zrvTWAEE0mcJOkfrIoNPJb
39
+ pF8dMA==
40
+ -----END CERTIFICATE-----
41
+ date: 2024-04-18 00:00:00.000000000 Z
14
42
  dependencies:
15
43
  - !ruby/object:Gem::Dependency
16
- name: actionmailer
17
- requirement: !ruby/object:Gem::Requirement
18
- requirements:
19
- - - ">="
20
- - !ruby/object:Gem::Version
21
- version: '3'
22
- type: :development
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- version: '3'
29
- - !ruby/object:Gem::Dependency
30
- name: appraisal
44
+ name: mail
31
45
  requirement: !ruby/object:Gem::Requirement
32
46
  requirements:
33
47
  - - "~>"
34
48
  - !ruby/object:Gem::Version
35
- version: '1'
36
- type: :development
49
+ version: '2.0'
50
+ type: :runtime
37
51
  prerelease: false
38
52
  version_requirements: !ruby/object:Gem::Requirement
39
53
  requirements:
40
54
  - - "~>"
41
55
  - !ruby/object:Gem::Version
42
- version: '1'
56
+ version: '2.0'
43
57
  - !ruby/object:Gem::Dependency
44
- name: bundler
58
+ name: version_gem
45
59
  requirement: !ruby/object:Gem::Requirement
46
60
  requirements:
47
61
  - - "~>"
48
62
  - !ruby/object:Gem::Version
49
- version: '1'
50
- type: :development
63
+ version: '1.1'
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 1.1.4
67
+ type: :runtime
51
68
  prerelease: false
52
69
  version_requirements: !ruby/object:Gem::Requirement
53
70
  requirements:
54
71
  - - "~>"
55
72
  - !ruby/object:Gem::Version
56
- version: '1'
73
+ version: '1.1'
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 1.1.4
57
77
  - !ruby/object:Gem::Dependency
58
- name: gem-release
78
+ name: actionmailer
59
79
  requirement: !ruby/object:Gem::Requirement
60
80
  requirements:
61
- - - "~>"
81
+ - - ">="
62
82
  - !ruby/object:Gem::Version
63
- version: '2'
83
+ version: '3'
64
84
  type: :development
65
85
  prerelease: false
66
86
  version_requirements: !ruby/object:Gem::Requirement
67
87
  requirements:
68
- - - "~>"
88
+ - - ">="
69
89
  - !ruby/object:Gem::Version
70
- version: '2'
90
+ version: '3'
71
91
  - !ruby/object:Gem::Dependency
72
- name: coveralls
92
+ name: appraisal
73
93
  requirement: !ruby/object:Gem::Requirement
74
94
  requirements:
75
95
  - - "~>"
76
96
  - !ruby/object:Gem::Version
77
- version: '0'
97
+ version: '2'
78
98
  type: :development
79
99
  prerelease: false
80
100
  version_requirements: !ruby/object:Gem::Requirement
81
101
  requirements:
82
102
  - - "~>"
83
103
  - !ruby/object:Gem::Version
84
- version: '0'
85
- - !ruby/object:Gem::Dependency
86
- name: mail
87
- requirement: !ruby/object:Gem::Requirement
88
- requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
91
- version: '0'
92
- type: :development
93
- prerelease: false
94
- version_requirements: !ruby/object:Gem::Requirement
95
- requirements:
96
- - - ">="
97
- - !ruby/object:Gem::Version
98
- version: '0'
104
+ version: '2'
99
105
  - !ruby/object:Gem::Dependency
100
106
  name: rails
101
107
  requirement: !ruby/object:Gem::Requirement
@@ -103,9 +109,9 @@ dependencies:
103
109
  - - ">="
104
110
  - !ruby/object:Gem::Version
105
111
  version: '3.0'
106
- - - "<"
112
+ - - "<="
107
113
  - !ruby/object:Gem::Version
108
- version: '6'
114
+ version: '8'
109
115
  type: :development
110
116
  prerelease: false
111
117
  version_requirements: !ruby/object:Gem::Requirement
@@ -113,9 +119,9 @@ dependencies:
113
119
  - - ">="
114
120
  - !ruby/object:Gem::Version
115
121
  version: '3.0'
116
- - - "<"
122
+ - - "<="
117
123
  - !ruby/object:Gem::Version
118
- version: '6'
124
+ version: '8'
119
125
  - !ruby/object:Gem::Dependency
120
126
  name: rake
121
127
  requirement: !ruby/object:Gem::Requirement
@@ -159,19 +165,45 @@ dependencies:
159
165
  - !ruby/object:Gem::Version
160
166
  version: '3'
161
167
  - !ruby/object:Gem::Dependency
162
- name: wwtd
168
+ name: rspec-block_is_expected
163
169
  requirement: !ruby/object:Gem::Requirement
164
170
  requirements:
165
171
  - - "~>"
166
172
  - !ruby/object:Gem::Version
167
- version: '1'
173
+ version: '1.0'
174
+ - - ">="
175
+ - !ruby/object:Gem::Version
176
+ version: 1.0.5
168
177
  type: :development
169
178
  prerelease: false
170
179
  version_requirements: !ruby/object:Gem::Requirement
171
180
  requirements:
172
181
  - - "~>"
173
182
  - !ruby/object:Gem::Version
174
- version: '1'
183
+ version: '1.0'
184
+ - - ">="
185
+ - !ruby/object:Gem::Version
186
+ version: 1.0.5
187
+ - !ruby/object:Gem::Dependency
188
+ name: rspec-pending_for
189
+ requirement: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - "~>"
192
+ - !ruby/object:Gem::Version
193
+ version: '0.1'
194
+ - - ">="
195
+ - !ruby/object:Gem::Version
196
+ version: 0.1.16
197
+ type: :development
198
+ prerelease: false
199
+ version_requirements: !ruby/object:Gem::Requirement
200
+ requirements:
201
+ - - "~>"
202
+ - !ruby/object:Gem::Version
203
+ version: '0.1'
204
+ - - ">="
205
+ - !ruby/object:Gem::Version
206
+ version: 0.1.16
175
207
  description: |2
176
208
  Email Condom for your Ruby Server.
177
209
  In Rails, Sinatra, et al, or simply the mail gem: Aids in development, testing, qa, and production troubleshooting of email issues without worrying that emails will get sent to actual live addresses.
@@ -179,39 +211,20 @@ email:
179
211
  - peter.boling@gmail.com
180
212
  executables: []
181
213
  extensions: []
182
- extra_rdoc_files:
183
- - CHANGELOG.md
184
- - LICENSE
185
- - README.md
214
+ extra_rdoc_files: []
186
215
  files:
187
- - ".coveralls.yml"
188
- - ".gitignore"
189
- - ".pryrc"
190
- - ".reek"
191
- - ".rspec"
192
- - ".rubocop.yml"
193
- - ".rubocop_rspec.yml"
194
- - ".rubocop_todo.yml"
195
- - ".ruby-gemset"
196
- - ".ruby-version"
197
- - ".travis.yml"
198
- - Appraisals
199
216
  - CHANGELOG.md
200
- - Gemfile
201
- - LICENSE
217
+ - CODE_OF_CONDUCT.md
218
+ - CONTRIBUTING.md
219
+ - LICENSE.txt
202
220
  - README.md
203
- - REEK
204
- - Rakefile
205
- - gemfiles/rails_4_2.gemfile
206
- - gemfiles/rails_5_0.gemfile
207
- - gemfiles/rails_5_1.gemfile
208
- - gemfiles/rails_5_2.gemfile
209
- - init.rb
221
+ - SECURITY.md
210
222
  - lib/sanitize_email.rb
211
223
  - lib/sanitize_email/bleach.rb
212
224
  - lib/sanitize_email/config.rb
213
225
  - lib/sanitize_email/deprecation.rb
214
- - lib/sanitize_email/engine.rb
226
+ - lib/sanitize_email/engine_v5.rb
227
+ - lib/sanitize_email/engine_v6.rb
215
228
  - lib/sanitize_email/mail_ext.rb
216
229
  - lib/sanitize_email/mail_header_tools.rb
217
230
  - lib/sanitize_email/overridden_addresses.rb
@@ -219,14 +232,19 @@ files:
219
232
  - lib/sanitize_email/rspec_matchers.rb
220
233
  - lib/sanitize_email/test_helpers.rb
221
234
  - lib/sanitize_email/version.rb
222
- - sanitize_email.gemspec
223
- - spec/sanitize_email_spec.rb
224
- - spec/spec_helper.rb
225
- homepage: http://github.com/pboling/sanitize_email
235
+ homepage: https://github.com/pboling/sanitize_email
226
236
  licenses:
227
237
  - MIT
228
- metadata: {}
229
- post_install_message:
238
+ metadata:
239
+ homepage_uri: https://github.com/pboling/sanitize_email
240
+ source_code_uri: https://github.com/pboling/sanitize_email/tree/v2.0.5
241
+ changelog_uri: https://github.com/pboling/sanitize_email/blob/v2.0.5/CHANGELOG.md
242
+ bug_tracker_uri: https://github.com/pboling/sanitize_email/issues
243
+ documentation_uri: https://www.rubydoc.info/gems/sanitize_email/2.0.5
244
+ wiki_uri: https://github.com/pboling/sanitize_email/wiki
245
+ funding_uri: https://liberapay.com/pboling
246
+ rubygems_mfa_required: 'true'
247
+ post_install_message:
230
248
  rdoc_options: []
231
249
  require_paths:
232
250
  - lib
@@ -241,11 +259,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
241
259
  - !ruby/object:Gem::Version
242
260
  version: '0'
243
261
  requirements: []
244
- rubyforge_project:
245
- rubygems_version: 2.7.7
246
- signing_key:
262
+ rubygems_version: 3.5.9
263
+ signing_key:
247
264
  specification_version: 4
248
265
  summary: Email Condom for your Ruby Server
249
- test_files:
250
- - spec/sanitize_email_spec.rb
251
- - spec/spec_helper.rb
266
+ test_files: []
metadata.gz.sig ADDED
Binary file
data/.coveralls.yml DELETED
@@ -1 +0,0 @@
1
- service_name: travis-ci
data/.gitignore DELETED
@@ -1,12 +0,0 @@
1
- *.sw?
2
- .DS_Store
3
- coverage
4
- pkg
5
- .idea
6
- spec/tmp
7
- *.gem
8
- .rvmrc
9
- Gemfile.lock
10
- gemfiles/*.lock
11
- rdoc/*
12
- .byebug_history
data/.pryrc DELETED
@@ -1,11 +0,0 @@
1
- if defined?(PryByebug)
2
- Pry.commands.alias_command 'c', 'continue'
3
- Pry.commands.alias_command 's', 'step'
4
- Pry.commands.alias_command 'n', 'next'
5
- Pry.commands.alias_command 'trace', 'backtrace'
6
- end
7
-
8
- # Hit Enter to repeat last command
9
- Pry::Commands.command /^$/, "repeat last command" do
10
- _pry_.run_command Pry.history.to_a.last
11
- end
data/.reek DELETED
@@ -1,9 +0,0 @@
1
- # attr_accessor is, in many cases, better than @instance variables which fail silently on typos, IMO
2
- Attribute:
3
- enabled: false
4
- # One line methods are awesome, but need to focus on bigger problems first. Will lower this number as the code improves.
5
- TooManyStatements:
6
- max_statements: 8
7
- FeatureEnvy:
8
- exclude:
9
- - delivering_email
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --format progress