trove 0.1.1 → 0.2.0

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: c2c0c10ad31a90a41e67d077eecc0798aff8db36db9224a3917282eec6f366c6
4
- data.tar.gz: 6322af80220b7113b04769489d66f204d24e9dee0736db633dc13ffd361766d7
3
+ metadata.gz: 969613b215dd90871123cfb6cf1c839280c9a097ab5eb3f8837dffff0d5ad01a
4
+ data.tar.gz: 28e2959384053285ec39956d50ddb2138fe7277a1c3f9dc777575afddc5368e7
5
5
  SHA512:
6
- metadata.gz: '041901519ddfb9483e8f51744c0a77cbddad7ede8ea70cdd9e0f7fd9476615e3632914b9bd026c79a40c20cfeebe0e137539e8941073a48c6d684e6fa211c63d'
7
- data.tar.gz: e9da6f28d950add9f6dfc109c2150e406f4fc86601ee1f3395fdbb930c4fb2b6050e18b201c6c5f200326b38c2f9b90567a8b559de31d57d49748003d220e398
6
+ metadata.gz: 0eef9a86d4a4dbb8f54bd547b155eddc8510b68a760e67e4860b8ca8690782d34f224f96506852510ca945a874564a7d279e52acf37f56ac7999cb30992cc4b3
7
+ data.tar.gz: bac12e3d0ec42be4e8f67384232517bf2ba8f2759ba8d0675f0e23ae0091bd5d96ecbc6d9d092178dd2626c1ed0c9244021a2fb382ae88c061d95a7782926306
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.2.0 (2023-04-11)
2
+
3
+ - Improved error messages
4
+ - Fixed error with missing dependencies
5
+ - Fixed error with `list` when no files
6
+ - Dropped support for Ruby < 3
7
+
1
8
  ## 0.1.1 (2020-12-04)
2
9
 
3
10
  - Added support for running in subdirectories
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2020 Andrew Kane
3
+ Copyright (c) 2020-2023 Andrew Kane
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -9,7 +9,7 @@ Works great with [XGBoost](https://github.com/ankane/xgboost), [Torch.rb](https:
9
9
  Add this line to your application’s Gemfile:
10
10
 
11
11
  ```ruby
12
- gem 'trove'
12
+ gem "trove"
13
13
  ```
14
14
 
15
15
  And run:
data/lib/trove/cli.rb CHANGED
@@ -77,7 +77,7 @@ module Trove
77
77
  end
78
78
  end
79
79
  column_names = columns.map { |c| c.to_s.sub(/_at\z/, "").upcase }
80
- widths = columns.map.with_index { |c, i| [column_names[i].size, data.map { |r| r[c].to_s.size }.max].max }
80
+ widths = columns.map.with_index { |c, i| [column_names[i].size, data.map { |r| r[c].to_s.size }.max || 0].max }
81
81
 
82
82
  output = String.new("")
83
83
  str = widths.map { |w| "%-#{w}s" }.join(" ") + "\n"
@@ -34,7 +34,7 @@ module Trove
34
34
  # delete file if interrupted
35
35
  File.unlink(tmp) if File.exist?(tmp)
36
36
  end
37
- rescue Aws::S3::Errors::ServiceError
37
+ rescue Aws::S3::Errors::NoSuchKey, Aws::S3::Errors::NotFound
38
38
  raise "File not found"
39
39
  end
40
40
 
@@ -59,7 +59,7 @@ module Trove
59
59
  version: resp.version_id,
60
60
  md5: resp.etag.gsub('"', "")
61
61
  }
62
- rescue Aws::S3::Errors::ServiceError
62
+ rescue Aws::S3::Errors::NoSuchKey, Aws::S3::Errors::NotFound
63
63
  nil
64
64
  end
65
65
 
@@ -68,7 +68,7 @@ module Trove
68
68
  options[:version_id] = version if version
69
69
  client.delete_object(**options)
70
70
  true
71
- rescue Aws::S3::Errors::ServiceError
71
+ rescue Aws::S3::Errors::NoSuchKey, Aws::S3::Errors::NotFound
72
72
  false
73
73
  end
74
74
 
data/lib/trove/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Trove
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/trove.rb CHANGED
@@ -1,10 +1,11 @@
1
1
  # stdlib
2
2
  require "digest/md5"
3
+ require "uri"
3
4
  require "yaml"
4
5
 
5
6
  # modules
6
- require "trove/utils"
7
- require "trove/version"
7
+ require_relative "trove/utils"
8
+ require_relative "trove/version"
8
9
 
9
10
  module Trove
10
11
  # storage
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trove
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-04 00:00:00.000000000 Z
11
+ date: 2023-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: thor
28
+ name: rexml
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,49 +39,21 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: bundler
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: rake
42
+ name: thor
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
45
  - - ">="
60
46
  - !ruby/object:Gem::Version
61
47
  version: '0'
62
- type: :development
48
+ type: :runtime
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
52
  - - ">="
67
53
  - !ruby/object:Gem::Version
68
54
  version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: minitest
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '5'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '5'
83
55
  description:
84
- email: andrew@chartkick.com
56
+ email: andrew@ankane.org
85
57
  executables:
86
58
  - trove
87
59
  extensions: []
@@ -108,14 +80,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
108
80
  requirements:
109
81
  - - ">="
110
82
  - !ruby/object:Gem::Version
111
- version: '2.5'
83
+ version: '3'
112
84
  required_rubygems_version: !ruby/object:Gem::Requirement
113
85
  requirements:
114
86
  - - ">="
115
87
  - !ruby/object:Gem::Version
116
88
  version: '0'
117
89
  requirements: []
118
- rubygems_version: 3.1.4
90
+ rubygems_version: 3.4.10
119
91
  signing_key:
120
92
  specification_version: 4
121
93
  summary: Deploy machine learning models in Ruby (and Rails)