middleman-s3_sync 3.0.35 → 3.0.37

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: 848d685a2b477752bdc883d970aa2c789d91e25c
4
- data.tar.gz: 3acb75102dbb81bd100e36e1aa17ffbbe581a402
3
+ metadata.gz: 0a3d596b258f8ad284fe69c1ec98d9a81d012095
4
+ data.tar.gz: 19f15e444a731602a38c004ca41216f3296de52c
5
5
  SHA512:
6
- metadata.gz: d7dc75dc122a0844707a03d59ec4c94ba52a233c9cc35ccab24ef4fa91b0802a9b787823c3a1ce7300b2348b0ae52008a628ee7c7d739922c421ac4dacab3e89
7
- data.tar.gz: 181cc8ca6f555c242f9ce665c3dfc619f66f7175d56fe86aa4c868a0aac56a34bdb9f5acd275296249d1eb9c6fd5b480a4a045befa1b05ab0193fc0b079f023a
6
+ metadata.gz: ab5b04bc4666c9c14bcfe9d24e51690ab542b78ad3e1e8f9453773f2f76ada44bcf622cc23dee4f1f760b100cff6b51a3b4e74b35584cd8302f71be7eeb1a60f
7
+ data.tar.gz: 690186a84248f7fe826708a8bd64be308e5a8581b0cdc5a0f8a7f0742b32d3a7dcb66f1e7b8a86f39c9f33c0b4d3b433b06afd27da101867a5c0533dc52335c4
data/README.md CHANGED
@@ -273,7 +273,8 @@ You can set the ```prefer_gzip``` option to look for a gzipped version
273
273
  of a resource. The gzipped version of the resource will be pushed to S3
274
274
  instead of the original and the ```Content-Encoding``` and ```Content-Type```
275
275
  headers will be set correctly. This will cause Amazon to serve the
276
- compressed version of the resource.
276
+ compressed version of the resource. In order for this to work, you need to
277
+ have the `:gzip` extension activated in your `config.rb`.
277
278
 
278
279
  ## A Debt of Gratitude
279
280
 
@@ -56,7 +56,7 @@ module Middleman
56
56
  alias :attributes :to_h
57
57
 
58
58
  def update!
59
- body { |body|
59
+ local_content { |body|
60
60
  say_status "Updating".blue + " #{remote_path}#{ gzipped ? ' (gzipped)'.white : ''}"
61
61
  if options.verbose
62
62
  say_status "Original: #{original_path.white}"
@@ -64,28 +64,9 @@ module Middleman
64
64
  say_status "remote md5: #{remote_object_md5.white} / #{remote_content_md5}"
65
65
  say_status "content md5: #{local_object_md5.white} / #{local_content_md5}"
66
66
  end
67
- s3_resource.body = body
68
-
69
- s3_resource.acl = options.acl
70
- s3_resource.content_type = content_type
71
- s3_resource.metadata = { CONTENT_MD5_KEY => local_content_md5 }
72
-
73
- if caching_policy
74
- s3_resource.cache_control = caching_policy.cache_control
75
- s3_resource.expires = caching_policy.expires
76
- end
77
-
78
- if options.prefer_gzip && gzipped
79
- s3_resource.content_encoding = "gzip"
80
- end
81
-
82
- if options.reduced_redundancy_storage
83
- s3_resource.storage_class = 'REDUCED_REDUNDANCY'
84
- end
85
67
 
86
- if options.encryption
87
- s3_resource.encryption = 'AES256'
88
- end
68
+ s3_resource.merge_attributes(to_h)
69
+ s3_resource.body = body
89
70
 
90
71
  s3_resource.save
91
72
  }
@@ -112,8 +93,8 @@ module Middleman
112
93
  say_status "Local Path: #{local_path.white}"
113
94
  say_status "content md5: #{local_content_md5.white}"
114
95
  end
115
- body { |body|
116
- bucket.files.create(to_h.merge(:body => body))
96
+ local_content { |body|
97
+ bucket.files.create(to_h.merge(body: body))
117
98
  }
118
99
  end
119
100
 
@@ -152,7 +133,7 @@ module Middleman
152
133
  status == :ignored || status == :alternate_encoding
153
134
  end
154
135
 
155
- def body(&block)
136
+ def local_content(&block)
156
137
  File.open(local_path, &block)
157
138
  end
158
139
 
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module S3Sync
3
- VERSION = "3.0.35"
3
+ VERSION = "3.0.37"
4
4
  end
5
5
  end
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
20
20
 
21
21
  gem.add_runtime_dependency 'middleman-core', '>= 3.0.0'
22
22
  gem.add_runtime_dependency 'unf'
23
- gem.add_runtime_dependency 'fog', '>= 1.10.1'
23
+ gem.add_runtime_dependency 'fog', '>= 1.25.0'
24
24
  gem.add_runtime_dependency 'map'
25
25
  gem.add_runtime_dependency 'pmap'
26
26
  gem.add_runtime_dependency 'ruby-progressbar'
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.35
4
+ version: 3.0.37
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-09-08 00:00:00.000000000 Z
12
+ date: 2014-11-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: middleman-core
@@ -45,14 +45,14 @@ dependencies:
45
45
  requirements:
46
46
  - - ">="
47
47
  - !ruby/object:Gem::Version
48
- version: 1.10.1
48
+ version: 1.25.0
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: 1.10.1
55
+ version: 1.25.0
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: map
58
58
  requirement: !ruby/object:Gem::Requirement