s3-publisher 0.9.0 → 0.9.1

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: 228be6f6a0276a570e4abae98164b259ce62bfa0
4
- data.tar.gz: 7c489b18c2183fa36648ddd36b2afdcb0e8f86a6
3
+ metadata.gz: 5489fb65d64d60ce1c72ab6e62058913d96c4dcf
4
+ data.tar.gz: a565df15000a23fad4cf9adf7b217ed69ae3ce96
5
5
  SHA512:
6
- metadata.gz: 423f3fa87a913e384771e99d2f0c6a23016f95bc6bff62a7ef6d2d54977ade31e165f8af11dbfa0dfdcdde427e0ea915214474775370b41134b9b1c5ed36f4fe
7
- data.tar.gz: b4e9a958d93e70cf6273198f87a593b377296806f83bdaa71f2aff28456ebe590ea6649ef7a5649d801dc6b7095445ca8d3a5bcad87b6f6c51b51c5baa807acc
6
+ metadata.gz: 31a9777bf2e42143fecde18da322a58eaebdde4b7e6d636c016fb31b1880382ca0835a62144a41f03ab0baeb3996cbc0d3197da6c511602e551c2252c9ea6a31
7
+ data.tar.gz: 11cfabd2b644cbd75246701cdeca19ee5d72ba0397aa5a95c1f2aa96ae2388519928e37b094d2dec657aaede22e1672101a6f87e14cb0e2c7383be4d301c7da6
File without changes
data/lib/s3-publisher.rb CHANGED
@@ -121,7 +121,7 @@ class S3Publisher
121
121
  begin
122
122
  obj = @s3.buckets[bucket_name].objects[item[:key_name]]
123
123
 
124
- gzip = item[:gzip] != false && !item[:key_name].match(/\.(jpg|gif|png|tif)$/)
124
+ gzip = item[:gzip] != false && !item[:write_opts][:content_type].match('image/')
125
125
 
126
126
  if gzip
127
127
  item[:write_opts][:content_encoding] = 'gzip'
data/s3-publisher.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "s3-publisher"
5
- s.version = "0.9.0"
5
+ s.version = "0.9.1"
6
6
  s.authors = ["Ben Koski"]
7
7
  s.email = "bkoski@nytimes.com"
8
8
  s.summary = "Publish data to S3 for the world to see"
@@ -30,7 +30,7 @@ describe S3Publisher do
30
30
  push_test_data('myfile.txt', data: '1234', gzip: false)
31
31
  end
32
32
 
33
- it "does not gzip data if file ends in .jpg" do
33
+ it "does not gzip image files" do
34
34
  set_put_expectation(key_name: 'myfile.jpg', data: '1234')
35
35
  push_test_data('myfile.jpg', data: '1234')
36
36
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3-publisher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Koski
@@ -63,7 +63,7 @@ files:
63
63
  - Gemfile
64
64
  - Gemfile.lock
65
65
  - LICENSE
66
- - README.rdoc
66
+ - README.md
67
67
  - Rakefile
68
68
  - lib/s3-publisher.rb
69
69
  - s3-publisher.gemspec