s3_deployer 0.6.2 → 0.6.3

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: 9cdb0c5dd052455e0a2db62ede84ffc50210ff95
4
- data.tar.gz: 1363b8b4616c0316e4bb001c34e119f5fbc60f65
3
+ metadata.gz: 7e01bbc563f1a11c5e277f503cecfc6a67fe5f26
4
+ data.tar.gz: be58e8d8fb4f176114bc25da6df2927f013b0430
5
5
  SHA512:
6
- metadata.gz: 8961753e828730991a75271fae409170ebf74fd04f836c4acb99c2c94d4835a952a47e1fb07021561574a87c9ad40b0764c794a087574da0a7bf0c20fd65ddd7
7
- data.tar.gz: 06198653fea629f1869a3362f4e3607b7ae3591f2d6ef4266d22a092248f078a90f1514c0dad4233252666f369e704635ab81e9d499ecc5890020d60b22409dd
6
+ metadata.gz: 33772a6a16d9efc56276e0a489921b642d9acfffd8a4b1617acf1ad04d42a5e25f064ca046fd6af10a8f211d7f60a3f564da5a576629a6a865cd17b9210930aa
7
+ data.tar.gz: 4e5eb10244d9034651d4524828c55565be876a95fb3017073028e5732021b8137bcfbf0fddf8f16d58e4a7fba0508b28ac8f5e3f25d4cf1d7d07985c3ea03372
data/lib/s3_deployer.rb CHANGED
@@ -6,6 +6,7 @@ require 'rexml/document'
6
6
  require 'parallel'
7
7
  require 'aws-sdk'
8
8
  require 'aws-sdk-core/endpoint_provider' # it's needed by some reason for Ruby 2.2.3
9
+ require 'mime-types'
9
10
 
10
11
  require "s3_deployer/config"
11
12
  require "s3_deployer/color"
@@ -201,6 +202,8 @@ class S3Deployer
201
202
  options[:content_encoding] = "gzip"
202
203
  value = compress(value)
203
204
  end
205
+ mime_type = MIME::Types.of(key).first
206
+ options[:content_type] = mime_type ? mime_type.content_type : "binary/octet-stream"
204
207
  retry_block(RETRY_TIMES.dup) do
205
208
  puts "Storing value #{colorize(:yellow, key)} on S3#{", #{colorize(:green, 'gzipped')}" if should_compress?(key)}"
206
209
  Aws::S3::Resource.new.bucket(config.bucket).object(key).put(options.merge(body: value))
@@ -1,3 +1,3 @@
1
1
  class S3Deployer
2
- VERSION = "0.6.2"
2
+ VERSION = "0.6.3"
3
3
  end
data/s3_deployer.gemspec CHANGED
@@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.add_dependency 'json'
23
23
  spec.add_dependency 'parallel'
24
24
  spec.add_dependency 'aws-sdk'
25
+ spec.add_dependency 'mime-types'
25
26
 
26
27
  spec.add_development_dependency "bundler", "~> 1.3"
27
28
  spec.add_development_dependency "rake"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3_deployer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Astashov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-15 00:00:00.000000000 Z
11
+ date: 2015-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tzinfo
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: mime-types
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: bundler
71
85
  requirement: !ruby/object:Gem::Requirement