filedepot 0.3.0 → 0.3.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -7
  3. data/lib/filedepot/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e47c70e2249f31321d1bcebfdf547d828ea1fa2414abe5cae782cfb1cc494bb
4
- data.tar.gz: 3707898672533edd8e377b3f0a4d8c6e7fbc60b7c001626784ecefa16b4b9ec2
3
+ metadata.gz: 0ca0f0eabccc633dcb42385436e94adee16256daa520a429682f9ef8c84c24c1
4
+ data.tar.gz: 8fa4248983601b0692f2b7f2be08c67e5b8d0135de808f0966a6d9d4ace28bb7
5
5
  SHA512:
6
- metadata.gz: 6758ed8235980592480dc3ed51316e7ff87ba6f3d9fe6198adde995f3488177103adcf860afb39cac131f49b08e5888ef7dcf1433c195021c3d9408afcc8ca09
7
- data.tar.gz: ff7decf067599ee4b36c6855f354bbd09efa78055ea206559adf10f2ff48a5162abf79039abfae6454b3aa03ce658ac103dacdab2d2d92368b982fa529361862
6
+ metadata.gz: 0ab59ee7ae71af360b08c396e87ad5657f4a0fe39daeac62d2d070f04f65badcccff67b541f21ac97dc3bccda3be595677d26ff8c0e7262d1871813158cdb6ff
7
+ data.tar.gz: 7dd2057ad79afe412d302a872c12eaa8796ef51ae29e9ad5d0be78bde0d50ad714f00cc0faba04a162b2d2e7e817ca1b4673a62d8ef0d61e22224db334b05223
data/README.md CHANGED
@@ -18,30 +18,33 @@ gem "filedepot"
18
18
 
19
19
  ## Configuration
20
20
 
21
- Config file: `$HOME/.filedepot/config.yml`
21
+ Config file: `~/.filedepot/config.yml`
22
22
 
23
- Run `filedepot setup` to create the config. On first run of any command, setup is automatically invoked if no config exists.
23
+ Run `filedepot setup` to create the config. On first run of any command, if the config file is not found, you will see "~/.filedepot/config.yml not found, let's config it" and setup is invoked automatically.
24
+
25
+ Config structure (keys in order):
24
26
 
25
27
  ```yaml
28
+ default_store: test
26
29
  stores:
27
30
  - name: test
28
31
  type: ssh
29
32
  host: 127.0.0.1
30
33
  username: user
31
34
  base_path: /Users/user/filedepot
32
- default_store: test
33
35
  ```
34
36
 
35
37
  Optional `public_base_url` for public URLs (shown in info and after push):
36
38
 
37
39
  ```yaml
40
+ default_store: test
38
41
  stores:
39
42
  - name: test
40
43
  type: ssh
41
44
  host: 127.0.0.1
45
+ username: user
42
46
  base_path: /data/filedepot
43
47
  public_base_url: https://example.com/files
44
- default_store: test
45
48
  ```
46
49
 
47
50
  When `default_store` does not match any store name, the first store is used.
@@ -51,14 +54,23 @@ When `default_store` does not match any store name, the first store is used.
51
54
  | Command | Description |
52
55
  |---------|-------------|
53
56
  | `filedepot` | Show current store and available commands |
54
- | `filedepot setup` | Create or reconfigure config (interactive) |
55
- | `filedepot config` | Open config file with $EDITOR |
57
+ | `filedepot setup` | Create or reconfigure config (interactive, prompts for name, type, host, username, base path, public base URL) |
58
+ | `filedepot config` | Open config file with $EDITOR; asks to run a test after closing |
56
59
  | `filedepot push HANDLE FILE` | Send file to current storage |
57
60
  | `filedepot pull HANDLE [--path PATH] [--version N]` | Get file from storage |
58
61
  | `filedepot handles` | List all handles in storage |
59
62
  | `filedepot versions HANDLE` | List all versions of a handle |
60
63
  | `filedepot info HANDLE` | Show info for a handle |
61
- | `filedepot delete HANDLE [VERSION]` | Delete file(s) after confirmation |
64
+ | `filedepot delete HANDLE [VERSION] [--yes]` | Delete file(s) after confirmation; use `--yes` to skip confirmation |
65
+ | `filedepot test` | Run end-to-end test (push, pull, delete a temporary file) |
66
+
67
+ ### Setup
68
+
69
+ Prompts for store name, type, host, username, base path, and optional public base URL. After writing the config, asks "Run a test? [y/N]".
70
+
71
+ ### Config
72
+
73
+ Opens the config file in your editor. After you close the editor, asks "Run a test? [y/N]".
62
74
 
63
75
  ### Push
64
76
 
@@ -87,6 +99,14 @@ Lists versions in descending order with creation datetime. Shows at most 10, wit
87
99
 
88
100
  Shows handle, remote base path, current version, updated-at datetime, and latest version URL (when `public_base_url` is set).
89
101
 
102
+ ### Delete
103
+
104
+ Deletes all versions of a handle, or a specific version if `VERSION` is given. Requires typing the handle name to confirm. Use `--yes` or `-y` to skip confirmation (for scripts).
105
+
106
+ ### Test
107
+
108
+ Runs an end-to-end test: creates a temporary file, pushes it, deletes locally, pulls it back, deletes the handle. Prints "Test is OK" or "Test is KO, see the outputs for errors".
109
+
90
110
  ## Testing
91
111
 
92
112
  ```bash
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Filedepot
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
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.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Filedepot