s3-publisher 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/s3-publisher.rb +5 -2
- data/s3-publisher.gemspec +1 -1
- data/spec/s3_publisher_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74b12809ccf5dbf9f093060d0ebc757f2172bef9
|
4
|
+
data.tar.gz: 1240b82b8ed5e2ca03c080a6ecef4db9d001918e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e371b7036db4ba29b7f427f554278295b2e8d5f71d965ee098d950cbfc7d602b01ec8b6e6bda6706e2012666fb1909414a1caa70f46d9eb665fb6a62504ed7c
|
7
|
+
data.tar.gz: 1f591f7bb9c9c7d03af1448bb3491a21512df1b27efb0e8ada7b5c41f8e1b43f076564a9204f491d0bc8a625fdec084eeeec3e6ce17c16dd25d8e9efbb8247b8
|
data/lib/s3-publisher.rb
CHANGED
@@ -121,10 +121,13 @@ class S3Publisher
|
|
121
121
|
begin
|
122
122
|
gzip = item[:gzip] != false && !item[:write_opts][:content_type].match('image/')
|
123
123
|
|
124
|
+
if item[:contents].is_a?(Pathname)
|
125
|
+
item[:contents] = item[:contents].read
|
126
|
+
end
|
127
|
+
|
124
128
|
if gzip
|
125
129
|
item[:write_opts][:content_encoding] = 'gzip'
|
126
|
-
|
127
|
-
item[:contents] = gzip(gzip_body)
|
130
|
+
item[:contents] = gzip(item[:contents])
|
128
131
|
end
|
129
132
|
|
130
133
|
write_opts = {
|
data/s3-publisher.gemspec
CHANGED
data/spec/s3_publisher_spec.rb
CHANGED
@@ -42,7 +42,7 @@ describe S3Publisher do
|
|
42
42
|
end
|
43
43
|
|
44
44
|
describe ":file opt" do
|
45
|
-
it "queues
|
45
|
+
it "queues contents of files if gzip is false" do
|
46
46
|
set_put_expectation(file: __FILE__)
|
47
47
|
push_test_data('myfile.txt', file: __FILE__, gzip: false)
|
48
48
|
end
|
@@ -102,7 +102,7 @@ describe S3Publisher do
|
|
102
102
|
if opts[:data]
|
103
103
|
expected_contents = opts[:data]
|
104
104
|
elsif opts[:file]
|
105
|
-
expected_contents = Pathname.new(opts[:file])
|
105
|
+
expected_contents = Pathname.new(opts[:file]).read
|
106
106
|
else
|
107
107
|
expected_contents = anything
|
108
108
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3-publisher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Koski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|