Sha256: 71c1455457954ca3084f0adf746f0d381096bdf3a6eae352f629f9cce6d28bf6

Contents?: true

Size: 959 Bytes

Versions: 1

Compression:

Stored size: 959 Bytes

Contents

module Capistrano
  Configuration.instance(true).load do
    def _cset(name, *args, &block)
      set(name, *args, &block) if !exists?(name)
    end

    Capistrano::S3::Defaults.populate(self, :_cset)

    # Deployment recipes
    namespace :deploy do
      namespace :s3 do
        desc "Empties bucket of all files. Caution when using this command, as it cannot be undone!"
        task :empty do
          S3::Publisher.clear!(s3_endpoint, access_key_id, secret_access_key, bucket)
        end

        desc "Upload files to the bucket in the current state"
        task :upload_files do
          extra_options = { :write => bucket_write_options, :redirect => redirect_options }
          S3::Publisher.publish!(s3_endpoint, access_key_id, secret_access_key,
                             bucket, deployment_path, extra_options)
        end
      end

      task :update do
        s3.upload_files
      end

      task :restart do; end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
capistrano-s3-0.3.0 lib/capistrano/tasks/capistrano_2.rb