sanitize_email 1.1.5 → 1.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1fdeb24b19f1398c5541c1ac64d76181662ff475
4
- data.tar.gz: 9f08881fb0027324fc4487f2f9cca2044df2a3bb
3
+ metadata.gz: 64c390a96c6347527bd9d4b0833a65ad16e3a837
4
+ data.tar.gz: 02b106a696439a87a0001370d25316d7df494340
5
5
  SHA512:
6
- metadata.gz: caf6b42229c732c67b5372cc2862e089e4abaa23f6fe25c8e46719ba4f1538a7ac67f220d637b28f235e25b6b38b18934a4dba6fe4e3e72d33acfad72e7caaf8
7
- data.tar.gz: 450f79a5192e17f271f28adabca2cdac943cdddd5699bb380e3e3292294865c4a8eb21ba8021e4abf2e27b34c32f53c21f7f5ce92af6288b625039684917d4d9
6
+ metadata.gz: 8854adb0d44027a38fde49d390c1d9f1e43e149800ff0f87e67f110427f646ae355e18bf42880d1f5449f9df2c4b621ec707c1f5db8560a2f85041bdf5041906
7
+ data.tar.gz: 2b13251443bf8ad2f63dd7e4bdb41d721e373842907e3d3913bd1b8f952eddd258ac66a447bee79c3d3cacbf0745cdbd593eb7e269b0fd84f6c69d8c92de7cce
@@ -1 +1 @@
1
- ruby-1.9.3-p448
1
+ ruby-2.2.3
@@ -1,3 +1,9 @@
1
+ Version 1.1.6 - AUG.29.2015
2
+ * spec run as default rake task & improve Rakefile syntax by Peter Boling
3
+ * prevent direct configuration via `DEFAULTS` from working, as that is not the API by Peter Boling
4
+ * better gem summary: "Email Condom for your Ruby Server" by Peter Boling
5
+ * Improve specs and spec config by Peter Boling
6
+
1
7
  Version 1.1.5 - MAR.10.2015
2
8
  * Refactored `prepend_subject_array` by Scott Rocher
3
9
  * Specs for prepending to subject by Scott Rocher
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # sanitize_email
2
2
 
3
- This gem allows you to override your mail delivery settings, globally or in a local context.
3
+ This gem allows you to override your mail delivery settings, globally or in a local context. It is like a Ruby encrusted condom for your email server, just in case it decides to have intercourse with other servers via sundry mail protocols.
4
4
 
5
5
  | Project | Sanitize Email |
6
6
  |------------------------ | ----------------- |
@@ -70,21 +70,29 @@ Then:
70
70
 
71
71
  There are four ways SanitizeEmail can be turned on; in order of precedence they are:
72
72
 
73
- 1. SanitizeEmail.force_sanitize = true # by default it is nil
74
- Only useful for local context. Inside a method where you will be sending an email,
75
- set SanitizeEmail.force_sanitize = true just prior to delivering it. Also useful in the console.
76
- 2. Mail.register_interceptor(SanitizeEmail::Bleach.new(:engage => true)) # by default it is nil
77
- If SanitizeEmail seems to not be sanitizing you have probably not registered the interceptor. SanitizeEmail tries to do this for you.
78
- Note: If you are working in an environment that has a Mail or Mailer class that uses the register_interceptor API, the interceptor will already have been registered by SanitizeEmail (however, note lack of :engage => true):
73
+ 1. Only useful for local context. Inside a method where you will be sending an email, set SanitizeEmail.force_sanitize = true just prior to delivering it. Also useful in the console.
74
+
75
+ SanitizeEmail.force_sanitize = true # by default it is nil
76
+
77
+ 2. If SanitizeEmail seems to not be sanitizing you have probably not registered the interceptor. SanitizeEmail tries to do this for you. *Note*: If you are working in an environment that has a Mail or Mailer class that uses the register_interceptor API, the interceptor will already have been registered by SanitizeEmail (however, note lack of `:engage => true):
78
+
79
+ Mail.register_interceptor(SanitizeEmail::Bleach.new(:engage => true)) # by default :engage is nil
79
80
 
80
- Mail.register_interceptor(SanitizeEmail::Bleach.new
81
81
  Without :engage => true the interceptor is inactive, and will require engaging via one of the other methods.
82
+
83
+ Mail.register_interceptor(SanitizeEmail::Bleach.new)
84
+
82
85
  As an example you could do the following to engage SanitizeEmail:
83
86
 
84
87
  SanitizeEmail::Config.configure {|config| config[:engage] = true }
85
- 3. SanitizeEmail::Config.configure {|config| config[:activation_proc] = Proc.new { true } } # by default it is false
86
- If you don't need to compute anything, then don't use the Proc, go with the next option.
87
- 4. SanitizeEmail::Config.configure {|config| config[:engage] = true } # by default it is nil
88
+
89
+ 3. If you don't need to compute anything, then don't use this option, go with the next option.
90
+
91
+ SanitizeEmail::Config.configure {|config| config[:activation_proc] = Proc.new { true } } # by default :activation_proc is false
92
+
93
+ 4. This will turn it on. Period.
94
+
95
+ SanitizeEmail::Config.configure {|config| config[:engage] = true } # by default :engage is nil
88
96
 
89
97
  ### Notes
90
98
 
data/Rakefile CHANGED
@@ -1,48 +1,47 @@
1
1
  # encoding: utf-8
2
2
  #!/usr/bin/env rake
3
3
  require "bundler/gem_tasks"
4
- require 'rake'
4
+ require "rake"
5
5
 
6
- require 'rspec/core'
7
- require 'rspec/core/rake_task'
8
- RSpec::Core::RakeTask.new(:spec) do |spec|
9
- spec.pattern = FileList['spec/**/*_spec.rb']
6
+ begin
7
+ require "rspec/core/rake_task"
8
+ RSpec::Core::RakeTask.new(:spec)
9
+ task :default => :spec
10
+ rescue LoadError
10
11
  end
11
12
 
12
- require 'reek/rake/task'
13
+ require "reek/rake/task"
13
14
  Reek::Rake::Task.new do |t|
14
15
  t.fail_on_error = true
15
16
  t.verbose = false
16
- t.source_files = 'lib/**/*.rb'
17
+ t.source_files = "lib/**/*.rb"
17
18
  end
18
19
 
19
- require 'roodi'
20
- require 'roodi_task'
20
+ require "roodi"
21
+ require "roodi_task"
21
22
  RoodiTask.new do |t|
22
23
  t.verbose = false
23
24
  end
24
25
 
25
- task :default => :spec
26
-
27
26
  namespace :test do
28
- desc 'Test against all supported Rails versions'
27
+ desc "Test against all supported Rails versions"
29
28
  task :all do
30
29
  %w(3.0.x 3.1.x 3.2.x 4.0.x).each do |version|
31
- sh "BUNDLE_GEMFILE='gemfiles/Gemfile.rails-#{version}' bundle --quiet"
32
- sh "BUNDLE_GEMFILE='gemfiles/Gemfile.rails-#{version}' bundle exec rspec spec"
30
+ sh %[BUNDLE_GEMFILE="gemfiles/Gemfile.rails-#{version}" bundle --quiet]
31
+ sh %[BUNDLE_GEMFILE="gemfiles/Gemfile.rails-#{version}" bundle exec rspec spec]
33
32
  end
34
33
  end
35
34
  end
36
35
 
37
- require File.expand_path('../lib/sanitize_email/version', __FILE__)
38
- require 'rdoc'
39
- require 'rdoc/task'
36
+ require File.expand_path("../lib/sanitize_email/version", __FILE__)
37
+ require "rdoc"
38
+ require "rdoc/task"
40
39
  RDoc::Task.new do |rdoc|
41
- rdoc.rdoc_dir = 'rdoc'
40
+ rdoc.rdoc_dir = "rdoc"
42
41
  rdoc.title = "SanitizeEmail #{SanitizeEmail::VERSION}"
43
- rdoc.options << '--line-numbers'
44
- rdoc.rdoc_files.include('README*')
45
- rdoc.rdoc_files.include('lib/**/*.rb')
42
+ rdoc.options << "--line-numbers"
43
+ rdoc.rdoc_files.include("README*")
44
+ rdoc.rdoc_files.include("lib/**/*.rb")
46
45
  end
47
46
 
48
47
  Bundler::GemHelper.install_tasks
@@ -44,7 +44,7 @@ module SanitizeEmail
44
44
  :activation_proc => Proc.new { false }
45
45
  }
46
46
 
47
- @config ||= DEFAULTS
47
+ @config ||= DEFAULTS.dup
48
48
  def self.configure &block
49
49
  yield @config
50
50
 
@@ -1,5 +1,5 @@
1
1
  # Copyright (c) 2008-13 Peter H. Boling of RailsBling.com
2
2
  # Released under the MIT license
3
3
  module SanitizeEmail
4
- VERSION = '1.1.5'
4
+ VERSION = '1.1.6'
5
5
  end
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
6
6
  s.version = SanitizeEmail::VERSION
7
7
 
8
8
  s.authors = ["Peter Boling", "John Trupiano", "George Anderson"]
9
- s.summary = "Rails/Sinatra/Mail gem: Test email abilities without ever sending a message to actual live addresses"
9
+ s.summary = "Email Condom for your Ruby Server"
10
10
  s.description = "In Rails, Sinatra, 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."
11
11
  s.email = ["peter.boling@gmail.com"]
12
12
  s.extra_rdoc_files = [
@@ -27,19 +27,19 @@ Gem::Specification.new do |s|
27
27
  # A project wanting to use this gem's engine/railtie will be expected to have already loaded the rails/railtie gem.
28
28
  #s.add_dependency "railties", ">= 3.2"
29
29
  # to replace the cattr_accessor method we lost when removing rails from run time dependencies
30
- #s.add_runtime_dependency(%q<facets>, ["> 0"])
30
+ #s.add_runtime_dependency("facets", ["> 0"])
31
31
 
32
32
  # Development Dependencies
33
- s.add_development_dependency(%q<rails>, [">= 3.0"])
34
- s.add_development_dependency(%q<actionmailer>, [">= 3.0"])
35
- s.add_development_dependency(%q<letter_opener>, [">= 0"])
36
- s.add_development_dependency(%q<launchy>, [">= 0"])
37
- s.add_development_dependency(%q<rspec>, [">= 2.11"])
38
- s.add_development_dependency(%q<mail>, [">= 0"])
39
- s.add_development_dependency(%q<rdoc>, [">= 3.12"])
40
- s.add_development_dependency(%q<reek>, [">= 1.2.8"])
41
- s.add_development_dependency(%q<roodi>, [">= 2.1.0"])
42
- s.add_development_dependency(%q<rake>, [">= 0"])
43
- s.add_development_dependency "coveralls"
33
+ s.add_development_dependency("rails", [">= 3.0"])
34
+ s.add_development_dependency("actionmailer", [">= 3.0"])
35
+ s.add_development_dependency("letter_opener", [">= 0"])
36
+ s.add_development_dependency("launchy", [">= 0"])
37
+ s.add_development_dependency("rspec", [">= 3"])
38
+ s.add_development_dependency("mail", [">= 0"])
39
+ s.add_development_dependency("rdoc", [">= 3.12"])
40
+ s.add_development_dependency("reek", [">= 1.2.8"])
41
+ s.add_development_dependency("roodi", [">= 2.1.0"])
42
+ s.add_development_dependency("rake", [">= 0"])
43
+ s.add_development_dependency("pry", [">= 0"])
44
+ s.add_development_dependency("coveralls")
44
45
  end
45
-
@@ -29,29 +29,30 @@ describe SanitizeEmail do
29
29
  end
30
30
 
31
31
  def sanitize_spec_dryer(rails_env = 'test')
32
- Launchy.stub(:open)
32
+ allow(Launchy).to receive(:open)
33
33
  location = File.expand_path('../tmp/mail_dump', __FILE__)
34
- FileUtils.rm_rf(location)
34
+ FileUtils.remove_file(location, true)
35
35
  Mail.defaults do
36
36
  delivery_method LetterOpener::DeliveryMethod, :location => location
37
37
  end
38
- Rails.stub(:env).and_return(rails_env)
38
+ allow(Rails).to receive(:env).and_return(rails_env)
39
39
  end
40
40
 
41
41
  def configure_sanitize_email(sanitize_hash = {})
42
42
  options = DEFAULT_TEST_CONFIG.merge(sanitize_hash).dup
43
43
  options.reverse_merge!({ :sanitized_to => 'to@sanitize_email.org' }) unless sanitize_hash.has_key?(:sanitized_recipients)
44
44
  SanitizeEmail::Config.configure do |config|
45
- config[:activation_proc] = options[:activation_proc]
46
- config[:sanitized_to] = options[:sanitized_to]
47
- config[:sanitized_cc] = options[:sanitized_cc]
48
- config[:sanitized_bcc] = options[:sanitized_bcc]
45
+ config[:environment] = options[:environment]
46
+ config[:activation_proc] = options[:activation_proc]
47
+ config[:sanitized_to] = options[:sanitized_to]
48
+ config[:sanitized_cc] = options[:sanitized_cc]
49
+ config[:sanitized_bcc] = options[:sanitized_bcc]
49
50
  config[:use_actual_email_prepended_to_subject] = options[:use_actual_email_prepended_to_subject]
50
51
  config[:use_actual_environment_prepended_to_subject] = options[:use_actual_environment_prepended_to_subject]
51
52
  config[:use_actual_email_as_sanitized_user_name] = options[:use_actual_email_as_sanitized_user_name]
52
53
 
53
54
  # For testing *deprecated* configuration options:
54
- config[:local_environments] = options[:local_environments] if options[:local_environments]
55
+ config[:local_environments] = options[:local_environments] if options[:local_environments]
55
56
  config[:sanitized_recipients] = options[:sanitized_recipients] if options[:sanitized_recipients]
56
57
  config[:force_sanitize] = options[:force_sanitize] unless options[:force_sanitize].nil?
57
58
  end
@@ -137,24 +138,24 @@ describe SanitizeEmail do
137
138
  unsanitary_mail_delivery
138
139
  end
139
140
  it "should not alter non-sanitized attributes" do
140
- @email_message.should have_from('from@example.org')
141
- @email_message.should have_reply_to('reply_to@example.org')
142
- @email_message.should have_body_text('funky fresh')
141
+ expect(@email_message).to have_from('from@example.org')
142
+ expect(@email_message).to have_reply_to('reply_to@example.org')
143
+ expect(@email_message).to have_body_text('funky fresh')
143
144
  end
144
145
  it "should not prepend overrides" do
145
- @email_message.should_not have_to_username("to at sanitize_email.org")
146
- @email_message.should_not have_subject("(to at sanitize_email.org)")
146
+ expect(@email_message).not_to have_to_username("to at sanitize_email.org")
147
+ expect(@email_message).not_to have_subject("(to at sanitize_email.org)")
147
148
  end
148
149
  it "alters nothing" do
149
- @email_message.should have_from('from@example.org')
150
- @email_message.should have_reply_to('reply_to@example.org')
151
- @email_message.should have_from("from@example.org")
152
- @email_message.should have_to("to@example.org")
153
- @email_message.should_not have_to_username("to at")
154
- @email_message.should have_cc("cc@example.org")
155
- @email_message.should have_bcc("bcc@example.org")
156
- @email_message.should have_subject("original subject")
157
- @email_message.should have_body_text('funky fresh')
150
+ expect(@email_message).to have_from('from@example.org')
151
+ expect(@email_message).to have_reply_to('reply_to@example.org')
152
+ expect(@email_message).to have_from("from@example.org")
153
+ expect(@email_message).to have_to("to@example.org")
154
+ expect(@email_message).not_to have_to_username("to at")
155
+ expect(@email_message).to have_cc("cc@example.org")
156
+ expect(@email_message).to have_bcc("bcc@example.org")
157
+ expect(@email_message).to have_subject("original subject")
158
+ expect(@email_message).to have_body_text('funky fresh')
158
159
  end
159
160
  end
160
161
 
@@ -164,27 +165,27 @@ describe SanitizeEmail do
164
165
  sanitary_mail_delivery
165
166
  end
166
167
  it "should not alter non-sanitized attributes" do
167
- @email_message.should have_from('from@example.org')
168
- @email_message.should have_reply_to('reply_to@example.org')
169
- @email_message.should have_body_text('funky fresh')
168
+ expect(@email_message).to have_from('from@example.org')
169
+ expect(@email_message).to have_reply_to('reply_to@example.org')
170
+ expect(@email_message).to have_body_text('funky fresh')
170
171
  end
171
172
  it "should not prepend overrides" do
172
- @email_message.should_not have_to_username("to at sanitize_email.org")
173
- @email_message.should_not have_subject("(to at sanitize_email.org)")
173
+ expect(@email_message).not_to have_to_username("to at sanitize_email.org")
174
+ expect(@email_message).not_to have_subject("(to at sanitize_email.org)")
174
175
  end
175
176
  it "should override" do
176
- @email_message.should have_to("to@sanitize_email.org")
177
- @email_message.should have_cc("cc@sanitize_email.org")
178
- @email_message.should have_bcc("bcc@sanitize_email.org")
177
+ expect(@email_message).to have_to("to@sanitize_email.org")
178
+ expect(@email_message).to have_cc("cc@sanitize_email.org")
179
+ expect(@email_message).to have_bcc("bcc@sanitize_email.org")
179
180
  end
180
181
  it "should set headers" do
181
- @email_message.should have_header("X-Sanitize-Email-To", "to@example.org")
182
- @email_message.should have_header("X-Sanitize-Email-Cc", "cc@example.org")
183
- @email_message.should_not have_header("X-Sanitize-Email-Bcc", "bcc@sanitize_email.org")
182
+ expect(@email_message).to have_header("X-Sanitize-Email-To", "to@example.org")
183
+ expect(@email_message).to have_header("X-Sanitize-Email-Cc", "cc@example.org")
184
+ expect(@email_message).not_to have_header("X-Sanitize-Email-Bcc", "bcc@sanitize_email.org")
184
185
  end
185
186
  it "should not prepend originals by default" do
186
- @email_message.should_not have_to_username("to at example.org <to@sanitize_email.org>")
187
- @email_message.should_not have_subject("(to at example.org) original subject")
187
+ expect(@email_message).not_to have_to_username("to at example.org <to@sanitize_email.org>")
188
+ expect(@email_message).not_to have_subject("(to at example.org) original subject")
188
189
  end
189
190
  end
190
191
 
@@ -194,43 +195,43 @@ describe SanitizeEmail do
194
195
  sanitary_mail_delivery_multiple_recipients
195
196
  end
196
197
  it "should not alter non-sanitized attributes" do
197
- @email_message.should have_from('from@example.org')
198
- @email_message.should have_reply_to('reply_to@example.org')
199
- @email_message.should have_body_text('funky fresh')
198
+ expect(@email_message).to have_from('from@example.org')
199
+ expect(@email_message).to have_reply_to('reply_to@example.org')
200
+ expect(@email_message).to have_body_text('funky fresh')
200
201
  end
201
202
  it "should not prepend overrides" do
202
- @email_message.should_not have_to_username("to at sanitize_email.org")
203
- @email_message.should_not have_subject("(to at sanitize_email.org)")
203
+ expect(@email_message).not_to have_to_username("to at sanitize_email.org")
204
+ expect(@email_message).not_to have_subject("(to at sanitize_email.org)")
204
205
  end
205
206
  it "should override" do
206
- @email_message.should have_to("to@sanitize_email.org")
207
- @email_message.should have_cc("cc@sanitize_email.org")
208
- @email_message.should have_bcc("bcc@sanitize_email.org")
207
+ expect(@email_message).to have_to("to@sanitize_email.org")
208
+ expect(@email_message).to have_cc("cc@sanitize_email.org")
209
+ expect(@email_message).to have_bcc("bcc@sanitize_email.org")
209
210
  end
210
211
  it "should set headers for sanitized :to recipients" do
211
- @email_message.should have_header("X-Sanitize-Email-To", "to1@example.org")
212
- @email_message.should_not have_header("X-Sanitize-Email-To-0", "to1@example.org")
213
- @email_message.should_not have_header("X-Sanitize-Email-To-1", "to1@example.org")
214
- @email_message.should have_header("X-Sanitize-Email-To-2", "to2@example.org")
215
- @email_message.should have_header("X-Sanitize-Email-To-3", "to3@example.org")
212
+ expect(@email_message).to have_header("X-Sanitize-Email-To", "to1@example.org")
213
+ expect(@email_message).not_to have_header("X-Sanitize-Email-To-0", "to1@example.org")
214
+ expect(@email_message).not_to have_header("X-Sanitize-Email-To-1", "to1@example.org")
215
+ expect(@email_message).to have_header("X-Sanitize-Email-To-2", "to2@example.org")
216
+ expect(@email_message).to have_header("X-Sanitize-Email-To-3", "to3@example.org")
216
217
  end
217
218
  it "should set headers for sanitized :cc recipients" do
218
- @email_message.should have_header("X-Sanitize-Email-Cc", "cc1@example.org")
219
- @email_message.should_not have_header("X-Sanitize-Email-Cc-0", "cc1@example.org")
220
- @email_message.should_not have_header("X-Sanitize-Email-Cc-1", "cc1@example.org")
221
- @email_message.should have_header("X-Sanitize-Email-Cc-2", "cc2@example.org")
222
- @email_message.should have_header("X-Sanitize-Email-Cc-3", "cc3@example.org")
219
+ expect(@email_message).to have_header("X-Sanitize-Email-Cc", "cc1@example.org")
220
+ expect(@email_message).not_to have_header("X-Sanitize-Email-Cc-0", "cc1@example.org")
221
+ expect(@email_message).not_to have_header("X-Sanitize-Email-Cc-1", "cc1@example.org")
222
+ expect(@email_message).to have_header("X-Sanitize-Email-Cc-2", "cc2@example.org")
223
+ expect(@email_message).to have_header("X-Sanitize-Email-Cc-3", "cc3@example.org")
223
224
  end
224
225
  it "should not set headers for sanitized :bcc recipients" do
225
- @email_message.should_not have_header("X-Sanitize-Email-Bcc", "bcc1@sanitize_email.org")
226
- @email_message.should_not have_header("X-Sanitize-Email-Bcc-0", "bcc1@sanitize_email.org")
227
- @email_message.should_not have_header("X-Sanitize-Email-Bcc-1", "bcc1@sanitize_email.org")
228
- @email_message.should_not have_header("X-Sanitize-Email-Bcc-2", "bcc2@sanitize_email.org")
229
- @email_message.should_not have_header("X-Sanitize-Email-Bcc-3", "bcc3@sanitize_email.org")
226
+ expect(@email_message).not_to have_header("X-Sanitize-Email-Bcc", "bcc1@sanitize_email.org")
227
+ expect(@email_message).not_to have_header("X-Sanitize-Email-Bcc-0", "bcc1@sanitize_email.org")
228
+ expect(@email_message).not_to have_header("X-Sanitize-Email-Bcc-1", "bcc1@sanitize_email.org")
229
+ expect(@email_message).not_to have_header("X-Sanitize-Email-Bcc-2", "bcc2@sanitize_email.org")
230
+ expect(@email_message).not_to have_header("X-Sanitize-Email-Bcc-3", "bcc3@sanitize_email.org")
230
231
  end
231
232
  it "should not prepend originals by default" do
232
- @email_message.should_not have_to_username("to at example.org <to@sanitize_email.org>")
233
- @email_message.should_not have_subject("(to at example.org) original subject")
233
+ expect(@email_message).not_to have_to_username("to at example.org <to@sanitize_email.org>")
234
+ expect(@email_message).not_to have_subject("(to at example.org) original subject")
234
235
  end
235
236
  end
236
237
 
@@ -241,43 +242,43 @@ describe SanitizeEmail do
241
242
  mail_delivery
242
243
  end
243
244
  it "original to is prepended to subject" do
244
- @email_message.should have_subject(/\(to at example.org\).*original subject/)
245
+ expect(@email_message).to have_subject(/\(to at example.org\).*original subject/)
245
246
  end
246
247
  it "original to is only prepended once to subject" do
247
- @email_message.should_not have_subject(/\(to at example.org\).*\(to at example.org\).*original subject/)
248
+ expect(@email_message).not_to have_subject(/\(to at example.org\).*\(to at example.org\).*original subject/)
248
249
  end
249
250
  it "should not alter non-sanitized attributes" do
250
- @email_message.should have_from('from@example.org')
251
- @email_message.should have_reply_to('reply_to@example.org')
252
- @email_message.should have_body_text('funky fresh')
251
+ expect(@email_message).to have_from('from@example.org')
252
+ expect(@email_message).to have_reply_to('reply_to@example.org')
253
+ expect(@email_message).to have_body_text('funky fresh')
253
254
  end
254
255
  it "should not prepend overrides" do
255
- @email_message.should_not have_to_username("to at sanitize_email.org")
256
- @email_message.should_not have_subject(/.*\(to at sanitize_email.org\).*/)
256
+ expect(@email_message).not_to have_to_username("to at sanitize_email.org")
257
+ expect(@email_message).not_to have_subject(/.*\(to at sanitize_email.org\).*/)
257
258
  end
258
259
  it "should override where original recipients were not nil" do
259
- @email_message.should have_to("funky@sanitize_email.org")
260
+ expect(@email_message).to have_to("funky@sanitize_email.org")
260
261
  end
261
262
  it "should not override where original recipients were nil" do
262
- @email_message.should_not have_cc("cc@sanitize_email.org")
263
- @email_message.should_not have_bcc("bcc@sanitize_email.org")
263
+ expect(@email_message).not_to have_cc("cc@sanitize_email.org")
264
+ expect(@email_message).not_to have_bcc("bcc@sanitize_email.org")
264
265
  end
265
266
  it "should set headers of originals" do
266
- @email_message.should have_header("X-Sanitize-Email-To", "to@example.org")
267
- @email_message.should have_header("X-Sanitize-Email-Cc", "cc@example.org")
267
+ expect(@email_message).to have_header("X-Sanitize-Email-To", "to@example.org")
268
+ expect(@email_message).to have_header("X-Sanitize-Email-Cc", "cc@example.org")
268
269
  end
269
270
  it "should not set headers of bcc" do
270
- @email_message.should_not have_header("X-Sanitize-Email-Bcc", "bcc@sanitize_email.org")
271
+ expect(@email_message).not_to have_header("X-Sanitize-Email-Bcc", "bcc@sanitize_email.org")
271
272
  end
272
273
  it "should not set headers of overrides" do
273
- @email_message.should_not have_header("X-Sanitize-Email-To", "funky@sanitize_email.org")
274
- @email_message.should_not have_header("X-Sanitize-Email-Cc", "cc@sanitize_email.org")
275
- @email_message.should_not have_header("X-Sanitize-Email-Bcc", "bcc@sanitize_email.org")
274
+ expect(@email_message).not_to have_header("X-Sanitize-Email-To", "funky@sanitize_email.org")
275
+ expect(@email_message).not_to have_header("X-Sanitize-Email-Cc", "cc@sanitize_email.org")
276
+ expect(@email_message).not_to have_header("X-Sanitize-Email-Bcc", "bcc@sanitize_email.org")
276
277
  #puts "email headers:\n#{@email_message.header}"
277
278
  end
278
279
  it "should not prepend originals by default" do
279
- @email_message.should_not have_to_username("to at example.org <to@sanitize_email.org>")
280
- @email_message.should_not have_subject("(to at example.org) original subject")
280
+ expect(@email_message).not_to have_to_username("to at example.org <to@sanitize_email.org>")
281
+ expect(@email_message).not_to have_subject("(to at example.org) original subject")
281
282
  end
282
283
  end
283
284
 
@@ -288,40 +289,40 @@ describe SanitizeEmail do
288
289
  mail_delivery_hot_mess
289
290
  end
290
291
  it "original to is prepended to subject" do
291
- @email_message.should have_subject(/\(same at example.org\).*original subject/)
292
+ expect(@email_message).to have_subject(/\(same at example.org\).*original subject/)
292
293
  end
293
294
  it "original to is only prepended once to subject" do
294
- @email_message.should_not have_subject(/\(same at example.org\).*\(same at example.org\).*original subject/)
295
+ expect(@email_message).not_to have_subject(/\(same at example.org\).*\(same at example.org\).*original subject/)
295
296
  end
296
297
  it "should not alter non-sanitized attributes" do
297
- @email_message.should have_from('same@example.org')
298
- @email_message.should have_reply_to('same@example.org')
299
- @email_message.should have_body_text('funky fresh')
298
+ expect(@email_message).to have_from('same@example.org')
299
+ expect(@email_message).to have_reply_to('same@example.org')
300
+ expect(@email_message).to have_body_text('funky fresh')
300
301
  end
301
302
  it "should not prepend overrides" do
302
- @email_message.should_not have_to_username("same at example.org")
303
+ expect(@email_message).not_to have_to_username("same at example.org")
303
304
  end
304
305
  it "should override where original recipients were not nil" do
305
- @email_message.should have_to("same@example.org")
306
+ expect(@email_message).to have_to("same@example.org")
306
307
  end
307
308
  it "should not override where original recipients were nil" do
308
- @email_message.should_not have_cc("same@example.org")
309
- @email_message.should_not have_bcc("same@example.org")
309
+ expect(@email_message).not_to have_cc("same@example.org")
310
+ expect(@email_message).not_to have_bcc("same@example.org")
310
311
  end
311
312
  it "should set headers of originals" do
312
- @email_message.should have_header("X-Sanitize-Email-To", "same@example.org")
313
- @email_message.should have_header("X-Sanitize-Email-Cc", "same@example.org")
313
+ expect(@email_message).to have_header("X-Sanitize-Email-To", "same@example.org")
314
+ expect(@email_message).to have_header("X-Sanitize-Email-Cc", "same@example.org")
314
315
  end
315
316
  it "should not set headers of bcc" do
316
- @email_message.should_not have_header("X-Sanitize-Email-Bcc", "same@example.org")
317
+ expect(@email_message).not_to have_header("X-Sanitize-Email-Bcc", "same@example.org")
317
318
  end
318
319
  it "should not set headers of overrides" do
319
- @email_message.should_not have_header("X-Sanitize-Email-Bcc", "same@example.org")
320
+ expect(@email_message).not_to have_header("X-Sanitize-Email-Bcc", "same@example.org")
320
321
  puts "email headers:\n#{@email_message.header}"
321
322
  end
322
323
  it "should not prepend originals by default" do
323
- @email_message.should_not have_to_username("same at example.org <same@example.org>")
324
- @email_message.should_not have_subject("(same at example.org) original subject")
324
+ expect(@email_message).not_to have_to_username("same at example.org <same@example.org>")
325
+ expect(@email_message).not_to have_subject("(same at example.org) original subject")
325
326
  end
326
327
  end
327
328
 
@@ -334,19 +335,19 @@ describe SanitizeEmail do
334
335
  mail_delivery
335
336
  end
336
337
  it "should not alter non-sanitized attributes" do
337
- @email_message.should have_from('from@example.org')
338
- @email_message.should have_reply_to('reply_to@example.org')
339
- @email_message.should have_body_text('funky fresh')
338
+ expect(@email_message).to have_from('from@example.org')
339
+ expect(@email_message).to have_reply_to('reply_to@example.org')
340
+ expect(@email_message).to have_body_text('funky fresh')
340
341
  end
341
342
  it "should override" do
342
- @email_message.should have_to("to@sanitize_email.org")
343
- @email_message.should have_cc("cc@sanitize_email.org")
344
- @email_message.should have_bcc("bcc@sanitize_email.org")
343
+ expect(@email_message).to have_to("to@sanitize_email.org")
344
+ expect(@email_message).to have_cc("cc@sanitize_email.org")
345
+ expect(@email_message).to have_bcc("bcc@sanitize_email.org")
345
346
  end
346
347
  it "should set headers" do
347
- @email_message.should have_header("X-Sanitize-Email-To", "to@example.org")
348
- @email_message.should have_header("X-Sanitize-Email-Cc", "cc@example.org")
349
- @email_message.should_not have_header("X-Sanitize-Email-Bcc", "bcc@sanitize_email.org")
348
+ expect(@email_message).to have_header("X-Sanitize-Email-To", "to@example.org")
349
+ expect(@email_message).to have_header("X-Sanitize-Email-Cc", "cc@example.org")
350
+ expect(@email_message).not_to have_header("X-Sanitize-Email-Bcc", "bcc@sanitize_email.org")
350
351
  end
351
352
  end
352
353
  context "false" do
@@ -357,17 +358,17 @@ describe SanitizeEmail do
357
358
  mail_delivery
358
359
  end
359
360
  it "should not alter non-sanitized attributes" do
360
- @email_message.should have_from('from@example.org')
361
- @email_message.should have_reply_to('reply_to@example.org')
362
- @email_message.should have_body_text('funky fresh')
361
+ expect(@email_message).to have_from('from@example.org')
362
+ expect(@email_message).to have_reply_to('reply_to@example.org')
363
+ expect(@email_message).to have_body_text('funky fresh')
363
364
  end
364
365
  it "should not alter normally sanitized attributes" do
365
- @email_message.should have_to("to@example.org")
366
- @email_message.should have_cc("cc@example.org")
367
- @email_message.should have_bcc("bcc@example.org")
368
- @email_message.should_not have_header("X-Sanitize-Email-To", "to@example.org")
369
- @email_message.should_not have_header("X-Sanitize-Email-Cc", "cc@example.org")
370
- @email_message.should_not have_header("X-Sanitize-Email-Bcc", "bcc@example.org")
366
+ expect(@email_message).to have_to("to@example.org")
367
+ expect(@email_message).to have_cc("cc@example.org")
368
+ expect(@email_message).to have_bcc("bcc@example.org")
369
+ expect(@email_message).not_to have_header("X-Sanitize-Email-To", "to@example.org")
370
+ expect(@email_message).not_to have_header("X-Sanitize-Email-Cc", "cc@example.org")
371
+ expect(@email_message).not_to have_header("X-Sanitize-Email-Bcc", "bcc@example.org")
371
372
  end
372
373
  end
373
374
  context "nil" do
@@ -380,17 +381,17 @@ describe SanitizeEmail do
380
381
  mail_delivery
381
382
  end
382
383
  it "should not alter non-sanitized attributes" do
383
- @email_message.should have_from('from@example.org')
384
- @email_message.should have_reply_to('reply_to@example.org')
385
- @email_message.should have_body_text('funky fresh')
384
+ expect(@email_message).to have_from('from@example.org')
385
+ expect(@email_message).to have_reply_to('reply_to@example.org')
386
+ expect(@email_message).to have_body_text('funky fresh')
386
387
  end
387
388
  it "should override" do
388
- @email_message.should have_to("to@sanitize_email.org")
389
- @email_message.should have_cc("cc@sanitize_email.org")
390
- @email_message.should have_bcc("bcc@sanitize_email.org")
391
- @email_message.should have_header("X-Sanitize-Email-To", "to@example.org")
392
- @email_message.should have_header("X-Sanitize-Email-Cc", "cc@example.org")
393
- @email_message.should_not have_header("X-Sanitize-Email-Bcc", "bcc@sanitize_email.org")
389
+ expect(@email_message).to have_to("to@sanitize_email.org")
390
+ expect(@email_message).to have_cc("cc@sanitize_email.org")
391
+ expect(@email_message).to have_bcc("bcc@sanitize_email.org")
392
+ expect(@email_message).to have_header("X-Sanitize-Email-To", "to@example.org")
393
+ expect(@email_message).to have_header("X-Sanitize-Email-Cc", "cc@example.org")
394
+ expect(@email_message).not_to have_header("X-Sanitize-Email-Bcc", "bcc@sanitize_email.org")
394
395
  end
395
396
  end
396
397
  context "activation proc disables" do
@@ -402,17 +403,17 @@ describe SanitizeEmail do
402
403
  mail_delivery
403
404
  end
404
405
  it "should not alter non-sanitized attributes" do
405
- @email_message.should have_from('from@example.org')
406
- @email_message.should have_reply_to('reply_to@example.org')
407
- @email_message.should have_body_text('funky fresh')
406
+ expect(@email_message).to have_from('from@example.org')
407
+ expect(@email_message).to have_reply_to('reply_to@example.org')
408
+ expect(@email_message).to have_body_text('funky fresh')
408
409
  end
409
410
  it "should not alter normally sanitized attributes" do
410
- @email_message.should have_to("to@example.org")
411
- @email_message.should have_cc("cc@example.org")
412
- @email_message.should have_bcc("bcc@example.org")
413
- @email_message.should_not have_header("X-Sanitize-Email-To", "to@example.org")
414
- @email_message.should_not have_header("X-Sanitize-Email-Cc", "cc@example.org")
415
- @email_message.should_not have_header("X-Sanitize-Email-Bcc", "bcc@example.org")
411
+ expect(@email_message).to have_to("to@example.org")
412
+ expect(@email_message).to have_cc("cc@example.org")
413
+ expect(@email_message).to have_bcc("bcc@example.org")
414
+ expect(@email_message).not_to have_header("X-Sanitize-Email-To", "to@example.org")
415
+ expect(@email_message).not_to have_header("X-Sanitize-Email-Cc", "cc@example.org")
416
+ expect(@email_message).not_to have_header("X-Sanitize-Email-Bcc", "bcc@example.org")
416
417
  end
417
418
  end
418
419
  end
@@ -423,41 +424,40 @@ describe SanitizeEmail do
423
424
  context ":use_actual_environment_prepended_to_subject" do
424
425
  context "true" do
425
426
  before(:each) do
426
- sanitize_spec_dryer('test')
427
- configure_sanitize_email({:use_actual_environment_prepended_to_subject => true})
427
+ configure_sanitize_email({:environment => "{{serverABC}}", :use_actual_environment_prepended_to_subject => true})
428
428
  sanitary_mail_delivery
429
429
  end
430
430
  it "original to is prepended" do
431
- @email_message.should have_subject("[test] original subject")
431
+ expect(@email_message).to have_subject("{{serverABC}} original subject")
432
432
  end
433
433
  it "should not alter non-sanitized attributes" do
434
- @email_message.should have_from('from@example.org')
435
- @email_message.should have_reply_to('reply_to@example.org')
436
- @email_message.should have_body_text('funky fresh')
434
+ expect(@email_message).to have_from('from@example.org')
435
+ expect(@email_message).to have_reply_to('reply_to@example.org')
436
+ expect(@email_message).to have_body_text('funky fresh')
437
437
  end
438
438
  it "should not prepend overrides" do
439
- @email_message.should_not have_to_username("to at sanitize_email.org")
440
- @email_message.should_not have_subject("(to at sanitize_email.org)")
439
+ expect(@email_message).not_to have_to_username("to at sanitize_email.org")
440
+ expect(@email_message).not_to have_subject("(to at sanitize_email.org)")
441
441
  end
442
442
  end
443
443
  context "false" do
444
444
  before(:each) do
445
445
  sanitize_spec_dryer('test')
446
- configure_sanitize_email({:use_actual_environment_prepended_to_subject => false})
446
+ configure_sanitize_email({:environment => "{{serverABC}}", :use_actual_environment_prepended_to_subject => false})
447
447
  sanitary_mail_delivery
448
448
  end
449
449
  it "original to is not prepended" do
450
- @email_message.should_not have_subject("[test] original subject")
451
- @email_message.subject.should eq("original subject")
450
+ expect(@email_message).not_to have_subject("{{serverABC}} original subject")
451
+ expect(@email_message.subject).to eq("original subject")
452
452
  end
453
453
  it "should not alter non-sanitized attributes" do
454
- @email_message.should have_from('from@example.org')
455
- @email_message.should have_reply_to('reply_to@example.org')
456
- @email_message.should have_body_text('funky fresh')
454
+ expect(@email_message).to have_from('from@example.org')
455
+ expect(@email_message).to have_reply_to('reply_to@example.org')
456
+ expect(@email_message).to have_body_text('funky fresh')
457
457
  end
458
458
  it "should not prepend overrides" do
459
- @email_message.should_not have_to_username("to at sanitize_email.org")
460
- @email_message.should_not have_subject("(to at sanitize_email.org)")
459
+ expect(@email_message).not_to have_to_username("to at sanitize_email.org")
460
+ expect(@email_message).not_to have_subject("(to at sanitize_email.org)")
461
461
  end
462
462
  end
463
463
  end
@@ -470,16 +470,16 @@ describe SanitizeEmail do
470
470
  sanitary_mail_delivery
471
471
  end
472
472
  it "original to is prepended" do
473
- @email_message.should have_subject("(to at example.org) original subject")
473
+ expect(@email_message).to have_subject("(to at example.org) original subject")
474
474
  end
475
475
  it "should not alter non-sanitized attributes" do
476
- @email_message.should have_from('from@example.org')
477
- @email_message.should have_reply_to('reply_to@example.org')
478
- @email_message.should have_body_text('funky fresh')
476
+ expect(@email_message).to have_from('from@example.org')
477
+ expect(@email_message).to have_reply_to('reply_to@example.org')
478
+ expect(@email_message).to have_body_text('funky fresh')
479
479
  end
480
480
  it "should not prepend overrides" do
481
- @email_message.should_not have_to_username("to at sanitize_email.org")
482
- @email_message.should_not have_subject("(to at sanitize_email.org)")
481
+ expect(@email_message).not_to have_to_username("to at sanitize_email.org")
482
+ expect(@email_message).not_to have_subject("(to at sanitize_email.org)")
483
483
  end
484
484
  end
485
485
  context "false" do
@@ -489,16 +489,16 @@ describe SanitizeEmail do
489
489
  sanitary_mail_delivery
490
490
  end
491
491
  it "original to is not prepended" do
492
- @email_message.should_not have_subject("(to at example.org) original subject")
492
+ expect(@email_message).not_to have_subject("(to at example.org) original subject")
493
493
  end
494
494
  it "should not alter non-sanitized attributes" do
495
- @email_message.should have_from('from@example.org')
496
- @email_message.should have_reply_to('reply_to@example.org')
497
- @email_message.should have_body_text('funky fresh')
495
+ expect(@email_message).to have_from('from@example.org')
496
+ expect(@email_message).to have_reply_to('reply_to@example.org')
497
+ expect(@email_message).to have_body_text('funky fresh')
498
498
  end
499
499
  it "should not prepend overrides" do
500
- @email_message.should_not have_to_username("to at sanitize_email.org")
501
- @email_message.should_not have_subject("(to at sanitize_email.org)")
500
+ expect(@email_message).not_to have_to_username("to at sanitize_email.org")
501
+ expect(@email_message).not_to have_subject("(to at sanitize_email.org)")
502
502
  end
503
503
  end
504
504
  end
@@ -511,16 +511,16 @@ describe SanitizeEmail do
511
511
  sanitary_mail_delivery
512
512
  end
513
513
  it "original to is munged and prepended" do
514
- @email_message.should have_to_username("to at example.org <to@sanitize_email.org>")
514
+ expect(@email_message).to have_to_username("to at example.org <to@sanitize_email.org>")
515
515
  end
516
516
  it "should not alter non-sanitized attributes" do
517
- @email_message.should have_from('from@example.org')
518
- @email_message.should have_reply_to('reply_to@example.org')
519
- @email_message.should have_body_text('funky fresh')
517
+ expect(@email_message).to have_from('from@example.org')
518
+ expect(@email_message).to have_reply_to('reply_to@example.org')
519
+ expect(@email_message).to have_body_text('funky fresh')
520
520
  end
521
521
  it "should not prepend overrides" do
522
- @email_message.should_not have_to_username("to at sanitize_email.org")
523
- @email_message.should_not have_subject("(to at sanitize_email.org)")
522
+ expect(@email_message).not_to have_to_username("to at sanitize_email.org")
523
+ expect(@email_message).not_to have_subject("(to at sanitize_email.org)")
524
524
  end
525
525
  end
526
526
  context "false" do
@@ -530,16 +530,16 @@ describe SanitizeEmail do
530
530
  sanitary_mail_delivery
531
531
  end
532
532
  it "original to is not prepended" do
533
- @email_message.should_not have_to_username("to at example.org <to@sanitize_email.org>")
533
+ expect(@email_message).not_to have_to_username("to at example.org <to@sanitize_email.org>")
534
534
  end
535
535
  it "should not alter non-sanitized attributes" do
536
- @email_message.should have_from('from@example.org')
537
- @email_message.should have_reply_to('reply_to@example.org')
538
- @email_message.should have_body_text('funky fresh')
536
+ expect(@email_message).to have_from('from@example.org')
537
+ expect(@email_message).to have_reply_to('reply_to@example.org')
538
+ expect(@email_message).to have_body_text('funky fresh')
539
539
  end
540
540
  it "should not prepend overrides" do
541
- @email_message.should_not have_to_username("to at sanitize_email.org")
542
- @email_message.should_not have_subject("(to at sanitize_email.org)")
541
+ expect(@email_message).not_to have_to_username("to at sanitize_email.org")
542
+ expect(@email_message).not_to have_subject("(to at sanitize_email.org)")
543
543
  end
544
544
  end
545
545
  end
@@ -553,36 +553,36 @@ describe SanitizeEmail do
553
553
  before(:each) do
554
554
  sanitize_spec_dryer('test')
555
555
  configure_sanitize_email({:local_environments => ['test']})
556
- SanitizeEmail[:activation_proc].call.should == true
556
+ expect(SanitizeEmail[:activation_proc].call).to eq(true)
557
557
  mail_delivery
558
558
  end
559
559
  it "should not alter non-sanitized attributes" do
560
- @email_message.should have_from('from@example.org')
561
- @email_message.should have_reply_to('reply_to@example.org')
562
- @email_message.should have_body_text('funky fresh')
560
+ expect(@email_message).to have_from('from@example.org')
561
+ expect(@email_message).to have_reply_to('reply_to@example.org')
562
+ expect(@email_message).to have_body_text('funky fresh')
563
563
  end
564
564
  it "should use activation_proc for matching environment" do
565
- @email_message.should have_to("to@sanitize_email.org")
566
- @email_message.should have_cc("cc@sanitize_email.org")
567
- @email_message.should have_bcc("bcc@sanitize_email.org")
565
+ expect(@email_message).to have_to("to@sanitize_email.org")
566
+ expect(@email_message).to have_cc("cc@sanitize_email.org")
567
+ expect(@email_message).to have_bcc("bcc@sanitize_email.org")
568
568
  end
569
569
  end
570
570
  context "non-matching" do
571
571
  before(:each) do
572
572
  sanitize_spec_dryer('production')
573
573
  configure_sanitize_email({:local_environments => ['development']}) # Won't match!
574
- SanitizeEmail[:activation_proc].call.should == false
574
+ expect(SanitizeEmail[:activation_proc].call).to eq(false)
575
575
  mail_delivery
576
576
  end
577
577
  it "should not alter non-sanitized attributes" do
578
- @email_message.should have_from('from@example.org')
579
- @email_message.should have_reply_to('reply_to@example.org')
580
- @email_message.should have_body_text('funky fresh')
578
+ expect(@email_message).to have_from('from@example.org')
579
+ expect(@email_message).to have_reply_to('reply_to@example.org')
580
+ expect(@email_message).to have_body_text('funky fresh')
581
581
  end
582
582
  it "should use activation_proc for non-matching environment" do
583
- @email_message.should have_to("to@example.org")
584
- @email_message.should have_cc("cc@example.org")
585
- @email_message.should have_bcc("bcc@example.org")
583
+ expect(@email_message).to have_to("to@example.org")
584
+ expect(@email_message).to have_cc("cc@example.org")
585
+ expect(@email_message).to have_bcc("bcc@example.org")
586
586
  end
587
587
  end
588
588
  end
@@ -594,12 +594,12 @@ describe SanitizeEmail do
594
594
  sanitary_mail_delivery
595
595
  end
596
596
  it "should not alter non-sanitized attributes" do
597
- @email_message.should have_from('from@example.org')
598
- @email_message.should have_reply_to('reply_to@example.org')
599
- @email_message.should have_body_text('funky fresh')
597
+ expect(@email_message).to have_from('from@example.org')
598
+ expect(@email_message).to have_reply_to('reply_to@example.org')
599
+ expect(@email_message).to have_body_text('funky fresh')
600
600
  end
601
601
  it "used as sanitized_to" do
602
- @email_message.should have_to("barney@sanitize_email.org")
602
+ expect(@email_message).to have_to("barney@sanitize_email.org")
603
603
  end
604
604
  end
605
605
 
@@ -611,12 +611,12 @@ describe SanitizeEmail do
611
611
  mail_delivery
612
612
  end
613
613
  it "should not alter non-sanitized attributes" do
614
- @email_message.should have_from('from@example.org')
615
- @email_message.should have_reply_to('reply_to@example.org')
616
- @email_message.should have_body_text('funky fresh')
614
+ expect(@email_message).to have_from('from@example.org')
615
+ expect(@email_message).to have_reply_to('reply_to@example.org')
616
+ expect(@email_message).to have_body_text('funky fresh')
617
617
  end
618
618
  it "should not alter normally sanitized attributes" do
619
- @email_message.should have_to("to@example.org")
619
+ expect(@email_message).to have_to("to@example.org")
620
620
  end
621
621
  end
622
622
 
@@ -5,6 +5,7 @@ require 'mail'
5
5
  require 'rails'
6
6
  require 'letter_opener'
7
7
  require 'action_mailer'
8
+ require 'pry'
8
9
 
9
10
  # For code coverage, must be required before all application / gem / library code.
10
11
  require 'coveralls'
@@ -19,10 +20,6 @@ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
19
20
 
20
21
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
21
22
  RSpec.configure do |config|
22
- config.treat_symbols_as_metadata_keys_with_true_values = true
23
- config.run_all_when_everything_filtered = true
24
- config.filter_run :focus
25
-
26
23
  config.include SanitizeEmail::RspecMatchers
27
24
  end
28
25
 
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.1.5
4
+ version: 1.1.6
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: 2015-03-10 00:00:00.000000000 Z
13
+ date: 2015-08-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -74,14 +74,14 @@ dependencies:
74
74
  requirements:
75
75
  - - ">="
76
76
  - !ruby/object:Gem::Version
77
- version: '2.11'
77
+ version: '3'
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - ">="
83
83
  - !ruby/object:Gem::Version
84
- version: '2.11'
84
+ version: '3'
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: mail
87
87
  requirement: !ruby/object:Gem::Requirement
@@ -152,6 +152,20 @@ dependencies:
152
152
  - - ">="
153
153
  - !ruby/object:Gem::Version
154
154
  version: '0'
155
+ - !ruby/object:Gem::Dependency
156
+ name: pry
157
+ requirement: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - ">="
160
+ - !ruby/object:Gem::Version
161
+ version: '0'
162
+ type: :development
163
+ prerelease: false
164
+ version_requirements: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - ">="
167
+ - !ruby/object:Gem::Version
168
+ version: '0'
155
169
  - !ruby/object:Gem::Dependency
156
170
  name: coveralls
157
171
  requirement: !ruby/object:Gem::Requirement
@@ -229,12 +243,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
229
243
  version: '0'
230
244
  requirements: []
231
245
  rubyforge_project:
232
- rubygems_version: 2.4.2
246
+ rubygems_version: 2.4.5.1
233
247
  signing_key:
234
248
  specification_version: 4
235
- summary: 'Rails/Sinatra/Mail gem: Test email abilities without ever sending a message
236
- to actual live addresses'
249
+ summary: Email Condom for your Ruby Server
237
250
  test_files:
238
251
  - spec/sanitize_email_spec.rb
239
252
  - spec/spec_helper.rb
240
- has_rdoc: