Sha256: 6894ee0faa2e117a7fc3b952370d961976f7c63d426b6306e9b3829266826a82

Contents?: true

Size: 946 Bytes

Versions: 1

Compression:

Stored size: 946 Bytes

Contents

namespace :load do
  # rubocop:disable LineLength
  task :defaults do
    set :templating_digster, ->{ ->(data){ OpenSSL::Digest::MD5.hexdigest(data)} }
    set :templating_digest_cmd, %Q{test "Z$(openssl md5 %<path>s| sed 's/^.*= *//')" = "Z%<digest>s" } # alternative %Q{echo "%<digest>s %<path>s" | md5sum -c --status }  should return true when the file content is the same
    set :templating_mode_test_cmd, %Q{ [ "Z$(printf "%%.4o" 0$(stat -c "%%a" %<path>s 2>/dev/null ||  stat -f "%%A" %<path>s))" != "Z%<mode>s" ] } # mac uses different mode formatter
    set :templating_paths , ->{ ["config/deploy/templates/#{fetch(:stage)}/%<host>s",
                                 "config/deploy/templates/#{fetch(:stage)}",
                                 "config/deploy/templates/shared/%<host>s",
                                 "config/deploy/templates/shared"].map {|partial_path| (partial_path)} }
  end
  # rubocop:enable LineLength
end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
capistrano-template-0.0.5 lib/capistrano/template/tasks/template_defaults.rake