sanitize_email 1.2.1 → 1.2.2
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
- data/.ruby-version +1 -1
- data/.travis.yml +13 -3
- data/CHANGELOG.md +14 -0
- data/lib/sanitize_email/mail_header_tools.rb +6 -3
- data/lib/sanitize_email/version.rb +1 -1
- data/spec/sanitize_email_spec.rb +25 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ad6096e8d943e52cbd727fe7d196d7be384d180
|
4
|
+
data.tar.gz: ce38ce644ed4e2eba4ceff0ad8cdfdc4ac3c7aa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42032fa9bfa53dfc99739daf9671eb967688deae6f719d51dd005e0f5e5b273efc74607859b33f8ebf40cc61f9bd063a017e06a80d00489a6a11082555902d20
|
7
|
+
data.tar.gz: 11bd4dbcc7f931849ec121fe1cb799696102c997ed9288ad1f22d0cfdafd0de278f1d85f205413fcc67188839fa35ba99724e5a436c013681e2ed8e3cf295042
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.3.
|
1
|
+
ruby-2.3.3
|
data/.travis.yml
CHANGED
@@ -6,7 +6,8 @@ rvm:
|
|
6
6
|
- 2.0
|
7
7
|
- 2.1
|
8
8
|
- 2.2
|
9
|
-
- 2.3.
|
9
|
+
- 2.3.3
|
10
|
+
- 2.4.0
|
10
11
|
# - ruby-head
|
11
12
|
gemfile:
|
12
13
|
- gemfiles/rails_3_0.gemfile
|
@@ -53,10 +54,16 @@ matrix:
|
|
53
54
|
gemfile: gemfiles/rails_3_1.gemfile
|
54
55
|
- rvm: 2.2
|
55
56
|
gemfile: gemfiles/rails_5_0.gemfile
|
56
|
-
- rvm: 2.3.
|
57
|
+
- rvm: 2.3.3
|
57
58
|
gemfile: gemfiles/rails_3_0.gemfile
|
58
|
-
- rvm: 2.3.
|
59
|
+
- rvm: 2.3.3
|
59
60
|
gemfile: gemfiles/rails_3_1.gemfile
|
61
|
+
- rvm: 2.4.0
|
62
|
+
gemfile: gemfiles/rails_3_0.gemfile
|
63
|
+
- rvm: 2.4.0
|
64
|
+
gemfile: gemfiles/rails_3_1.gemfile
|
65
|
+
- rvm: 2.4.0
|
66
|
+
gemfile: gemfiles/rails_3_2.gemfile
|
60
67
|
# - rvm: ruby-head
|
61
68
|
# gemfile: gemfiles/rails_5_0.gemfile
|
62
69
|
# include:
|
@@ -64,5 +71,8 @@ matrix:
|
|
64
71
|
# gemfile: gemfiles/rails_3_0.gemfile
|
65
72
|
# - rvm: 1.9
|
66
73
|
# gemfile: gemfiles/rails_3_1.gemfile
|
74
|
+
before_install:
|
75
|
+
- gem update --system
|
76
|
+
- gem install bundler
|
67
77
|
install:
|
68
78
|
- bundle install
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
HEAD
|
2
2
|
|
3
|
+
Version 1.2.2 - FEB.17.2017
|
4
|
+
* Improve handling of frozen strings, which are becoming more common by @milgner
|
5
|
+
|
6
|
+
Version 1.2.1 - NOV.03.2016
|
7
|
+
* Fix bug where non-array to address would not get prepended to subject when that feature is turned on
|
8
|
+
* SanitizeEmail::TestHelpers::UnexpectedMailType no longer raised by SanitizeEmail::RspecMatchers (a breaking change if you were depending on that for your specs to pass)
|
9
|
+
* SanitizeEmail::RspecMatchers are now fully composed Rspec Matchers with much improved spec failure output
|
10
|
+
* Many linting improvements
|
11
|
+
* Added Rails 5.0 to test matrix
|
12
|
+
- but is only tested on travis against 2.0, 2.1, 2.2, and 2.3
|
13
|
+
- Rails versions tested are now 3.2, 4.0, 4.1, 4.2, 5.0
|
14
|
+
- Runtime code might still be compatible with ruby 1.8.7, should be compatible with 1.9.3
|
15
|
+
- Specs suite should still run 1.9.3 if you want to run them manually
|
16
|
+
|
3
17
|
Version 1.2.0 - JUL.24.2016
|
4
18
|
* No longer registers instance of SanitizeEmail::Bleach to avoid the dev env reloading problem (fixes #12)
|
5
19
|
* Instead registers SanitizeEmail::Bleach class.
|
@@ -55,9 +55,12 @@ module SanitizeEmail
|
|
55
55
|
|
56
56
|
def self.prepend_custom_subject(message)
|
57
57
|
message.subject = "" unless message.subject
|
58
|
-
|
59
|
-
|
60
|
-
|
58
|
+
custom_subject = SanitizeEmail::MailHeaderTools.custom_subject(message)
|
59
|
+
if message.subject.frozen?
|
60
|
+
message.subject = "#{custom_subject}#{message.subject}"
|
61
|
+
else
|
62
|
+
message.subject.prepend(custom_subject)
|
63
|
+
end
|
61
64
|
end
|
62
65
|
|
63
66
|
# According to https://github.com/mikel/mail
|
data/spec/sanitize_email_spec.rb
CHANGED
@@ -106,12 +106,27 @@ describe SanitizeEmail do
|
|
106
106
|
end
|
107
107
|
end
|
108
108
|
|
109
|
+
def sanitary_mail_delivery_frozen_strings(config_options = {})
|
110
|
+
SanitizeEmail.sanitary(config_options) do
|
111
|
+
mail_delivery_frozen_strings
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
109
115
|
def unsanitary_mail_delivery
|
110
116
|
SanitizeEmail.unsanitary do
|
111
117
|
mail_delivery
|
112
118
|
end
|
113
119
|
end
|
114
120
|
|
121
|
+
def mail_delivery_frozen_strings
|
122
|
+
@email_message = Mail.deliver do
|
123
|
+
from "from@example.org".freeze
|
124
|
+
to "to@example.org".freeze
|
125
|
+
subject "original subject".freeze
|
126
|
+
body "funky fresh".freeze
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
115
130
|
def mail_delivery_hot_mess
|
116
131
|
@email_message = Mail.deliver do
|
117
132
|
from "same@example.org"
|
@@ -470,6 +485,16 @@ describe SanitizeEmail do
|
|
470
485
|
end
|
471
486
|
end
|
472
487
|
|
488
|
+
context "with frozen string (literals)" do
|
489
|
+
it "prepends strings without exception" do
|
490
|
+
configure_sanitize_email(
|
491
|
+
environment: "{{serverABC}}",
|
492
|
+
use_actual_environment_prepended_to_subject: true
|
493
|
+
)
|
494
|
+
expect { sanitary_mail_delivery_frozen_strings }.to_not raise_exception
|
495
|
+
end
|
496
|
+
end
|
497
|
+
|
473
498
|
context "force_sanitize" do
|
474
499
|
context "true" do
|
475
500
|
before(:each) do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sanitize_email
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Boling
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2017-02-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -290,7 +290,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
290
290
|
version: '0'
|
291
291
|
requirements: []
|
292
292
|
rubyforge_project:
|
293
|
-
rubygems_version: 2.
|
293
|
+
rubygems_version: 2.6.8
|
294
294
|
signing_key:
|
295
295
|
specification_version: 4
|
296
296
|
summary: Email Condom for your Ruby Server
|