Sha256: 893ae5bb22578d986c26e4bf85519a42b0eab6600bc2fd487556be8b81adb949
Contents?: true
Size: 644 Bytes
Versions: 3
Compression:
Stored size: 644 Bytes
Contents
module SousChef module Resource class Execute < Base def initialize(context, name=nil, &block) super @cwd = nil end def to_script @script ||= begin setup prepend %{cd #{escape_path(@cwd)}} if @cwd @commands = @commands.inject([]) do |result, line| result + line.split("\n") end super end end def cwd(dir=nil) set_or_return(:cwd, dir) end def command(cmd) @commands << cmd end def creates(path) not_if %{test -e #{escape_path(path)}} end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sous_chef-0.0.4 | lib/sous_chef/resource/execute.rb |
sous_chef-0.0.3 | lib/sous_chef/resource/execute.rb |
sous_chef-0.0.2 | lib/sous_chef/resource/execute.rb |