filedepot 0.2.2 → 0.2.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 +4 -4
- data/README.md +1 -0
- data/lib/filedepot/cli.rb +23 -4
- data/lib/filedepot/storage/base.rb +1 -1
- data/lib/filedepot/{storage_ssh.rb → storage/ssh.rb} +1 -1
- data/lib/filedepot/version.rb +1 -1
- data/lib/filedepot.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: f80cd1081d4c69688ad58719d89075aed90a478c06f072c0f3d6d30c15cff7a5
|
|
4
|
+
data.tar.gz: 2130f1375526a13365fa3d0f2a4205f6179eaedbc88bdaea61f3c09447ac57a4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 86e661e4fcf117a4e52372c44be2d2d5526c222c37a6dbf109e3e092f3cb53785b337b5d39fdd0a7ac58c983c5cf05d9068122e1640ddb6e5a4142d9cd52c8ae
|
|
7
|
+
data.tar.gz: 136db28f96ecccebfb575f199bca70f0309d40386ecdd719d4792f6d72c8646aef0aba464997fdeafa0c9b232856c5cd2c162883516b0c88fc666ed903ee3e5a
|
data/README.md
CHANGED
|
@@ -51,6 +51,7 @@ When `default_source` does not match any source name, the first source is used.
|
|
|
51
51
|
| `filedepot config` | Open config file with $EDITOR |
|
|
52
52
|
| `filedepot push HANDLE FILE` | Send file to current storage |
|
|
53
53
|
| `filedepot pull HANDLE [--path PATH] [--version N]` | Get file from storage |
|
|
54
|
+
| `filedepot handles` | List all handles in storage |
|
|
54
55
|
| `filedepot versions HANDLE` | List all versions of a handle |
|
|
55
56
|
| `filedepot info HANDLE` | Show info for a handle |
|
|
56
57
|
| `filedepot delete HANDLE [VERSION]` | Delete file(s) after confirmation |
|
data/lib/filedepot/cli.rb
CHANGED
|
@@ -37,7 +37,8 @@ module Filedepot
|
|
|
37
37
|
HELP
|
|
38
38
|
versions: "Usage: filedepot versions HANDLE\n\nList all versions of a handle. Each version has an integer ID from 1 to n.",
|
|
39
39
|
delete: "Usage: filedepot delete HANDLE [VERSION]\n\nAfter confirmation, deletes all versions of a file.\nIf VERSION is specified, deletes only that specific version.",
|
|
40
|
-
info: "Usage: filedepot info HANDLE\n\nShow info for a handle: remote base path and current version."
|
|
40
|
+
info: "Usage: filedepot info HANDLE\n\nShow info for a handle: remote base path and current version.",
|
|
41
|
+
handles: "Usage: filedepot handles\n\nList all handles in storage."
|
|
41
42
|
}.freeze
|
|
42
43
|
|
|
43
44
|
desc "config", "Open the config file using $EDITOR"
|
|
@@ -177,6 +178,23 @@ module Filedepot
|
|
|
177
178
|
puts "latest version url: #{data[:latest_version_url]}" if data[:latest_version_url]
|
|
178
179
|
end
|
|
179
180
|
|
|
181
|
+
desc "handles", "List all handles in storage"
|
|
182
|
+
def handles
|
|
183
|
+
source = Config.current_source
|
|
184
|
+
if source.nil?
|
|
185
|
+
puts "Error: No storage source configured. Run 'filedepot config' to set up."
|
|
186
|
+
return
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
storage = Storage::Base.for(source)
|
|
190
|
+
handles = storage.ls
|
|
191
|
+
if handles.empty?
|
|
192
|
+
puts "No handles found."
|
|
193
|
+
else
|
|
194
|
+
handles.each { |h| puts h }
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
|
|
180
198
|
desc "delete HANDLE [VERSION]", "After confirmation, delete all versions of a file; or only a specific version if specified"
|
|
181
199
|
def delete(handle = nil, version = nil)
|
|
182
200
|
if handle.nil?
|
|
@@ -220,7 +238,7 @@ module Filedepot
|
|
|
220
238
|
end
|
|
221
239
|
|
|
222
240
|
storage.delete(handle, version)
|
|
223
|
-
puts "Deleted #{handle}#{version ? " version #{version}" : ""}."
|
|
241
|
+
puts "Deleted handle#{handle}#{version ? " version #{version}" : ""}."
|
|
224
242
|
rescue RuntimeError => e
|
|
225
243
|
puts "Error: #{e.message}"
|
|
226
244
|
end
|
|
@@ -243,10 +261,11 @@ module Filedepot
|
|
|
243
261
|
puts ""
|
|
244
262
|
puts "Available commands:"
|
|
245
263
|
puts " filedepot config Open config file using $EDITOR"
|
|
264
|
+
puts " filedepot info HANDLE Show info for a handle"
|
|
265
|
+
puts " filedepot handles List all handles in storage"
|
|
266
|
+
puts " filedepot versions HANDLE List all versions of a handle"
|
|
246
267
|
puts " filedepot push HANDLE FILE Send file to current storage"
|
|
247
268
|
puts " filedepot pull HANDLE [--path PATH] [--version N] Get file from storage"
|
|
248
|
-
puts " filedepot versions HANDLE List all versions of a handle"
|
|
249
|
-
puts " filedepot info HANDLE Show info for a handle"
|
|
250
269
|
puts " filedepot delete HANDLE [VER] Delete file(s) after confirmation"
|
|
251
270
|
puts ""
|
|
252
271
|
puts "Use 'filedepot help COMMAND' for more information on a command."
|
data/lib/filedepot/version.rb
CHANGED
data/lib/filedepot.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: filedepot
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Filedepot
|
|
@@ -93,7 +93,7 @@ files:
|
|
|
93
93
|
- lib/filedepot/cli.rb
|
|
94
94
|
- lib/filedepot/config.rb
|
|
95
95
|
- lib/filedepot/storage/base.rb
|
|
96
|
-
- lib/filedepot/
|
|
96
|
+
- lib/filedepot/storage/ssh.rb
|
|
97
97
|
- lib/filedepot/version.rb
|
|
98
98
|
homepage: https://github.com/filedepot/filedepot
|
|
99
99
|
licenses:
|