s3 0.3.23 → 0.3.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -1
- data/lib/s3/service.rb +6 -0
- data/lib/s3/version.rb +1 -1
- data/test/service_test.rb +18 -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: d25a652e976f52b851fda22f71d9b7cce09acfbe
|
4
|
+
data.tar.gz: 46df7f5afeeb91d86df9b0a43e393b3a88a8867f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 739666db3562252f1c6af666dec6ae70e310e42d129e7870df0f978930180a668875c016a49f9529410905e0c1b84ba212a283c5d24c7e22fb24f458ca49b8b9
|
7
|
+
data.tar.gz: 46801114bb6c5731876e686053f5f76f732b36e12d005a869534572e5931497f87d9740af7d543b73b5961fa96fdecf6380decbad10ee4894b4f3c8636219b32
|
data/Gemfile.lock
CHANGED
data/lib/s3/service.rb
CHANGED
@@ -25,6 +25,12 @@ module S3
|
|
25
25
|
# * <tt>:timeout</tt> - Timeout to use by the Net::HTTP object
|
26
26
|
# (60 by default)
|
27
27
|
def initialize(options)
|
28
|
+
# The keys for these required options might exist in the options hash, but
|
29
|
+
# they might be set to something like `nil`. If this is the case, we want
|
30
|
+
# to fail early.
|
31
|
+
raise ArgumentError, "Missing :access_key_id." if !options[:access_key_id]
|
32
|
+
raise ArgumentError, "Missing :secret_access_key." if !options[:secret_access_key]
|
33
|
+
|
28
34
|
@access_key_id = options.fetch(:access_key_id)
|
29
35
|
@secret_access_key = options.fetch(:secret_access_key)
|
30
36
|
@use_ssl = options.fetch(:use_ssl, false)
|
data/lib/s3/version.rb
CHANGED
data/test/service_test.rb
CHANGED
@@ -57,6 +57,24 @@ class ServiceTest < Test::Unit::TestCase
|
|
57
57
|
]
|
58
58
|
end
|
59
59
|
|
60
|
+
test "no :access_key_id" do
|
61
|
+
assert_raise ArgumentError do
|
62
|
+
@service_bucket_exists = S3::Service.new(
|
63
|
+
:access_key_id => nil,
|
64
|
+
:secret_access_key => "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDF"
|
65
|
+
)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
test "no :secret_access_key" do
|
70
|
+
assert_raise ArgumentError do
|
71
|
+
@service_bucket_exists = S3::Service.new(
|
72
|
+
:access_key_id => "12345678901234567890",
|
73
|
+
:secret_access_key => nil
|
74
|
+
)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
60
78
|
test "buckets and parse buckets empty" do
|
61
79
|
expected = @buckets_empty_list
|
62
80
|
actual = @service_empty_buckets_list.buckets
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kuba Kuźma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: proxies
|