Sha256: c2b8a6388a2c9adb08addcd55a12819388ca1e5a4f3b677be9eb2845b125eb41

Contents?: true

Size: 587 Bytes

Versions: 8

Compression:

Stored size: 587 Bytes

Contents

require 'awestruct/deploy/base_deploy'
require 'ruby-s3cmd'

module Awestruct
  module Deploy
    class S3Deploy < Base
      def initialize( site_config, deploy_config )
        @site_path = site_config.output_dir
        @bucket = deploy_config['bucket']
      end

      def publish_site
        $LOG.info "Syncing #{@site_path} to bucket #{@bucket}" if $LOG.info?
        s3cmd = RubyS3Cmd::S3Cmd.new
        s3cmd.sync("#{@site_path}/", @bucket)
        $LOG.info "DONE" if $LOG.info?
      end
    end
  end
end

Awestruct::Deployers.instance[ :s3 ] = Awestruct::Deploy::S3Deploy

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
awestruct-0.5.4.beta1 lib/awestruct/deploy/s3_deploy.rb
awestruct-0.5.3 lib/awestruct/deploy/s3_deploy.rb
awestruct-0.5.2.1 lib/awestruct/deploy/s3_deploy.rb
awestruct-0.5.2 lib/awestruct/deploy/s3_deploy.rb
awestruct-0.5.1 lib/awestruct/deploy/s3_deploy.rb
awestruct-0.5.1a lib/awestruct/deploy/s3_deploy.rb
awestruct-0.5.0 lib/awestruct/deploy/s3_deploy.rb
awestruct-0.5.0.cr lib/awestruct/deploy/s3_deploy.rb