open-uri-s3 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/open-uri-s3.rb +3 -3
- data/open-uri-s3.gemspec +2 -2
- data/spec/lib/open-uri-s3_spec.rb +16 -0
- 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: 48b2c9662ebe7fdafe18502ad7cc1498d6b05419
|
4
|
+
data.tar.gz: dba690b426ef69c7659764c69f0926e7586c6eaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f94cf95c711871a998385d07db10510e0e491dc1fcfbe1d5dd2b3e0e2cb6e29ad2a8938a2ee83572b2b81e1363e6eaab75dff8ed24a84fd2e2ab5db85a0742f3
|
7
|
+
data.tar.gz: ab196aada79e18483c80a78272317922c2cb166730e8ce95eaff645dce4444a7f552f73bb7031233ce46828c5c9a6cc7d2725997f8ded212f11154a9b55053bb
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
data/lib/open-uri-s3.rb
CHANGED
data/open-uri-s3.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "open-uri-s3"
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Erik Terpstra"]
|
12
|
-
s.date = "2015-03-
|
12
|
+
s.date = "2015-03-09"
|
13
13
|
s.description = "AWS S3 protocol support for open-uri"
|
14
14
|
s.email = "erterpstra@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -13,6 +13,22 @@ describe URI::S3 do
|
|
13
13
|
allow(AWS::S3).to receive(:new).and_return(s3)
|
14
14
|
end
|
15
15
|
|
16
|
+
describe "open" do
|
17
|
+
it "returns the S3 object" do
|
18
|
+
expect(open(uri)).to eq object
|
19
|
+
end
|
20
|
+
|
21
|
+
context "when a block is given" do
|
22
|
+
it "yields the object" do
|
23
|
+
expect { |b| open(uri, &b) }.to yield_with_args(object)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "returns the result of the block" do
|
27
|
+
expect(open(uri) { 'result' }).to eq 'result'
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
16
32
|
describe "#read" do
|
17
33
|
it "reads the object" do
|
18
34
|
expect(URI(uri).read).to eq 'contents'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: open-uri-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erik Terpstra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-v1
|