capistrano-notifier 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -4
- data/lib/capistrano/notifier/mail.rb +1 -1
- data/lib/capistrano/notifier/version.rb +1 -1
- data/spec/capistrano/notifier/mail_spec.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dd29f8a4e8e64a3b2f5331dc1540aeee98bb547
|
4
|
+
data.tar.gz: 3be296af518083ef34cd9a9f735f7574883ab1c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1109ac5eaddb8f52a1c2e738135d7245c76962f2928d0d5af2c45545a8e23e6ea4a812d36f4dd3f92ce5b0fd08df940b75044e6ceb6e65f1def88f53b4a913a
|
7
|
+
data.tar.gz: dc2e6ab74f3f1f4ec73e09aa76f1195acdd1c608c0607dcda814df2120928f97f13aecfa8642de594f8cd71f7f82bbefc70da0af809ce4a9a735443856863530
|
data/README.md
CHANGED
@@ -23,10 +23,11 @@ with `bundle install --binstubs` and making sure `bin` is high up in your
|
|
23
23
|
require 'capistrano/notifier/mail'
|
24
24
|
|
25
25
|
set :notifier_mail_options, {
|
26
|
-
:method
|
27
|
-
:from
|
28
|
-
:to
|
29
|
-
:
|
26
|
+
:method => :test, # :smtp, :sendmail, or any other valid ActionMailer delivery method
|
27
|
+
:from => 'capistrano@domain.com',
|
28
|
+
:to => ['john@doe.com', 'jane@doe.com'],
|
29
|
+
:subject => "Successfully deployed #{application.titleize} to #{stage}", # OPTIONAL
|
30
|
+
:github => 'MyCompany/project-name'
|
30
31
|
}
|
31
32
|
```
|
32
33
|
|
@@ -116,7 +116,7 @@ class Capistrano::Notifier::Mail < Capistrano::Notifier::Base
|
|
116
116
|
end
|
117
117
|
|
118
118
|
def subject
|
119
|
-
"#{application.titleize} branch #{branch} deployed to #{stage}"
|
119
|
+
cap.notifier_mail_options[:subject] || "#{application.titleize} branch #{branch} deployed to #{stage}"
|
120
120
|
end
|
121
121
|
|
122
122
|
def template(template_name)
|
@@ -99,6 +99,16 @@ describe Capistrano::Notifier::Mail do
|
|
99
99
|
subject.send(:subject).should == "Example branch master deployed to test"
|
100
100
|
end
|
101
101
|
|
102
|
+
context 'with a custom subject' do
|
103
|
+
it 'uses a custom subject' do
|
104
|
+
configuration.load do |configuration|
|
105
|
+
set :notifier_mail_options, subject: 'test'
|
106
|
+
end
|
107
|
+
|
108
|
+
expect(subject.send(:subject)).to eq 'test'
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
102
112
|
it 'should work with gitlab' do
|
103
113
|
configuration.load do |configuration|
|
104
114
|
set :notifier_mail_options, {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-notifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Campbell
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-03-
|
12
|
+
date: 2014-03-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionmailer
|