cartage-s3 2.1 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/History.md +5 -0
- data/lib/cartage/plugins/s3.rb +2 -2
- data/test/test_cartage_s3.rb +5 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8de486fa9d6d1e499ad119a177e863307b11b2c04bbb8f755e40fd4511469d67
|
4
|
+
data.tar.gz: dce66d3a35163347caa3ece2be517c570df4dc0fe36fcf93cdcac8ba48eb20e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0779ff6de032486cf4b01b48d2d8c16e21778df60d68cb44adcb42785217eb9487be04cfbed90ca918ad9848c0c65b091c633e80c6d5f9868109826d6f296aac'
|
7
|
+
data.tar.gz: 5440bdf07047f4e93a1c47583a27c652c7c1484eb53eb15287d8d7383f819245b3af9eea4f6cf961a54a4617eb807121f33d9101a8f57464217a42dcab548f83
|
data/History.md
CHANGED
data/lib/cartage/plugins/s3.rb
CHANGED
@@ -102,7 +102,7 @@ class Cartage
|
|
102
102
|
#
|
103
103
|
# These permissions are only needed for the optionas listed.
|
104
104
|
class S3 < Cartage::Plugin
|
105
|
-
VERSION = '2.1' #:nodoc:
|
105
|
+
VERSION = '2.1.1' #:nodoc:
|
106
106
|
|
107
107
|
# Put packages and metadata to the remote location.
|
108
108
|
def put
|
@@ -215,7 +215,7 @@ class Cartage
|
|
215
215
|
#:nocov:
|
216
216
|
def connection
|
217
217
|
unless defined?(@connection)
|
218
|
-
require 'fog'
|
218
|
+
require 'fog-aws'
|
219
219
|
@connection = Fog::Storage.new(destination.credentials.to_h)
|
220
220
|
end
|
221
221
|
@connection
|
data/test/test_cartage_s3.rb
CHANGED
@@ -34,6 +34,7 @@ describe 'Cartage::S3' do
|
|
34
34
|
let(:config) { Cartage::Config.new(config_hash) }
|
35
35
|
let(:cartage) { Cartage.new(config) }
|
36
36
|
let(:subject) { cartage.s3 }
|
37
|
+
let(:hashify) { config.method(:hashify) }
|
37
38
|
|
38
39
|
def self.it_verifies_configuration(focus: false, &block)
|
39
40
|
self.focus if focus
|
@@ -95,12 +96,13 @@ Destination foo invalid: No provider present
|
|
95
96
|
end
|
96
97
|
|
97
98
|
it 'converts the implicit default into explicit' do
|
98
|
-
s3_config.delete(:destinations)
|
99
|
+
expected = hashify.(s3_config.delete(:destinations))
|
99
100
|
s3_config[:path] = path
|
100
101
|
s3_config[:credentials] = credentials
|
101
102
|
|
102
|
-
|
103
|
-
|
103
|
+
actual = hashify.(cartage.config(for_plugin: :s3). dig(:destinations))
|
104
|
+
|
105
|
+
assert_equal expected, actual
|
104
106
|
end
|
105
107
|
|
106
108
|
it 'fails on the destination missing a path' do
|