Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #222 from MasterLambaster/master

Use proper logger in deploy strategy
  • Loading branch information...
commit dfb6295a5f649fc49449352c44ff7fbd2c54d3f8 2 parents 5cec25c + ffe860f
@carsomyr carsomyr authored
View
2  lib/capistrano/recipes/deploy/strategy/base.rb
@@ -73,7 +73,7 @@ def system(*args)
private
def logger
- @logger ||= configuration[:logger] || Capistrano::Logger.new(:output => STDOUT)
+ @logger ||= configuration.logger || Capistrano::Logger.new(:output => STDOUT)
end
# The revision to deploy. Must return a real revision identifier,
View
3  test/deploy/strategy/copy_test.rb
@@ -6,10 +6,11 @@
class DeployStrategyCopyTest < Test::Unit::TestCase
def setup
@config = { :application => "captest",
- :logger => Capistrano::Logger.new(:output => StringIO.new),
:releases_path => "/u/apps/test/releases",
:release_path => "/u/apps/test/releases/1234567890",
:real_revision => "154" }
+ @config.stubs(:logger).returns(stub_everything)
+
@source = mock("source")
@config.stubs(:source).returns(@source)
@strategy = Capistrano::Deploy::Strategy::Copy.new(@config)
Please sign in to comment.
Something went wrong with that request. Please try again.