fastlane-plugin-outlook 0.1.0 → 0.1.2

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: 68505646ce53089459b78ee5fa7cdeea65fe73a25b4f3cffd245391b6c7b5fca
4
- data.tar.gz: 4ab702ba717bff655532d1a35d6cff1a818af9e646dbc4ddb70fa57ff1204136
3
+ metadata.gz: 94a8f856781437326fdbab8e3ffacbc26ae5025579b28d84efe9095ee6b83d42
4
+ data.tar.gz: 190c9b324246a752b43977ddaf5ea532e029c04bbfe8abc74af94928da117bd4
5
5
  SHA512:
6
- metadata.gz: 858ba1e9b948f025d57fe4fb6bf1faf7c194bc5f1589b1da58a96e4511cdbfed8b70892cd3d1e6f091cd28a08b882e460bb679e758b73ff736ca9672c359fac1
7
- data.tar.gz: b3abbc3e5836258e282539b5384d7b235a4f0eb438e43f1e4d3a5580f29245ce1ea4aff4ea871ba59c4c6394f78eec9f8ac610c29d6b58009abec454b5085af3
6
+ metadata.gz: 52dcd44dc7751f67d3dd9afbbb7b7189ae93ff97ccb21c18ba6a5a8e7efb042f3308b2541b65e3e3efca28dab1f6854e2a8c9225d7a5090a2506a332fca3beea
7
+ data.tar.gz: de9b4a75813f9d24dc7bffa191b88989de7ecbc8b82a7f39da80480d5537027f722a74300f898319186efa7ee2a1e844c2a30157dbf01ef64ec4dcadafb32807
@@ -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-mail.outlook.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.2"
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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - OTVENTURES\Tarek.Mohammed