fastlane-plugin-gmail_notify 0.1.2 → 0.1.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13018242812fe23f0a5750965dcf0a0d213350f0c4e49f057d2355b0a0cf1ae5
|
4
|
+
data.tar.gz: 8681586314183993a48376ba3a6ef3b17da93d52b12b55d2120c518fee4eb4be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3145160cdb630ff00daaf6919a8757fcae55bf69982129d858e99c853bd6eba130a1601ffaf06fbbf622afe7801557de89a58c40440aa8fa397b235246f2f03
|
7
|
+
data.tar.gz: 496501aa3f6da39c042e711b21e09be81e83463f8be29e18ab3a3f6cc332baaa5899bdad374903bab7c9da8fedb434d3bfc48e6460c1d8a9fd2044d6f70e24b1
|
data/README.md
CHANGED
@@ -14,13 +14,40 @@ fastlane add_plugin gmail_notify
|
|
14
14
|
|
15
15
|
Sends a mail using SMTP
|
16
16
|
|
17
|
-
|
17
|
+
`gmail_notify` allows you to send a gmail using smtp so that you can notify the team about a new release.
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
To get started you must have a gmail and [app password](https://knowledge.workspace.google.com/kb/how-to-generate-an-app-passwords-000009237) generated.
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
gmail_notify(
|
25
|
+
smtp_email: "<sender email>",
|
26
|
+
smtp_password: "<app password>",
|
27
|
+
recipients: "<recipients comma separated>",
|
28
|
+
cc: "<cc>",
|
29
|
+
subject: "<gmail subject>",
|
30
|
+
template_file: "<path to mail template>",
|
31
|
+
placeholders: {
|
32
|
+
var1: "world"
|
33
|
+
}
|
34
|
+
)
|
35
|
+
```
|
36
|
+
|
37
|
+
The mail body is constructed using a [html template](template.html) file. The value for variables in the template file can be provided in the placeholder hash.
|
18
38
|
|
19
|
-
|
39
|
+
### Parameters
|
20
40
|
|
21
|
-
|
41
|
+
| Key | Description |
|
42
|
+
|-----------------|--------------------|
|
43
|
+
| `smtp_email` | Email account for smtp authentication (Sender's email) |
|
44
|
+
| `smtp_password` | Password for smtp authentication |
|
45
|
+
| `recipients` | Comma separated list of recipients |
|
46
|
+
| `cc` | Comma separated list of cc |
|
47
|
+
| `subject` | Email subject |
|
48
|
+
| `template_file` | Path to template file |
|
49
|
+
| `placeholders` | Hash that contains value of variables in the template |
|
22
50
|
|
23
|
-
**Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
|
24
51
|
|
25
52
|
## Run tests for this plugin
|
26
53
|
|
@@ -13,11 +13,15 @@ module Fastlane
|
|
13
13
|
|
14
14
|
body = ERB.new(File.read(params[:template_file]), trim_mode: nil).result_with_hash(params[:placeholders])
|
15
15
|
|
16
|
-
|
16
|
+
begin
|
17
|
+
retries ||= 0
|
18
|
+
|
19
|
+
Pony.mail({
|
17
20
|
to: params[:recipients],
|
18
21
|
cc: params[:cc],
|
19
22
|
subject: params[:subject],
|
20
23
|
html_body: body,
|
24
|
+
attachments: { "lintReport.html" => File.read(:lint_report) },
|
21
25
|
body_part_header: { content_disposition: "inline" },
|
22
26
|
via: :smtp,
|
23
27
|
via_options: {
|
@@ -30,6 +34,15 @@ module Fastlane
|
|
30
34
|
domain: "localhost.localdomain" # the HELO domain provided by the client to the server
|
31
35
|
}
|
32
36
|
})
|
37
|
+
rescue Net::ReadTimeout
|
38
|
+
if (retries += 1) < 5
|
39
|
+
puts("retrying ##{retries}")
|
40
|
+
sleep(5)
|
41
|
+
retry
|
42
|
+
else
|
43
|
+
raise
|
44
|
+
end
|
45
|
+
end
|
33
46
|
end
|
34
47
|
|
35
48
|
def self.test(params)
|
@@ -89,6 +102,11 @@ module Fastlane
|
|
89
102
|
description: "Path of template file",
|
90
103
|
optional: false,
|
91
104
|
type: String),
|
105
|
+
FastlaneCore::ConfigItem.new(key: :lint_report,
|
106
|
+
env_name: "GMAIL_NOTIFY_LINT_REPORT_FILE",
|
107
|
+
description: "Path of lint report file",
|
108
|
+
optional: false,
|
109
|
+
type: String),
|
92
110
|
FastlaneCore::ConfigItem.new(key: :placeholders,
|
93
111
|
env_name: "GMAIL_NOTIFY_TEMPLATE_PLACEHOLDERS",
|
94
112
|
description: "Placeholders for email template",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-gmail_notify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antony Leons
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pony
|
@@ -164,7 +164,7 @@ dependencies:
|
|
164
164
|
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
|
-
description:
|
167
|
+
description:
|
168
168
|
email: antonyleons@qburst.com
|
169
169
|
executables: []
|
170
170
|
extensions: []
|
@@ -180,7 +180,7 @@ homepage: https://github.com/antonio2904/fastlane-plugin-gmail_notify
|
|
180
180
|
licenses:
|
181
181
|
- MIT
|
182
182
|
metadata: {}
|
183
|
-
post_install_message:
|
183
|
+
post_install_message:
|
184
184
|
rdoc_options: []
|
185
185
|
require_paths:
|
186
186
|
- lib
|
@@ -195,8 +195,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
195
|
- !ruby/object:Gem::Version
|
196
196
|
version: '0'
|
197
197
|
requirements: []
|
198
|
-
rubygems_version: 3.
|
199
|
-
signing_key:
|
198
|
+
rubygems_version: 3.3.5
|
199
|
+
signing_key:
|
200
200
|
specification_version: 4
|
201
201
|
summary: Sends a mail using SMTP
|
202
202
|
test_files: []
|