Implement dry run mode

This commit is contained in:
Thibault Jouan
2014-05-25 12:11:38 +00:00
parent 332bb1a416
commit 87a3ead082
8 changed files with 57 additions and 9 deletions

View File

@@ -2,13 +2,14 @@ module Producer
module Core
class Env
attr_reader :input, :output, :registry, :logger
attr_accessor :target
attr_accessor :target, :dry_run
def initialize(input: $stdin, output: $stdout, remote: nil, registry: {})
@input = input
@output = output
@registry = registry
@remote = remote
@dry_run = false
end
def remote
@@ -43,6 +44,10 @@ module Producer
def log_level=(level)
logger.level = level
end
def dry_run?
@dry_run
end
end
end
end