fastlane-plugin-gmail_notify 0.1.2 → 0.1.3

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: ad31026dd478b6c8d648ecbecc922ffc5d0d63833fd3a1a08cfd1ed8f3102cb3
4
+ data.tar.gz: 6f2ecf816e9a80246cc199fd5ee10ee9518385e4bcd7abf041239748a189047a
5
5
  SHA512:
6
- metadata.gz: ab3580acfad95be0036c468be8ad0c0fc1b90f917fc87b1c1b9922485815632f4268f5fc182b5c1413f2cee771d5a4112bc511fc47c93f76d9fc7421c904108a
7
- data.tar.gz: ee469e09ca07b1ef7a1128ac4c4e7d44bf5292c9f20f33f636c4d40b46f4999595ca22d30dc961f10a6354e08ed99d1968b2272dbb74964c6c07062d7ece5b13
6
+ metadata.gz: c74c93a9bfc88377e0af44f23a14908c783e176d6cd769fe665fac6e98f1d06a3626980bcddd933e1b975f11cea5172ef3b66a0fefcd2c3e965ed2c026c86b30
7
+ data.tar.gz: 4a02e606937aea78192fb2d371c3a14d77c1a621ca1399ad126e569561db860ce9e26e6e09f1ef64226487206cf5973f53b0bce7cef5727a9ce1733d064414ed
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,7 +13,10 @@ 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],
@@ -30,6 +33,15 @@ module Fastlane
30
33
  domain: "localhost.localdomain" # the HELO domain provided by the client to the server
31
34
  }
32
35
  })
36
+ rescue Net::ReadTimeout
37
+ if (retries += 1) < 5
38
+ puts("retrying ##{retries}")
39
+ sleep(5)
40
+ retry
41
+ else
42
+ raise
43
+ end
44
+ end
33
45
  end
34
46
 
35
47
  def self.test(params)
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module GmailNotify
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
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.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antony Leons
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-14 00:00:00.000000000 Z
11
+ date: 2023-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pony