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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d9227ceb01d7add2fed25486430cd6e0b5da2a7
4
- data.tar.gz: 529fa6ce30beff4acc1ae87183cc7c20fb0c8e35
3
+ metadata.gz: 9dd29f8a4e8e64a3b2f5331dc1540aeee98bb547
4
+ data.tar.gz: 3be296af518083ef34cd9a9f735f7574883ab1c4
5
5
  SHA512:
6
- metadata.gz: 66b2281400a6d5b61d02959e57adb11060f93fec8b600d11a8d9eef444054fc714a3a16e4015931d643ad6cfba19688d352ace8ec1c0f66a65478a91f2d2c39c
7
- data.tar.gz: 916d98341f09ae07879b2e395af6d723a39510d7dc18565056ea984a77f9cbd5ef48d7870a076e73a2a59692e6738ee44110510246ac11d37337fbda68ff6a2a
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 => :test, # :smtp, :sendmail, or any other valid ActionMailer delivery method
27
- :from => 'capistrano@domain.com',
28
- :to => ['john@doe.com', 'jane@doe.com'],
29
- :github => 'MyCompany/project-name'
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)
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Notifier
3
- VERSION = '0.3.0'
3
+ VERSION = '0.4.0'
4
4
  end
5
5
  end
@@ -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.3.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-07 00:00:00.000000000 Z
12
+ date: 2014-03-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionmailer