capistrano-mailgun 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.
- data/lib/capistrano-mailgun/version.rb +1 -1
- data/lib/capistrano-mailgun.rb +16 -13
- metadata +1 -1
data/lib/capistrano-mailgun.rb
CHANGED
@@ -42,23 +42,26 @@ module Capistrano
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
-
Capistrano::Configuration.instance
|
46
|
-
Capistrano.
|
45
|
+
if Capistrano::Configuration.instance
|
46
|
+
Capistrano::Configuration.instance.load do
|
47
|
+
Capistrano.plugin :mailgun, Capistrano::Mailgun
|
47
48
|
|
48
|
-
|
49
|
+
set(:mailgun_subject) { "[Deployment] #{ application.capitalize } completed" }
|
49
50
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
set(:mailgun_api_key) { abort "Please set mailgun_api_key accordingly" }
|
52
|
+
set(:mailgun_domain) { abort "Please set mailgun_domain accordingly" }
|
53
|
+
set(:mailgun_from) { abort "Please set mailgun_from to your desired From field" }
|
54
|
+
set(:mailgun_recipients) { abort "Please specify mailgun_recipients" }
|
55
|
+
set(:mailgun_recipient_domain) { abort "Please set mailgun_recipient_domain accordingly" }
|
55
56
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
57
|
+
set(:deployer_username) do
|
58
|
+
if fetch(:scm, nil).to_sym == :git
|
59
|
+
`git config user.name`.chomp
|
60
|
+
else
|
61
|
+
`whoami`.chomp
|
62
|
+
end
|
61
63
|
end
|
64
|
+
|
62
65
|
end
|
63
66
|
|
64
67
|
end
|