open-uri-s3 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/open-uri-s3.rb +4 -4
- data/open-uri-s3.gemspec +5 -5
- data/spec/lib/open-uri-s3_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09063274ea954a0ee89c5c5098a6aa44d37363df
|
4
|
+
data.tar.gz: ab68e9475b54fad4b8d59920d60fa1bed0e53bb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d21c8b67879998d6f2685176af30be8e0ad4a64f98881f67c23a04e3cf23467fc9725c629d49bb551c89da5c0ee633c8fa268276611e94077c7a1d6cdd2d7ec
|
7
|
+
data.tar.gz: 2b26b1df53977fefc9f496545ba2d97c3c08ae75ff3b2796d26e8494dca26c28772f590f443095ba7553fc3ca6af55b1bbd425999200bcf1a036c98f63eb1146
|
data/Gemfile
CHANGED
@@ -2,7 +2,7 @@ source "http://rubygems.org"
|
|
2
2
|
# Add dependencies required to use your gem here.
|
3
3
|
# Example:
|
4
4
|
# gem "activesupport", ">= 2.3.5"
|
5
|
-
gem 'aws-sdk
|
5
|
+
gem 'aws-sdk'
|
6
6
|
|
7
7
|
# Add dependencies to develop your gem here.
|
8
8
|
# Include everything needed to run rake, tests, features, etc.
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ require 'open-uri-s3'
|
|
9
9
|
Reading objects:
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
open('s3://my.bucket/public/hello') # returns
|
12
|
+
open('s3://my.bucket/public/hello') # returns Aws::S3::Object (quacks like IO)
|
13
13
|
```
|
14
14
|
|
15
15
|
or a safer option (see [this post][open-uri-dangers] on the dangers of using open-uri with user input)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.3.0
|
data/lib/open-uri-s3.rb
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
require 'aws-sdk
|
1
|
+
require 'aws-sdk'
|
2
2
|
require 'open-uri'
|
3
3
|
require 'uri'
|
4
4
|
|
5
5
|
module URI
|
6
6
|
class S3 < Generic
|
7
7
|
|
8
|
-
# @return [
|
8
|
+
# @return [Aws::S3::Object] S3 object (quacks like IO)
|
9
9
|
def open(*args)
|
10
|
-
s3 = ::
|
10
|
+
s3 = ::Aws::S3.new
|
11
11
|
bucket = s3.buckets[self.hostname]
|
12
12
|
if bucket.location_constraint
|
13
|
-
s3 = ::
|
13
|
+
s3 = ::Aws::S3.new(s3_endpoint: "s3-#{bucket.location_constraint}.amazonaws.com")
|
14
14
|
bucket = s3.buckets[self.hostname]
|
15
15
|
end
|
16
16
|
|
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.3.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-
|
12
|
+
s.date = "2015-11-16"
|
13
13
|
s.description = "AWS S3 protocol support for open-uri"
|
14
14
|
s.email = "erterpstra@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -38,14 +38,14 @@ Gem::Specification.new do |s|
|
|
38
38
|
s.specification_version = 4
|
39
39
|
|
40
40
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
41
|
-
s.add_runtime_dependency(%q<aws-sdk
|
41
|
+
s.add_runtime_dependency(%q<aws-sdk>, [">= 0"])
|
42
42
|
s.add_development_dependency(%q<rspec>, ["~> 3.2.0"])
|
43
43
|
s.add_development_dependency(%q<yard>, ["~> 0.7"])
|
44
44
|
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
45
45
|
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
46
46
|
s.add_development_dependency(%q<jeweler>, ["~> 1.8.8"])
|
47
47
|
else
|
48
|
-
s.add_dependency(%q<aws-sdk
|
48
|
+
s.add_dependency(%q<aws-sdk>, [">= 0"])
|
49
49
|
s.add_dependency(%q<rspec>, ["~> 3.2.0"])
|
50
50
|
s.add_dependency(%q<yard>, ["~> 0.7"])
|
51
51
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
@@ -53,7 +53,7 @@ Gem::Specification.new do |s|
|
|
53
53
|
s.add_dependency(%q<jeweler>, ["~> 1.8.8"])
|
54
54
|
end
|
55
55
|
else
|
56
|
-
s.add_dependency(%q<aws-sdk
|
56
|
+
s.add_dependency(%q<aws-sdk>, [">= 0"])
|
57
57
|
s.add_dependency(%q<rspec>, ["~> 3.2.0"])
|
58
58
|
s.add_dependency(%q<yard>, ["~> 0.7"])
|
59
59
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
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.3.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-
|
11
|
+
date: 2015-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: aws-sdk
|
14
|
+
name: aws-sdk
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - '>='
|