fastlane-plugin-gmail_notify 0.1.2 → 0.1.4

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: 11eb92c91ec2c321fd6bb98a34eea0344bf2d47d4bdf9360a73c8b792642ad60
4
- data.tar.gz: f50b36732ce423bfefe9b247b727103b36dcc13d233fdcfedaf09ee1c32a92c2
3
+ metadata.gz: 13018242812fe23f0a5750965dcf0a0d213350f0c4e49f057d2355b0a0cf1ae5
4
+ data.tar.gz: 8681586314183993a48376ba3a6ef3b17da93d52b12b55d2120c518fee4eb4be
5
5
  SHA512:
6
- metadata.gz: ab3580acfad95be0036c468be8ad0c0fc1b90f917fc87b1c1b9922485815632f4268f5fc182b5c1413f2cee771d5a4112bc511fc47c93f76d9fc7421c904108a
7
- data.tar.gz: ee469e09ca07b1ef7a1128ac4c4e7d44bf5292c9f20f33f636c4d40b46f4999595ca22d30dc961f10a6354e08ed99d1968b2272dbb74964c6c07062d7ece5b13
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
- **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
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
- ## Example
39
+ ### Parameters
20
40
 
21
- Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
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
- Pony.mail({
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",
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module GmailNotify
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
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.2
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: 2023-08-14 00:00:00.000000000 Z
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.4.18
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: []