Skip to content

Commit

Permalink
Add Notifier::Base#build_url with deprecation warning
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Rozet <simon@rozet.name>
  • Loading branch information
technicalpickles authored and sr committed Mar 26, 2009
1 parent f8cf3e3 commit a307235
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/integrity/notifier/base.rb
Expand Up @@ -50,6 +50,11 @@ def commit_url
Integrity.config[:base_uri] / commit.project.permalink / "commits" / commit.identifier
end

def build_url
warn "Notifier::Base#build_url is deprecated, use Notifier::Base#commit_url instead (#{caller[0]})"
commit_url
end

private

def stripped_commit_output
Expand Down
5 changes: 5 additions & 0 deletions test/unit/notifier_test.rb
@@ -1,6 +1,11 @@
require File.dirname(__FILE__) + "/../helpers"

class NotifierTest < Test::Unit::TestCase
test "deprecated methods" do
Notifier::Base.new(Build.gen, {}).should respond_to(:build)
Notifier::Base.new(Build.gen, {}).should respond_to(:build_url)
end

specify "IRC fixture is valid and can be saved" do
lambda do
Notifier.generate(:irc).tap do |project|
Expand Down

0 comments on commit a307235

Please sign in to comment.