middleman-s3_sync 3.0.28 → 3.0.29

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e216c35299295bd25bf9c095d627a57d3de6ef94
4
- data.tar.gz: b12a21e124b649a52c068e3c37c1abd916745490
3
+ metadata.gz: 171d7b4a7a89adb9efc3e8f364e4a66ed120f434
4
+ data.tar.gz: 3e927d5727e6dd30ff120e6dc9c96b0ef7f9ebcf
5
5
  SHA512:
6
- metadata.gz: 63df5416f4776612a216ccc61efa9f2350912dcf5e62effa86c09e60992917a8614be91371e0726883fc20460917391312eee4aa185616980f451ebddfe79030
7
- data.tar.gz: d47cbba2841bdc2ceed9b0c97cdfb56d6dfdea413373e30be06401e19352e07917e6b054105098d253952377a0e39e34f951fb501b1bbd3c4d447c381ebb9b20
6
+ metadata.gz: 86caf76c11fecaaa3f0a9e6d4cdf3507fb3a3da18e47c7b31f232340cfb0b58510803ee0c39dd84c3e679ba99a8de8feff178d1f8892d457c89777706300d48e
7
+ data.tar.gz: ba16c95c0ca083c1c77bf872a553d94bbc8d9d593d9228c5e6e52b625744607fe9c9379e86ba25013ecea3f92b997def45836f741a9be5f2315971b18b0d7cb0
@@ -63,7 +63,7 @@ module Middleman
63
63
  def paths
64
64
  @paths ||= begin
65
65
  say_status "Gathering the paths to evaluate."
66
- (remote_paths + local_paths).uniq.sort
66
+ (remote_paths.map { |rp| rp.gsub(/^#{s3_sync_options.prefix}/, '')} + local_paths).uniq.sort
67
67
  end
68
68
  end
69
69
 
@@ -76,7 +76,7 @@ module Middleman
76
76
  local_paths.reject! { |p| p =~ /\.gz$/ && File.exist?(p.gsub(/\.gz$/, '')) }
77
77
  end
78
78
 
79
- local_paths.pmap(32) { |p| p.gsub(/#{build_dir}\//, s3_sync_options.prefix) }
79
+ local_paths.pmap(32) { |p| p.gsub(/#{build_dir}\//, '') }
80
80
  end
81
81
  end
82
82
 
@@ -57,7 +57,7 @@ module Middleman
57
57
 
58
58
  def update!
59
59
  body { |body|
60
- say_status "Updating".blue + " #{path}#{ gzipped ? ' (gzipped)'.white : ''}"
60
+ say_status "Updating".blue + " #{remote_path}#{ gzipped ? ' (gzipped)'.white : ''}"
61
61
  if options.verbose
62
62
  say_status "Original: #{original_path.white}"
63
63
  say_status "Local Path: #{local_path.white}"
@@ -92,21 +92,21 @@ module Middleman
92
92
  end
93
93
 
94
94
  def local_path
95
- local_path = build_dir + '/' + path
95
+ local_path = build_dir + '/' + path.gsub(/^#{options.prefix}/, '')
96
96
  if options.prefer_gzip && File.exist?(local_path + ".gz")
97
97
  @gzipped = true
98
98
  local_path += ".gz"
99
99
  end
100
- local_path.sub(options.prefix, '')
100
+ local_path
101
101
  end
102
102
 
103
103
  def destroy!
104
- say_status "Deleting".red + " #{path}"
104
+ say_status "Deleting".red + " #{remote_path}"
105
105
  bucket.files.destroy remote_path
106
106
  end
107
107
 
108
108
  def create!
109
- say_status "Creating".green + " #{path}#{ gzipped ? ' (gzipped)'.white : ''}"
109
+ say_status "Creating".green + " #{remote_path}#{ gzipped ? ' (gzipped)'.white : ''}"
110
110
  if options.verbose
111
111
  say_status "Original: #{original_path.white}"
112
112
  say_status "Local Path: #{local_path.white}"
@@ -125,7 +125,7 @@ module Middleman
125
125
  elsif alternate_encoding?
126
126
  'alternate encoding'
127
127
  end
128
- say_status "Ignoring".yellow + " #{path} #{ reason ? "(#{reason})".white : "" }"
128
+ say_status "Ignoring".yellow + " #{remote_path} #{ reason ? "(#{reason})".white : "" }"
129
129
  end
130
130
 
131
131
  def to_delete?
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module S3Sync
3
- VERSION = "3.0.28"
3
+ VERSION = "3.0.29"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-s3_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.28
4
+ version: 3.0.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frederic Jean
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-14 00:00:00.000000000 Z
12
+ date: 2014-06-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: middleman-core