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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9986d796b6787cf3ba5b6525885cc9de940edd0d26ce73e5287715db4aebddbf
4
- data.tar.gz: 0b369f69ee17bcde3f18e857085579905c6bebe01cc5993f016902c6501d9904
3
+ metadata.gz: 91bb96241374c9086d26c89dc3336c54d0b4c1071059ea47621d4abf8adea754
4
+ data.tar.gz: 28cf8c779db0ffc0c7991318ecf8dd86f5aa82be119573a58ce266991e8a60e1
5
5
  SHA512:
6
- metadata.gz: b25921de1c2cc93c8dab53ce5530617c6505b9f92f6398b03d3c91670808fb16cb08f5a9761a0b4e3f8f3e6938ded91472cb1317808aa4065eb4196ec95ff527
7
- data.tar.gz: 3aace114a11f619f62a5bf70386110ef14785b0a694b2feb23840a776a6ab6b0b974bf49d833b3747c751ba61633e4448fc2cf70613d0024c061747f742f6710
6
+ metadata.gz: 47ed37d533703bc249a9758aa5d6651fe72e5e72f08ff9afc5a3301079c85686b594c664ff15aebfa843166430d34bd34b941377029306028d19b3d9cc91d178
7
+ data.tar.gz: 424e96b933664a6b3a54edc38370c68e122c9cd4cfaa254bce802447fbe9d4e638feb5c3663835a5a6725779f9a8510077ad4b62a98d905fe156486af53745b9
@@ -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
- req = Net::HTTP::Put.new(uri, {
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
- req.body_stream = File.open(path)
23
- Net::HTTP.start(uri.hostname) { |http| http.request(req) }
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
@@ -1,3 +1,3 @@
1
1
  module Backhoe
2
- VERSION = "0.8.1"
2
+ VERSION = "0.8.2"
3
3
  end
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.1
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-05-10 00:00:00.000000000 Z
11
+ date: 2024-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord