Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/s3deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def config
end

def deploy!
config.before_deploy if config.before_deploy
config.before_deploy.call if config.before_deploy.respond_to?(:call)
@deployer.deploy!
config.after_deploy if config.after_deploy
config.after_deploy.call if config.after_deploy.respond_to?(:call)
end

def destroy!
Expand Down
4 changes: 2 additions & 2 deletions lib/s3deploy/deployer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Deployer
def initialize(opts)
@dist_dir = File.expand_path(opts[:dist_dir])
@bucket = opts[:bucket]
@app_path = strip_slashes(opts[:app_path]) || ''
@app_path = strip_slashes(opts[:app_path] || '')
@gzip = opts[:gzip] || S3deploy::DEFAULT_GZIP
@acl = opts[:acl] || 'public-read'
@cache_control = opts[:cache_control] || 'public,max-age=60'
Expand Down Expand Up @@ -118,7 +118,7 @@ def delete!
private

def app_path_with_bucket
"#{@bucket}/#{@app_path}"
[@bucket,@app_path].reject(&:empty?).join('/')
end

def strip_slashes(str)
Expand Down
2 changes: 1 addition & 1 deletion lib/s3deploy/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# hi version!
module S3deploy
VERSION = '0.2.4'
VERSION = '0.2.5'
end