mail_plugger 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +2 -0
- data/lib/fake_plugger/delivery_method.rb +6 -4
- data/lib/mail_plugger/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ac25a71939ed021c1dafe8a7bba411205c9b9d597a9d46aa88ff60f3356155e
|
4
|
+
data.tar.gz: 92c49ac159e88bc093b04568bf9d69db0a645ff4c1b4e3fe40e7e6fed0be8853
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d62b1e577193fb89879dee0010e86c2dd88a3cceda7303f3d2c79a3258ec055dbc41397facf0f8098825dd1756d7359fc005af0e124efe6134d0c79e1b57d2df
|
7
|
+
data.tar.gz: 7657ff6afd711506a7fa5073473d55775f8cb9519626c5a1684576585e6afb385825c563ee0f2453bb9ccfde9a945f2b22e9a8390fb431fba7dd0c9b769e4f8b
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
3
|
|
4
|
+
## 1.1.1 (2021-01-21)
|
5
|
+
|
6
|
+
### Changes
|
7
|
+
|
8
|
+
* Change FakePlugger::DeliveryMethod to returns with the extracted delivery data instead of the message object.
|
9
|
+
* Update code documentations.
|
10
|
+
* Add missing FakePlugger description in the README.md.
|
11
|
+
|
12
|
+
|
4
13
|
## 1.1.0 (2021-01-18)
|
5
14
|
|
6
15
|
### New features
|
data/README.md
CHANGED
@@ -44,6 +44,8 @@ Or install it yourself as:
|
|
44
44
|
|
45
45
|
# F<img src="https://raw.githubusercontent.com/norbertszivos/mail_plugger/main/images/fake_plugger800x500.png" height="22" />kePlugger
|
46
46
|
|
47
|
+
**FakePlugger** is a delivery method to mock **MailPlugger**. It is working similarly like **MailPlugger**, but it won't send any emails (but if we would like it is possible, just we should do manually). Also it can write out debug informations or we can manipulate the response with it.
|
48
|
+
|
47
49
|
## Usage
|
48
50
|
|
49
51
|
- [How to use FakePlugger::DeliveryMethod class](https://github.com/norbertszivos/mail_plugger/blob/main/docs/usage_of_fake_plugger_delivery_method.md)
|
@@ -44,8 +44,8 @@ module FakePlugger
|
|
44
44
|
# 'delivery_options'. After that it generates a hash with these data and
|
45
45
|
# returns with the provided client class which has a 'deliver' method, but
|
46
46
|
# it won't call the 'deliver' method.
|
47
|
-
# If the 'response' parameter is a hash with '
|
48
|
-
# it will retrun with the
|
47
|
+
# If the 'response' parameter is a hash with 'return_delivery_data: true'
|
48
|
+
# then it will retrun with the extracted delivery data.
|
49
49
|
# If the 'response' parameter is not nil then retruns with that given data
|
50
50
|
# without call any other methods.
|
51
51
|
# Except if 'debug' is true. In this case it will call those methods which
|
@@ -55,7 +55,7 @@ module FakePlugger
|
|
55
55
|
#
|
56
56
|
# @param [Mail::Message] message what we would like to send
|
57
57
|
#
|
58
|
-
# @return [Mail::Message/Hash]
|
58
|
+
# @return [Mail::Message/Hash] depends on the given value
|
59
59
|
#
|
60
60
|
# @example
|
61
61
|
#
|
@@ -106,7 +106,9 @@ module FakePlugger
|
|
106
106
|
# Return with a response which depends on the conditions.
|
107
107
|
def return_with_response
|
108
108
|
return client.new(delivery_data) if @response.nil?
|
109
|
-
|
109
|
+
if @response.is_a?(Hash) && @response[:return_delivery_data]
|
110
|
+
return delivery_data
|
111
|
+
end
|
110
112
|
|
111
113
|
@response
|
112
114
|
end
|
data/lib/mail_plugger/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mail_plugger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Norbert Szivós
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mail
|