sanitize_email 2.0.2 → 2.0.4
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 +4 -4
- checksums.yaml.gz.sig +3 -0
- data/CHANGELOG.md +82 -12
- data/CODE_OF_CONDUCT.md +84 -0
- data/CONTRIBUTING.md +47 -0
- data/{LICENSE → LICENSE.txt} +1 -1
- data/README.md +371 -58
- data/SECURITY.md +15 -0
- data/lib/sanitize_email/bleach.rb +13 -8
- data/lib/sanitize_email/config.rb +20 -20
- data/lib/sanitize_email/deprecation.rb +6 -6
- data/lib/sanitize_email/engine.rb +1 -1
- data/lib/sanitize_email/mail_ext.rb +2 -0
- data/lib/sanitize_email/mail_header_tools.rb +19 -15
- data/lib/sanitize_email/overridden_addresses.rb +77 -19
- data/lib/sanitize_email/railtie.rb +1 -1
- data/lib/sanitize_email/rspec_matchers.rb +55 -31
- data/lib/sanitize_email/test_helpers.rb +6 -6
- data/lib/sanitize_email/version.rb +4 -2
- data/lib/sanitize_email.rb +28 -18
- data.tar.gz.sig +0 -0
- metadata +70 -90
- metadata.gz.sig +0 -0
- data/.coveralls.yml +0 -1
- data/.gitignore +0 -12
- data/.pryrc +0 -11
- data/.reek +0 -9
- data/.rspec +0 -2
- data/.rubocop.yml +0 -73
- data/.rubocop_rspec.yml +0 -35
- data/.rubocop_todo.yml +0 -21
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
- data/.travis.yml +0 -71
- data/Appraisals +0 -29
- data/Gemfile +0 -22
- data/REEK +0 -2
- data/Rakefile +0 -52
- data/gemfiles/rails_4_2.gemfile +0 -17
- data/gemfiles/rails_5_0.gemfile +0 -17
- data/gemfiles/rails_5_1.gemfile +0 -17
- data/gemfiles/rails_5_2.gemfile +0 -17
- data/init.rb +0 -3
- data/sanitize_email.gemspec +0 -49
- data/spec/sanitize_email_spec.rb +0 -944
- data/spec/spec_helper.rb +0 -28
data/lib/sanitize_email.rb
CHANGED
@@ -1,28 +1,34 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2008-
|
3
|
+
# Copyright (c) 2008 - 2018, 2020, 2022, 2024 Peter H. Boling of RailsBling.com
|
4
4
|
# Released under the MIT license
|
5
5
|
|
6
|
-
|
7
|
-
require
|
8
|
-
|
9
|
-
|
10
|
-
require
|
11
|
-
require
|
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
|
24
|
+
require "sanitize_email/engine"
|
21
25
|
elsif ::Rails::VERSION::MAJOR == 3 && ::Rails::VERSION::MINOR.zero?
|
22
|
-
require
|
26
|
+
require "sanitize_email/railtie"
|
23
27
|
else
|
24
|
-
raise
|
28
|
+
raise "Please use the 0.X.X versions of sanitize_email for Rails 2.X and below."
|
25
29
|
end
|
30
|
+
elsif defined?(ActionMailer)
|
31
|
+
ActionMailer::Base.register_interceptor(SanitizeEmail::Bleach)
|
26
32
|
else
|
27
33
|
if defined?(Mailer)
|
28
34
|
mailer = Mailer
|
@@ -32,12 +38,12 @@ module SanitizeEmail
|
|
32
38
|
if mailer.respond_to?(:register_interceptor)
|
33
39
|
mailer.register_interceptor(SanitizeEmail::Bleach)
|
34
40
|
else
|
35
|
-
warn
|
41
|
+
warn "SanitizeEmail was unable to detect a compatible Mail class to register an interceptor on."
|
36
42
|
end
|
37
43
|
end
|
38
44
|
|
39
45
|
def self.[](key)
|
40
|
-
return
|
46
|
+
return unless key.respond_to?(:to_sym)
|
41
47
|
SanitizeEmail::Config.config[key.to_sym]
|
42
48
|
end
|
43
49
|
|
@@ -83,8 +89,8 @@ module SanitizeEmail
|
|
83
89
|
# end
|
84
90
|
#
|
85
91
|
def self.sanitary(config_options = {})
|
86
|
-
raise MissingBlockParameter,
|
87
|
-
janitor(:
|
92
|
+
raise MissingBlockParameter, "SanitizeEmail.sanitary must be called with a block" unless block_given?
|
93
|
+
janitor(forcing: true) do
|
88
94
|
original = SanitizeEmail::Config.config.dup
|
89
95
|
SanitizeEmail::Config.config.merge!(config_options)
|
90
96
|
yield
|
@@ -105,14 +111,14 @@ module SanitizeEmail
|
|
105
111
|
# end
|
106
112
|
#
|
107
113
|
def self.unsanitary
|
108
|
-
raise MissingBlockParameter,
|
109
|
-
janitor(:
|
114
|
+
raise MissingBlockParameter, "SanitizeEmail.unsanitary must be called with a block" unless block_given?
|
115
|
+
janitor(forcing: false) do
|
110
116
|
yield
|
111
117
|
end
|
112
118
|
end
|
113
119
|
|
114
120
|
def self.janitor(options)
|
115
|
-
raise MissingBlockParameter,
|
121
|
+
raise MissingBlockParameter, "SanitizeEmail.janitor must be called with a block" unless block_given?
|
116
122
|
original = SanitizeEmail.force_sanitize
|
117
123
|
SanitizeEmail.force_sanitize = options[:forcing]
|
118
124
|
yield
|
@@ -126,3 +132,7 @@ module SanitizeEmail
|
|
126
132
|
deprecated :local_environments, :activation_proc
|
127
133
|
end
|
128
134
|
end
|
135
|
+
|
136
|
+
SanitizeEmail::Version.class_eval do
|
137
|
+
extend VersionGem::Basic
|
138
|
+
end
|
data.tar.gz.sig
ADDED
Binary file
|
metadata
CHANGED
@@ -1,61 +1,89 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sanitize_email
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
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
|
-
|
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-03-23 00:00:00.000000000 Z
|
14
42
|
dependencies:
|
15
43
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
44
|
+
name: mail
|
17
45
|
requirement: !ruby/object:Gem::Requirement
|
18
46
|
requirements:
|
19
47
|
- - ">="
|
20
48
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
22
|
-
type: :
|
49
|
+
version: '0'
|
50
|
+
type: :runtime
|
23
51
|
prerelease: false
|
24
52
|
version_requirements: !ruby/object:Gem::Requirement
|
25
53
|
requirements:
|
26
54
|
- - ">="
|
27
55
|
- !ruby/object:Gem::Version
|
28
|
-
version: '
|
56
|
+
version: '0'
|
29
57
|
- !ruby/object:Gem::Dependency
|
30
|
-
name:
|
58
|
+
name: version_gem
|
31
59
|
requirement: !ruby/object:Gem::Requirement
|
32
60
|
requirements:
|
33
|
-
- - "
|
61
|
+
- - ">="
|
34
62
|
- !ruby/object:Gem::Version
|
35
|
-
version:
|
36
|
-
type: :
|
63
|
+
version: 1.1.4
|
64
|
+
type: :runtime
|
37
65
|
prerelease: false
|
38
66
|
version_requirements: !ruby/object:Gem::Requirement
|
39
67
|
requirements:
|
40
|
-
- - "
|
68
|
+
- - ">="
|
41
69
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
70
|
+
version: 1.1.4
|
43
71
|
- !ruby/object:Gem::Dependency
|
44
|
-
name:
|
72
|
+
name: actionmailer
|
45
73
|
requirement: !ruby/object:Gem::Requirement
|
46
74
|
requirements:
|
47
|
-
- - "
|
75
|
+
- - ">="
|
48
76
|
- !ruby/object:Gem::Version
|
49
|
-
version: '
|
77
|
+
version: '3'
|
50
78
|
type: :development
|
51
79
|
prerelease: false
|
52
80
|
version_requirements: !ruby/object:Gem::Requirement
|
53
81
|
requirements:
|
54
|
-
- - "
|
82
|
+
- - ">="
|
55
83
|
- !ruby/object:Gem::Version
|
56
|
-
version: '
|
84
|
+
version: '3'
|
57
85
|
- !ruby/object:Gem::Dependency
|
58
|
-
name:
|
86
|
+
name: appraisal
|
59
87
|
requirement: !ruby/object:Gem::Requirement
|
60
88
|
requirements:
|
61
89
|
- - "~>"
|
@@ -68,34 +96,6 @@ dependencies:
|
|
68
96
|
- - "~>"
|
69
97
|
- !ruby/object:Gem::Version
|
70
98
|
version: '2'
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
name: coveralls
|
73
|
-
requirement: !ruby/object:Gem::Requirement
|
74
|
-
requirements:
|
75
|
-
- - "~>"
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '0'
|
78
|
-
type: :development
|
79
|
-
prerelease: false
|
80
|
-
version_requirements: !ruby/object:Gem::Requirement
|
81
|
-
requirements:
|
82
|
-
- - "~>"
|
83
|
-
- !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'
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: rails
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
@@ -103,9 +103,9 @@ dependencies:
|
|
103
103
|
- - ">="
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: '3.0'
|
106
|
-
- - "
|
106
|
+
- - "<="
|
107
107
|
- !ruby/object:Gem::Version
|
108
|
-
version: '
|
108
|
+
version: '8'
|
109
109
|
type: :development
|
110
110
|
prerelease: false
|
111
111
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -113,9 +113,9 @@ dependencies:
|
|
113
113
|
- - ">="
|
114
114
|
- !ruby/object:Gem::Version
|
115
115
|
version: '3.0'
|
116
|
-
- - "
|
116
|
+
- - "<="
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: '
|
118
|
+
version: '8'
|
119
119
|
- !ruby/object:Gem::Dependency
|
120
120
|
name: rake
|
121
121
|
requirement: !ruby/object:Gem::Requirement
|
@@ -159,19 +159,25 @@ dependencies:
|
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: '3'
|
161
161
|
- !ruby/object:Gem::Dependency
|
162
|
-
name:
|
162
|
+
name: rspec-block_is_expected
|
163
163
|
requirement: !ruby/object:Gem::Requirement
|
164
164
|
requirements:
|
165
165
|
- - "~>"
|
166
166
|
- !ruby/object:Gem::Version
|
167
|
-
version: '1'
|
167
|
+
version: '1.0'
|
168
|
+
- - ">="
|
169
|
+
- !ruby/object:Gem::Version
|
170
|
+
version: 1.0.5
|
168
171
|
type: :development
|
169
172
|
prerelease: false
|
170
173
|
version_requirements: !ruby/object:Gem::Requirement
|
171
174
|
requirements:
|
172
175
|
- - "~>"
|
173
176
|
- !ruby/object:Gem::Version
|
174
|
-
version: '1'
|
177
|
+
version: '1.0'
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: 1.0.5
|
175
181
|
description: |2
|
176
182
|
Email Condom for your Ruby Server.
|
177
183
|
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,34 +185,14 @@ email:
|
|
179
185
|
- peter.boling@gmail.com
|
180
186
|
executables: []
|
181
187
|
extensions: []
|
182
|
-
extra_rdoc_files:
|
183
|
-
- CHANGELOG.md
|
184
|
-
- LICENSE
|
185
|
-
- README.md
|
188
|
+
extra_rdoc_files: []
|
186
189
|
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
190
|
- CHANGELOG.md
|
200
|
-
-
|
201
|
-
-
|
191
|
+
- CODE_OF_CONDUCT.md
|
192
|
+
- CONTRIBUTING.md
|
193
|
+
- LICENSE.txt
|
202
194
|
- README.md
|
203
|
-
-
|
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
|
195
|
+
- SECURITY.md
|
210
196
|
- lib/sanitize_email.rb
|
211
197
|
- lib/sanitize_email/bleach.rb
|
212
198
|
- lib/sanitize_email/config.rb
|
@@ -219,14 +205,11 @@ files:
|
|
219
205
|
- lib/sanitize_email/rspec_matchers.rb
|
220
206
|
- lib/sanitize_email/test_helpers.rb
|
221
207
|
- lib/sanitize_email/version.rb
|
222
|
-
- sanitize_email.gemspec
|
223
|
-
- spec/sanitize_email_spec.rb
|
224
|
-
- spec/spec_helper.rb
|
225
208
|
homepage: http://github.com/pboling/sanitize_email
|
226
209
|
licenses:
|
227
210
|
- MIT
|
228
211
|
metadata: {}
|
229
|
-
post_install_message:
|
212
|
+
post_install_message:
|
230
213
|
rdoc_options: []
|
231
214
|
require_paths:
|
232
215
|
- lib
|
@@ -241,11 +224,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
241
224
|
- !ruby/object:Gem::Version
|
242
225
|
version: '0'
|
243
226
|
requirements: []
|
244
|
-
|
245
|
-
|
246
|
-
signing_key:
|
227
|
+
rubygems_version: 3.5.6
|
228
|
+
signing_key:
|
247
229
|
specification_version: 4
|
248
230
|
summary: Email Condom for your Ruby Server
|
249
|
-
test_files:
|
250
|
-
- spec/sanitize_email_spec.rb
|
251
|
-
- spec/spec_helper.rb
|
231
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|
data/.coveralls.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
service_name: travis-ci
|
data/.gitignore
DELETED
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
data/.rubocop.yml
DELETED
@@ -1,73 +0,0 @@
|
|
1
|
-
require: rubocop-rspec
|
2
|
-
inherit_from:
|
3
|
-
- .rubocop_todo.yml
|
4
|
-
- .rubocop_rspec.yml
|
5
|
-
AllCops:
|
6
|
-
DisplayCopNames: true # Display the name of the failing cops
|
7
|
-
TargetRubyVersion: 2.3
|
8
|
-
Exclude:
|
9
|
-
- 'gemfiles/vendor/**/*'
|
10
|
-
- 'vendor/**/*'
|
11
|
-
- '**/.irbrc'
|
12
|
-
|
13
|
-
Gemspec/RequiredRubyVersion:
|
14
|
-
Enabled: false
|
15
|
-
|
16
|
-
Metrics/BlockLength:
|
17
|
-
Enabled: false
|
18
|
-
|
19
|
-
Metrics/BlockNesting:
|
20
|
-
Max: 2
|
21
|
-
|
22
|
-
Metrics/LineLength:
|
23
|
-
Enabled: false
|
24
|
-
|
25
|
-
Metrics/MethodLength:
|
26
|
-
Max: 15
|
27
|
-
|
28
|
-
Metrics/ParameterLists:
|
29
|
-
Max: 4
|
30
|
-
|
31
|
-
Layout/AccessModifierIndentation:
|
32
|
-
EnforcedStyle: outdent
|
33
|
-
|
34
|
-
Layout/DotPosition:
|
35
|
-
EnforcedStyle: trailing
|
36
|
-
|
37
|
-
Layout/SpaceInsideHashLiteralBraces:
|
38
|
-
EnforcedStyle: no_space
|
39
|
-
|
40
|
-
Lint/UnusedBlockArgument:
|
41
|
-
Exclude:
|
42
|
-
- 'spec/**/*.rb'
|
43
|
-
- 'gemfiles/vendor/**/*'
|
44
|
-
- 'vendor/**/*'
|
45
|
-
- '**/.irbrc'
|
46
|
-
|
47
|
-
Style/ClassVars:
|
48
|
-
Enabled: false
|
49
|
-
|
50
|
-
Style/CollectionMethods:
|
51
|
-
PreferredMethods:
|
52
|
-
map: 'collect'
|
53
|
-
reduce: 'inject'
|
54
|
-
find: 'detect'
|
55
|
-
find_all: 'select'
|
56
|
-
|
57
|
-
Style/Documentation:
|
58
|
-
Enabled: false
|
59
|
-
|
60
|
-
Style/DoubleNegation:
|
61
|
-
Enabled: false
|
62
|
-
|
63
|
-
Style/EmptyMethod:
|
64
|
-
EnforcedStyle: expanded
|
65
|
-
|
66
|
-
Style/Encoding:
|
67
|
-
Enabled: false
|
68
|
-
|
69
|
-
Style/TrailingCommaInArrayLiteral:
|
70
|
-
EnforcedStyleForMultiline: comma
|
71
|
-
|
72
|
-
Style/TrailingCommaInHashLiteral:
|
73
|
-
EnforcedStyleForMultiline: comma
|
data/.rubocop_rspec.yml
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
RSpec/FilePath:
|
2
|
-
Enabled: false
|
3
|
-
|
4
|
-
RSpec/MultipleExpectations:
|
5
|
-
Enabled: false
|
6
|
-
|
7
|
-
RSpec/NamedSubject:
|
8
|
-
Enabled: false
|
9
|
-
|
10
|
-
RSpec/ExampleLength:
|
11
|
-
Enabled: false
|
12
|
-
|
13
|
-
RSpec/VerifiedDoubles:
|
14
|
-
Enabled: false
|
15
|
-
|
16
|
-
RSpec/MessageSpies:
|
17
|
-
Enabled: false
|
18
|
-
|
19
|
-
RSpec/InstanceVariable:
|
20
|
-
Enabled: false
|
21
|
-
|
22
|
-
RSpec/NestedGroups:
|
23
|
-
Enabled: false
|
24
|
-
|
25
|
-
RSpec/ContextWording:
|
26
|
-
Enabled: false
|
27
|
-
|
28
|
-
RSpec/RepeatedExample:
|
29
|
-
Enabled: false
|
30
|
-
|
31
|
-
Metrics/AbcSize:
|
32
|
-
Enabled: false
|
33
|
-
|
34
|
-
Style/ClassAndModuleChildren:
|
35
|
-
Enabled: false
|
data/.rubocop_todo.yml
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
Style/HashSyntax:
|
2
|
-
EnforcedStyle: hash_rockets
|
3
|
-
|
4
|
-
Style/Lambda:
|
5
|
-
Enabled: false
|
6
|
-
|
7
|
-
Style/SymbolArray:
|
8
|
-
Enabled: false
|
9
|
-
|
10
|
-
Style/EachWithObject:
|
11
|
-
Enabled: false
|
12
|
-
|
13
|
-
# Once we drop Rubies that lack support for __dir__ we can turn this on.
|
14
|
-
Style/ExpandPathArguments:
|
15
|
-
Enabled: false
|
16
|
-
|
17
|
-
Style/CommentedKeyword:
|
18
|
-
Enabled: false
|
19
|
-
|
20
|
-
Style/MethodMissing:
|
21
|
-
Enabled: false
|
data/.ruby-gemset
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
foss
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ruby-2.5.1
|
data/.travis.yml
DELETED
@@ -1,71 +0,0 @@
|
|
1
|
-
env:
|
2
|
-
global:
|
3
|
-
- JRUBY_OPTS="-Xcli.debug=true --debug"
|
4
|
-
- CC_TEST_REPORTER_ID=3fe32ef74eebc6c91dbca2e96535898b5535cea7206dbeba157bda69ec3502e3
|
5
|
-
|
6
|
-
before_script:
|
7
|
-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
8
|
-
- chmod +x ./cc-test-reporter
|
9
|
-
- ./cc-test-reporter before-build
|
10
|
-
|
11
|
-
script:
|
12
|
-
- bundle exec rspec
|
13
|
-
|
14
|
-
after_script:
|
15
|
-
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
16
|
-
|
17
|
-
before_install:
|
18
|
-
- gem update --system
|
19
|
-
- gem install bundler
|
20
|
-
|
21
|
-
install:
|
22
|
-
- bundle install
|
23
|
-
|
24
|
-
bundler_args: --no-deployment --jobs 3 --retry 3
|
25
|
-
|
26
|
-
cache: bundler
|
27
|
-
|
28
|
-
language: ruby
|
29
|
-
sudo: false
|
30
|
-
|
31
|
-
rvm:
|
32
|
-
# latest versions on travis-ci as of 2018.09.04
|
33
|
-
- jruby-9.1.9.0
|
34
|
-
- ruby-2.3.7
|
35
|
-
- ruby-2.4.4
|
36
|
-
- ruby-2.5.1
|
37
|
-
- jruby-head
|
38
|
-
- ruby-head
|
39
|
-
|
40
|
-
gemfile:
|
41
|
-
- gemfiles/rails_4_2.gemfile
|
42
|
-
- gemfiles/rails_5_0.gemfile
|
43
|
-
- gemfiles/rails_5_1.gemfile
|
44
|
-
- gemfiles/rails_5_2.gemfile
|
45
|
-
|
46
|
-
matrix:
|
47
|
-
allow_failures:
|
48
|
-
- rvm: jruby-head
|
49
|
-
- rvm: ruby-head
|
50
|
-
fast_finish: true
|
51
|
-
exclude:
|
52
|
-
# ruby-2.3.7 tests on all versions
|
53
|
-
# ruby-2.4.4 tests on all versions
|
54
|
-
# ruby-2.5.1 tests on all versions
|
55
|
-
# jruby-9.1.9.0 only tests on rails 5.1+
|
56
|
-
- rvm: jruby-9.1.9.0
|
57
|
-
gemfile: gemfiles/rails_5_0.gemfile
|
58
|
-
# jruby-head only tests on rails 5.2+
|
59
|
-
- rvm: jruby-head
|
60
|
-
gemfile: gemfiles/rails_4_2.gemfile
|
61
|
-
- rvm: jruby-head
|
62
|
-
gemfile: gemfiles/rails_5_0.gemfile
|
63
|
-
- rvm: jruby-head
|
64
|
-
gemfile: gemfiles/rails_5_1.gemfile
|
65
|
-
# ruby-head only tests on rails 5.2+
|
66
|
-
- rvm: ruby-head
|
67
|
-
gemfile: gemfiles/rails_4_2.gemfile
|
68
|
-
- rvm: ruby-head
|
69
|
-
gemfile: gemfiles/rails_5_0.gemfile
|
70
|
-
- rvm: ruby-head
|
71
|
-
gemfile: gemfiles/rails_5_1.gemfile
|
data/Appraisals
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
appraise 'rails-4-2' do
|
4
|
-
gem 'actionmailer', '~> 4.2.0'
|
5
|
-
gem 'railties', '~> 4.2.0'
|
6
|
-
gem 'json', '~> 2.0'
|
7
|
-
gem 'rake', '~> 11.0'
|
8
|
-
end
|
9
|
-
|
10
|
-
appraise 'rails-5-0' do
|
11
|
-
gem 'actionmailer', '~> 5.0.0'
|
12
|
-
gem 'railties', '~> 5.0.0'
|
13
|
-
gem 'json', '~> 2.0'
|
14
|
-
gem 'rake', '~> 12.0'
|
15
|
-
end
|
16
|
-
|
17
|
-
appraise 'rails-5-1' do
|
18
|
-
gem 'actionmailer', '~> 5.1.0'
|
19
|
-
gem 'railties', '~> 5.1.0'
|
20
|
-
gem 'json', '~> 2.0'
|
21
|
-
gem 'rake', '~> 12.0'
|
22
|
-
end
|
23
|
-
|
24
|
-
appraise 'rails-5-2' do
|
25
|
-
gem 'actionmailer', '~> 5.2.0'
|
26
|
-
gem 'railties', '~> 5.2.0'
|
27
|
-
gem 'json', '~> 2.0'
|
28
|
-
gem 'rake', '~> 12.0'
|
29
|
-
end
|
data/Gemfile
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source 'https://rubygems.org'
|
4
|
-
|
5
|
-
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
6
|
-
|
7
|
-
group :test do
|
8
|
-
# Travis-CI does not support C-extensions on JRuby
|
9
|
-
ruby_version = Gem::Version.new(RUBY_VERSION)
|
10
|
-
if ruby_version >= Gem::Version.new('2.1')
|
11
|
-
gem 'rubocop', '~> 0.58.2', platforms: :mri
|
12
|
-
gem 'rubocop-rspec', '~> 1.29.1', platforms: :mri
|
13
|
-
end
|
14
|
-
if ruby_version >= Gem::Version.new('2.0')
|
15
|
-
gem 'byebug', platforms: :mri
|
16
|
-
gem 'pry', platforms: :mri
|
17
|
-
gem 'pry-byebug', platforms: :mri
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
# Specify your gem's dependencies in sanitize_email.gemspec
|
22
|
-
gemspec
|