Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' into fix-require-paths

  • Loading branch information...
commit 09e00ef469053ddc8aff64fb461345ff38d58937 2 parents e18cd0d + dabc367
@justincampbell justincampbell authored
View
4 lib/capistrano/notifier/base.rb
@@ -9,10 +9,6 @@ def application
cap.application
end
- def application_name
- cap.application.titleize
- end
-
def branch
cap.branch
end
View
4 lib/capistrano/notifier/mail.rb
@@ -36,7 +36,7 @@ def perform
def body
<<-BODY.gsub(/^ {6}/, '')
#{user_name} deployed
- #{application_name} branch
+ #{application.titleize} branch
#{branch} to
#{stage} on
#{now.strftime("%m/%d/%Y")} at
@@ -80,7 +80,7 @@ def notify_method
end
def subject
- "#{application} branch #{branch} deployed to #{stage}"
+ "#{application.titleize} branch #{branch} deployed to #{stage}"
end
def text
View
4 spec/capistrano/notifier/mail_spec.rb
@@ -34,6 +34,10 @@
it { subject.send(:from).should == 'sender@example.com' }
it { subject.send(:to).should == 'example@example.com' }
+ it "creates a subject" do
+ subject.send(:subject).should == "Example branch master deployed to test"
+ end
+
it "renders a plaintext email" do
subject.send(:body).should == <<-BODY.gsub(/^ {6}/, '')
John Doe deployed
View
12 spec/capistrano/notifier/statsd_spec.rb
@@ -73,4 +73,16 @@
it { subject.send(:with).should == "1|g" }
end
+
+ context "with an uppercase application" do
+ before :each do
+ configuration.load do
+ set :application, 'Example'
+ end
+
+ it "lowercases the application" do
+ subject.send(:packet).should == "example.deploy:1|c"
+ end
+ end
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.