backhoe 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/backhoe/backup.rb +7 -3
- data/lib/backhoe/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91bb96241374c9086d26c89dc3336c54d0b4c1071059ea47621d4abf8adea754
|
4
|
+
data.tar.gz: 28cf8c779db0ffc0c7991318ecf8dd86f5aa82be119573a58ce266991e8a60e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47ed37d533703bc249a9758aa5d6651fe72e5e72f08ff9afc5a3301079c85686b594c664ff15aebfa843166430d34bd34b941377029306028d19b3d9cc91d178
|
7
|
+
data.tar.gz: 424e96b933664a6b3a54edc38370c68e122c9cd4cfaa254bce802447fbe9d4e638feb5c3663835a5a6725779f9a8510077ad4b62a98d905fe156486af53745b9
|
data/lib/backhoe/backup.rb
CHANGED
@@ -11,7 +11,7 @@ module Backhoe
|
|
11
11
|
|
12
12
|
uri = URI("https://s3-us-west-2.amazonaws.com/#{s3_path}/#{filename}")
|
13
13
|
|
14
|
-
|
14
|
+
request = Net::HTTP::Put.new(uri, {
|
15
15
|
"Content-Length": File.size(path).to_s,
|
16
16
|
"Content-Type": content_type,
|
17
17
|
"Date": date,
|
@@ -19,8 +19,12 @@ module Backhoe
|
|
19
19
|
"x-amz-storage-class": "STANDARD",
|
20
20
|
"x-amz-acl": "private",
|
21
21
|
})
|
22
|
-
|
23
|
-
|
22
|
+
request.body_stream = File.open(path)
|
23
|
+
|
24
|
+
Net::HTTP.start(uri.hostname) do |http|
|
25
|
+
response = http.request(request)
|
26
|
+
response.value # raises if not success
|
27
|
+
end
|
24
28
|
end
|
25
29
|
|
26
30
|
private
|
data/lib/backhoe/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backhoe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|