derivative-rodeo 0.5.0 → 0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5ea42b2912b6b1eb6981b8a72a3d39e4d6f466e07ad60381ba4880431214b18
4
- data.tar.gz: 4e4ca5cdd6ba61898ba13970fbd95c8836c33492c377eb6f258255c8ebf79e67
3
+ metadata.gz: d2dc233be659f66709737ebdebc8ac6a69802f74bce6ac450e5eabb383ea4e54
4
+ data.tar.gz: 7a72ce66e69f827374b6f8e72767aca12638c71a9e5b2c63be09bbca08c12640
5
5
  SHA512:
6
- metadata.gz: 6ebaacf09b1459e8bb8527ddd3b45b6e84106d335e91cc506a6b9b31aae6c74931c755dc5e084e9a39a6ddb0ca8f1b0f85ee21e461cac445edd3eea45384b1b5
7
- data.tar.gz: e11195b3b7169a1f7e2f5df821c681512af93123fc272d3b1dd35d9c971f15ad58a86b4ab1cabf38b463c77d5531114af7ca36eb9197275e46549788a4ec6c1f
6
+ metadata.gz: de5ff8fc29943f5dc52b49c7741ae4a742793439dcca97ea94259d044cc15870dd19ced0911d9305901757e838a8ecb401eb81744c4f0529eef9607534d5dcb8
7
+ data.tar.gz: bec393ace49d0e6689a07d335017987fa6e6edf9aae632159b87150dc2d4a0720441d64f6c6ce48ceb7c4498df3b6ada40b010cd0d439cb76cb071bd65c2c19d
@@ -43,6 +43,9 @@ module DerivativeRodeo
43
43
  ##
44
44
  # Raised when trying to write a tmp file that does not exist
45
45
  class FileMissingError < Error
46
+ def self.with_info(**info)
47
+ new(info.inspect)
48
+ end
46
49
  end
47
50
 
48
51
  ##
@@ -23,8 +23,8 @@ module DerivativeRodeo
23
23
  delegate :config, to: DerivativeRodeo
24
24
 
25
25
  def with_existing_tmp_path(&block)
26
- with_tmp_path(lambda { |_file_path, tmp_file_path, exist|
27
- raise Errors::FileMissingError unless exist
26
+ with_tmp_path(lambda { |file_path, tmp_file_path, exist|
27
+ raise Errors::FileMissingError.with_info(method: __method__, context: self, file_path: file_path, tmp_file_path: tmp_file_path) unless exist
28
28
 
29
29
  response = get(file_uri)
30
30
  File.open(tmp_file_path, 'wb') { |fp| fp.write(response.body) }
@@ -16,7 +16,7 @@ module DerivativeRodeo
16
16
 
17
17
  def with_existing_tmp_path(&block)
18
18
  with_tmp_path(lambda { |file_path, tmp_file_path, exist|
19
- raise Errors::FileMissingError unless exist
19
+ raise Errors::FileMissingError.with_info(method: __method__, context: self, file_path: file_path, tmp_file_path: tmp_file_path) unless exist
20
20
 
21
21
  FileUtils.cp(file_path, tmp_file_path)
22
22
  }, &block)
@@ -47,7 +47,7 @@ module DerivativeRodeo
47
47
  # @return [String] the path to the tmp file
48
48
  def with_existing_tmp_path(&block)
49
49
  with_tmp_path(lambda { |file_path, tmp_file_path, exist|
50
- raise Errors::FileMissingError unless exist
50
+ raise Errors::FileMissingError.with_info(method: __method__, context: self, file_path: file_path, tmp_file_path: tmp_file_path) unless exist
51
51
  obj = bucket.object(file_path)
52
52
  obj.download_file(tmp_file_path)
53
53
  }, &block)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DerivativeRodeo
4
- VERSION = '0.5.0'
4
+ VERSION = '0.5.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: derivative-rodeo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Kaufman
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-07-27 00:00:00.000000000 Z
12
+ date: 2023-11-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport