postmortem 0.3.0 → 0.3.1

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
  SHA256:
3
- metadata.gz: 392b6ef4cac284e02ae21acd23b737906f94bf3c773e993014b80119362c1baa
4
- data.tar.gz: 14a5a9c5dcbc2183509cb25980db6f11243c7f8a4c188ac554787b641af22246
3
+ metadata.gz: 30402889e14ab2f3f3610b81e9c9599e62386069b4661d3b9d37705dbf6f005e
4
+ data.tar.gz: b7ebefa76d21b584fb9e9518944e820c1946d108c6dd804b4afab57c10029022
5
5
  SHA512:
6
- metadata.gz: 87a903410410a13c9f9ebce938e9b6f662ade52e88904d69c5335b46f0fdeab31ee4f508a3d8959d6d92ce9497bccdefef34ad85eb25f7748f7df2dbb087e61a
7
- data.tar.gz: efd1d6a97c1c0f6611872d669752ef59db43767d41bb644eb44b0642063d5dfc606ed611319165151c309c217bc7812487b5b9a23af969cc0ee8ae4523e41145
6
+ metadata.gz: fcf088bc9e0df4f23ef3ef95180269cc72572abf056bf7b7af5eda5047f4d04c27764b9ea20bae7621d1d40aa296fa18a4632f1eb742b71e634da4ab101b93af
7
+ data.tar.gz: 3d443e64524fbc3a594f1d042b8a8d384993f8ee27061b1fc5835795b7019e70aebe2e79d7c4ace3c35074a99d4c6f5b1443877283858f6c6e51d585429a2c68
data/README.md CHANGED
@@ -19,6 +19,7 @@ _PostMortem_ should only be enabled in test or development environments.
19
19
  * Local images are located and embedded in HTML so you can see the full version of outgoing emails.
20
20
  * Runs without a server - single page app runs on file system with no need to run a local web server to access UI.
21
21
  * Any captured email can be downloaded into a standalone HTML file which can be shared with others.
22
+ * Similarly, any captured eamil can also be uploaded to a stanadlone version of _Postmortem_ at https://postmortem.delivery/<unique-id>
22
23
 
23
24
  ## Installation
24
25
 
@@ -26,7 +27,7 @@ Add the gem to your application's Gemfile:
26
27
 
27
28
  ```ruby
28
29
  group :development, :test do
29
- gem 'postmortem', '~> 0.3.0'
30
+ gem 'postmortem', '~> 0.3.1'
30
31
  end
31
32
  ```
32
33
 
@@ -6,10 +6,14 @@ module Pony
6
6
  alias _original_mail mail
7
7
 
8
8
  def mail(options)
9
- # SMTP delivery is handled by Mail plugin further down the stack
10
- return _original_mail(options) if options[:via].to_s == 'smtp'
9
+ strategy = options[:via].to_s
10
+ # Pony uses the Mail gem for smtp delivery so we catch these further down the stack to
11
+ # avoid duplicating deliveries.
12
+ return _original_mail(options) if strategy == 'smtp'
11
13
 
12
- result = _original_mail(options) unless Postmortem.config.mail_skip_delivery
14
+ # When delivery method is "test" we do not want to interfere as ActionMailer.deliveries
15
+ # (which delegates to Mail::TestMailer) is typically used in tests.
16
+ result = _original_mail(options) if strategy == 'test' || !Postmortem.config.mail_skip_delivery
13
17
  Postmortem.record_delivery(Postmortem::Adapters::Pony.new(options))
14
18
  result
15
19
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Postmortem
4
- VERSION = '0.3.0'
4
+ VERSION = '0.3.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postmortem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Farrell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-15 00:00:00.000000000 Z
11
+ date: 2021-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mail