Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename github_project to just github #22

Merged
merged 1 commit into from Apr 10, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -18,10 +18,10 @@ and then `bundle install`
require 'capistrano/notifier/mail'

set :notifier_mail_options, {
:method => :test, # :smtp, :sendmail, or any other valid ActionMailer delivery method
:from => 'capistrano@domain.com',
:to => ['john@doe.com', 'jane@doe.com'],
:github_project => 'MyCompany/project-name'
:method => :test, # :smtp, :sendmail, or any other valid ActionMailer delivery method
:from => 'capistrano@domain.com',
:to => ['john@doe.com', 'jane@doe.com'],
:github => 'MyCompany/project-name'
}

namespace :deploy do
Expand Down
6 changes: 3 additions & 3 deletions lib/capistrano/notifier/mail.rb
Expand Up @@ -83,11 +83,11 @@ def github_compare_prefix
end

def github_prefix
"https://github.com/#{github_project}"
"https://github.com/#{github}"
end

def github_project
cap.notifier_mail_options[:github_project]
def github
cap.notifier_mail_options[:github]
end

def html
Expand Down
10 changes: 5 additions & 5 deletions spec/capistrano/notifier/mail_spec.rb
Expand Up @@ -6,10 +6,10 @@
@configuration = Capistrano::Configuration.new
@configuration.load do |configuration|
set :notifier_mail_options, {
:github_project => 'example/example',
:method => :sendmail,
:from => 'sender@example.com',
:to => 'example@example.com'
:github => 'example/example',
:method => :sendmail,
:from => 'sender@example.com',
:to => 'example@example.com'
}
end
@notifier = described_class.new(@configuration)
Expand All @@ -18,7 +18,7 @@
it { described_class.should be_a Class }

specify 'github_project' do
@notifier.send(:github_project).should === 'example/example'
@notifier.send(:github).should === 'example/example'
end

specify 'notify_method' do
Expand Down