backhoe 0.8.1 → 0.8.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9986d796b6787cf3ba5b6525885cc9de940edd0d26ce73e5287715db4aebddbf
4
- data.tar.gz: 0b369f69ee17bcde3f18e857085579905c6bebe01cc5993f016902c6501d9904
3
+ metadata.gz: 17a40eff0e141df5c044ab0b586d43d3cee230df70d458b9ff41d8ad7f56f3bf
4
+ data.tar.gz: 52a7cccbd4b1d2e176acd29ddadb12324fe3ad97176eb0fce79df8a7d8caaf41
5
5
  SHA512:
6
- metadata.gz: b25921de1c2cc93c8dab53ce5530617c6505b9f92f6398b03d3c91670808fb16cb08f5a9761a0b4e3f8f3e6938ded91472cb1317808aa4065eb4196ec95ff527
7
- data.tar.gz: 3aace114a11f619f62a5bf70386110ef14785b0a694b2feb23840a776a6ab6b0b974bf49d833b3747c751ba61633e4448fc2cf70613d0024c061747f742f6710
6
+ metadata.gz: ccf2274df9f0cdd574bf8d72c1f71349b454153a413eca6895e5369bdc547e72844477240c45e16319771133015821280397f26bf522e7a6dbcb0bfcb0099aa1
7
+ data.tar.gz: 9963c8a4ea7af478b3fc84d0ef95dd773d6e7286ec87cf68bbd76474c2ca034bb23e5137397dbae86fca04771495f94d39838202667f49e63f121ee5f8c2dab2
@@ -9,9 +9,9 @@ module Backhoe
9
9
 
10
10
  Backhoe.dump path
11
11
 
12
- uri = URI("https://s3-us-west-2.amazonaws.com/#{s3_path}/#{filename}")
12
+ uri = URI("https://s3.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.3"
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.3
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-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord