fastlane-plugin-outlook 0.1.0 → 0.1.1

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: 68505646ce53089459b78ee5fa7cdeea65fe73a25b4f3cffd245391b6c7b5fca
4
- data.tar.gz: 4ab702ba717bff655532d1a35d6cff1a818af9e646dbc4ddb70fa57ff1204136
3
+ metadata.gz: 973714c28b098cea099c9c849d1f01497eaf8b8e3c77ffe747297af965cd78d9
4
+ data.tar.gz: bb536d2490c63049b379ae20ddddc54e0e13b8239c7565219369c71ad5c4407b
5
5
  SHA512:
6
- metadata.gz: 858ba1e9b948f025d57fe4fb6bf1faf7c194bc5f1589b1da58a96e4511cdbfed8b70892cd3d1e6f091cd28a08b882e460bb679e758b73ff736ca9672c359fac1
7
- data.tar.gz: b3abbc3e5836258e282539b5384d7b235a4f0eb438e43f1e4d3a5580f29245ce1ea4aff4ea871ba59c4c6394f78eec9f8ac610c29d6b58009abec454b5085af3
6
+ metadata.gz: b94073a244b326e72c592a1df7c328359b4759256f28a3cae3229a817e00a34b9783940b7629bae3a1f9ce3026240b67df7d0df1c4b80e3d9ee41e1a432db12a
7
+ data.tar.gz: f93927501be8227028de3acf4c6110ebc1b0aa7a66f078902ede3b355fe2343d52c3d2b4a7f15d609ca66390be3df8112044a979126cb65edb616e286a87040b
@@ -5,7 +5,37 @@ module Fastlane
5
5
  module Actions
6
6
  class OutlookAction < Action
7
7
  def self.run(params)
8
- UI.message("The outlook plugin is working!")
8
+ require 'mail'
9
+
10
+ Mail.defaults do
11
+ if params[:password]
12
+ delivery_method :smtp, {
13
+ address: 'smtp.gmail.com',
14
+ port: 587,
15
+ user_name: params[:username],
16
+ password: params[:password],
17
+ authentication: 'plain',
18
+ enable_starttls_auto: true
19
+ }
20
+ else
21
+ delivery_method :smtp, {
22
+ port: 587,
23
+ address: "smtp-relay.gmail.com",
24
+ domain: params[:domain]
25
+ }
26
+ end
27
+ end
28
+
29
+ Mail.deliver do
30
+ from params[:username]
31
+ to params[:to]
32
+ cc params[:cc]
33
+ subject params[:subject]
34
+ html_part do
35
+ content_type 'text/html; charset=UTF-8'
36
+ body params[:body]
37
+ end
38
+ end
9
39
  end
10
40
 
11
41
  def self.description
@@ -27,11 +57,56 @@ module Fastlane
27
57
 
28
58
  def self.available_options
29
59
  [
30
- # FastlaneCore::ConfigItem.new(key: :your_option,
31
- # env_name: "OUTLOOK_YOUR_OPTION",
32
- # description: "A description of your option",
33
- # optional: false,
34
- # type: String)
60
+ FastlaneCore::ConfigItem.new(key: :domain,
61
+ env_name: "FL_GMAIL_DOMAIN",
62
+ description: "G Suite domain",
63
+ optional: true,
64
+ default_value: "gmail.com",
65
+ verify_block: proc do |value|
66
+ UI.user_error!("No domain") if value.to_s.length == 0
67
+ end),
68
+ FastlaneCore::ConfigItem.new(key: :username,
69
+ env_name: "FL_GMAIL_USERNAME",
70
+ description: "Username for gmail",
71
+ verify_block: proc do |value|
72
+ UI.user_error!("No username") if value.to_s.length == 0
73
+ end),
74
+ FastlaneCore::ConfigItem.new(key: :password,
75
+ env_name: "FL_GMAIL_PASSWORD",
76
+ description: "Password for gmail",
77
+ optional: true,
78
+ sensitive: true,
79
+ verify_block: proc do |value|
80
+ UI.user_error!("No password") if value.to_s.length == 0
81
+ end),
82
+ FastlaneCore::ConfigItem.new(key: :to,
83
+ env_name: "FL_GMAIL_TO",
84
+ description: "Mail to recipients",
85
+ sensitive: true,
86
+ is_string: false,
87
+ verify_block: proc do |value|
88
+ UI.user_error!("No recipients") if value.to_s.length == 0
89
+ end),
90
+ FastlaneCore::ConfigItem.new(key: :cc,
91
+ env_name: "FL_GMAIL_CC",
92
+ description: "Mail cc recipients",
93
+ sensitive: true,
94
+ is_string: false,
95
+ optional: true),
96
+ FastlaneCore::ConfigItem.new(key: :subject,
97
+ env_name: "FL_GMAIL_SUBJECT",
98
+ description: "The subject of the email",
99
+ sensitive: true,
100
+ verify_block: proc do |value|
101
+ UI.user_error!("No subject of email") if value.to_s.length == 0
102
+ end),
103
+ FastlaneCore::ConfigItem.new(key: :body,
104
+ env_name: "FL_GMAIL_BODY",
105
+ description: "The body of the email",
106
+ sensitive: true,
107
+ verify_block: proc do |value|
108
+ UI.user_error!("No body of email") if value.to_s.length == 0
109
+ end)
35
110
  ]
36
111
  end
37
112
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Outlook
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-outlook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OTVENTURES\Tarek.Mohammed