Skip to content

Commit

Permalink
One more place where the prefix needs to be provided.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Jean committed Jun 20, 2014
1 parent e7f7577 commit 57257fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/middleman/s3_sync/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def initialize(path, partial_s3_resource)
end

def remote_path
s3_resource ? s3_resource.key : path
s3_resource ? s3_resource.key : "#{options.prefix}#{path}"

This comment has been minimized.

Copy link
@josephwegner

josephwegner Jun 26, 2014

So I just updated my gem to the latest version (I've been using my local branch for awhile).. This change actually breaks it for me. It's putting the prefix twice for me now. I'm using the prefix blog, but it's actually placing my files in /blog/blog'

This comment has been minimized.

Copy link
@fredjean

fredjean Jun 26, 2014

Owner

Could you post your config? (sanitize the AWS credentials, the bucket name would be helpful to get).

This comment has been minimized.

Copy link
@fredjean

fredjean Jun 28, 2014

Owner

Are these new files or are they updated ones?

This comment has been minimized.

Copy link
@josephwegner

josephwegner Jun 30, 2014

It is happening with both, updated and new. Here's my config file:

###
# Compass
###

# Change Compass configuration
# compass_config do |config|
#   config.output_style = :compact
# end

###
# Page options, layouts, aliases and proxies
###

# Per-page layout changes:
#
# With no layout
# page "/path/to/file.html", :layout => false
#
# With alternative layout
# page "/path/to/file.html", :layout => :otherlayout
#
# A path which all have the same layout
# with_layout :admin do
#   page "/admin/*"
# end

# Proxy pages (http://middlemanapp.com/basics/dynamic-pages/)
# proxy "/this-page-has-no-template.html", "/template-file.html", :locals => {
#  :which_fake_page => "Rendering a fake page with a local variable" }

###
# Helpers
###

# Automatic image dimensions on image_tag helper
# activate :automatic_image_sizes

# Reload the browser automatically whenever files change
# configure :development do
#   activate :livereload
# end

# Methods defined in the helpers block are available in templates
# helpers do
#   def some_helper
#     "Helping"
#   end
# end

set :css_dir, 'stylesheets'

set :js_dir, 'javascripts'

set :images_dir, 'images'

activate :directory_indexes

#Load all libs
Dir["lib/*.rb"].each {|file| require file }

Dir["source/proxies/*.rb"].each {|file| eval File.read(file) }


# Build-specific configuration
configure :build do
  # For example, change the Compass output style for deployment
  activate :minify_css

  # Minify Javascript on build
  activate :minify_javascript

  # Enable cache buster
  activate :asset_hash

  # Use relative URLs
  # activate :relative_assets

  # Or use a different image path
  set :http_prefix, "/blog/"
end

activate :s3_sync do |s3_sync|
  s3_sync.bucket                     = 'sanitized-bucket-name' # The name of the S3 bucket you are targetting. This is globally unique.
  s3_sync.region                     = 'us-east-1'     # The AWS region for your bucket.
  s3_sync.acl                        = 'public-read'
  s3_sync.prefix                     = 'blog'
end

This comment has been minimized.

Copy link
@fredjean

fredjean Nov 24, 2014

Owner

I'm sorry, I didn't notice your response. I'll have a look at it this week.

end
alias :key :remote_path

Expand Down

0 comments on commit 57257fe

Please sign in to comment.