aspera-cli 4.21.1 → 4.22.0

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 (105) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/BUGS.md +1 -1
  4. data/CHANGELOG.md +52 -22
  5. data/CONTRIBUTING.md +69 -148
  6. data/README.md +929 -668
  7. data/bin/ascli +5 -14
  8. data/bin/asession +1 -3
  9. data/examples/get_proto_file.rb +4 -3
  10. data/examples/proxy.pac +20 -20
  11. data/lib/aspera/agent/base.rb +11 -5
  12. data/lib/aspera/agent/connect.rb +30 -28
  13. data/lib/aspera/agent/{alpha.rb → desktop.rb} +35 -31
  14. data/lib/aspera/agent/direct.rb +141 -121
  15. data/lib/aspera/agent/httpgw.rb +22 -26
  16. data/lib/aspera/agent/node.rb +14 -11
  17. data/lib/aspera/agent/transferd.rb +30 -19
  18. data/lib/aspera/api/alee.rb +1 -1
  19. data/lib/aspera/api/aoc.rb +6 -6
  20. data/lib/aspera/api/cos_node.rb +2 -2
  21. data/lib/aspera/api/httpgw.rb +7 -3
  22. data/lib/aspera/api/node.rb +10 -8
  23. data/lib/aspera/ascmd.rb +3 -3
  24. data/lib/aspera/ascp/installation.rb +53 -72
  25. data/lib/aspera/ascp/management.rb +1 -1
  26. data/lib/aspera/assert.rb +11 -2
  27. data/lib/aspera/cli/error.rb +2 -2
  28. data/lib/aspera/cli/extended_value.rb +46 -21
  29. data/lib/aspera/cli/formatter.rb +55 -48
  30. data/lib/aspera/cli/hints.rb +1 -1
  31. data/lib/aspera/cli/info.rb +1 -0
  32. data/lib/aspera/cli/main.rb +192 -170
  33. data/lib/aspera/cli/manager.rb +18 -18
  34. data/lib/aspera/cli/plugin.rb +23 -20
  35. data/lib/aspera/cli/plugin_factory.rb +1 -1
  36. data/lib/aspera/cli/plugins/alee.rb +1 -1
  37. data/lib/aspera/cli/plugins/aoc.rb +247 -159
  38. data/lib/aspera/cli/plugins/ats.rb +19 -17
  39. data/lib/aspera/cli/plugins/config.rb +76 -113
  40. data/lib/aspera/cli/plugins/console.rb +5 -3
  41. data/lib/aspera/cli/plugins/faspex.rb +39 -35
  42. data/lib/aspera/cli/plugins/faspex5.rb +111 -84
  43. data/lib/aspera/cli/plugins/faspio.rb +13 -1
  44. data/lib/aspera/cli/plugins/httpgw.rb +13 -1
  45. data/lib/aspera/cli/plugins/node.rb +312 -182
  46. data/lib/aspera/cli/plugins/orchestrator.rb +34 -40
  47. data/lib/aspera/cli/plugins/preview.rb +3 -3
  48. data/lib/aspera/cli/plugins/server.rb +6 -6
  49. data/lib/aspera/cli/plugins/shares.rb +5 -5
  50. data/lib/aspera/cli/sync_actions.rb +19 -18
  51. data/lib/aspera/cli/transfer_agent.rb +5 -5
  52. data/lib/aspera/cli/transfer_progress.rb +2 -2
  53. data/lib/aspera/cli/version.rb +1 -1
  54. data/lib/aspera/command_line_builder.rb +116 -95
  55. data/lib/aspera/coverage.rb +8 -5
  56. data/lib/aspera/environment.rb +26 -17
  57. data/lib/aspera/faspex_gw.rb +14 -14
  58. data/lib/aspera/faspex_postproc.rb +10 -11
  59. data/lib/aspera/hash_ext.rb +4 -14
  60. data/lib/aspera/json_rpc.rb +1 -1
  61. data/lib/aspera/keychain/encrypted_hash.rb +47 -34
  62. data/lib/aspera/keychain/factory.rb +41 -0
  63. data/lib/aspera/keychain/hashicorp_vault.rb +71 -0
  64. data/lib/aspera/keychain/macos_security.rb +19 -11
  65. data/lib/aspera/log.rb +28 -34
  66. data/lib/aspera/nagios.rb +6 -6
  67. data/lib/aspera/node_simulator.rb +8 -8
  68. data/lib/aspera/oauth/base.rb +14 -7
  69. data/lib/aspera/oauth/factory.rb +5 -6
  70. data/lib/aspera/oauth/url_json.rb +6 -6
  71. data/lib/aspera/persistency_action_once.rb +6 -4
  72. data/lib/aspera/persistency_folder.rb +2 -2
  73. data/lib/aspera/preview/generator.rb +13 -10
  74. data/lib/aspera/preview/options.rb +16 -16
  75. data/lib/aspera/preview/terminal.rb +4 -4
  76. data/lib/aspera/preview/utils.rb +15 -17
  77. data/lib/aspera/products/connect.rb +35 -1
  78. data/lib/aspera/products/{alpha.rb → desktop.rb} +3 -3
  79. data/lib/aspera/products/transferd.rb +9 -2
  80. data/lib/aspera/proxy_auto_config.rb +2 -2
  81. data/lib/aspera/rest.rb +56 -47
  82. data/lib/aspera/rest_errors_aspera.rb +1 -1
  83. data/lib/aspera/secret_hider.rb +12 -5
  84. data/lib/aspera/ssh.rb +4 -4
  85. data/lib/aspera/temp_file_manager.rb +5 -4
  86. data/lib/aspera/transfer/convert.rb +29 -0
  87. data/lib/aspera/transfer/error_info.rb +66 -66
  88. data/lib/aspera/transfer/parameters.rb +13 -68
  89. data/lib/aspera/transfer/spec.rb +5 -6
  90. data/lib/aspera/transfer/spec.schema.yaml +753 -0
  91. data/lib/aspera/transfer/spec_doc.rb +62 -0
  92. data/lib/aspera/transfer/sync.rb +23 -72
  93. data/lib/aspera/transfer/sync_instance.schema.yaml +13 -0
  94. data/lib/aspera/transfer/sync_session.schema.yaml +79 -0
  95. data/lib/aspera/transfer/uri.rb +6 -6
  96. data/lib/aspera/uri_reader.rb +18 -1
  97. data/lib/aspera/web_auth.rb +1 -1
  98. data/lib/aspera/web_server_simple.rb +53 -44
  99. data.tar.gz.sig +0 -0
  100. metadata +28 -165
  101. metadata.gz.sig +0 -0
  102. data/examples/build_exec +0 -74
  103. data/examples/build_exec_rubyc +0 -40
  104. data/examples/build_package.sh +0 -28
  105. data/lib/aspera/transfer/spec.yaml +0 -718
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 94d8abaf1bf8e938fe9ef79a7f0ecc06870b799d44acb0783a8638e88be8585d
4
- data.tar.gz: b8aeca6b8c34446aac0f4b54fac0ee52db502a6e28149583e30536cc7ba3ab58
3
+ metadata.gz: 4142ef4954b98f748d8d0d19c63a53e0faace015b8286480b31b652b994fa15c
4
+ data.tar.gz: 2c77b1badfd80ddbc7c8d98acdb303039c87ee2e7fe64b6fbcecd7935101426c
5
5
  SHA512:
6
- metadata.gz: e90b2de02a88fc84ca2e97df962f054200e14c8c2020dd1a1f42f271b15e0f8ca1e67a4ffaefda7c10f6a69c28611a83d400e140c8ccc9e4edb6f56399db8fe8
7
- data.tar.gz: 6688107fb04c162b4c18bcc45c1450c73170ecae5d430af782ba596e5879fdaf0ecd01020e8ba48c2b39a543d3f0bb3b88f689242ee98714cfa6bd658b92b520
6
+ metadata.gz: 524c91bde0ca7c7267a18be627ea00f89de4fd6376fc7d93eb75eb204c0507eb15f3800e5d51536f16996fddf3a26831e5dc3ce7a516701db9098b658d098116
7
+ data.tar.gz: 4c37acd0e5834e723367594a972dea4506416b3b49ce2c7fc4b0b9d6caa9719272f0fa0158d627a8d5bfc02913aba863a40bff346330ff07c10dc1a6754b9aa6
checksums.yaml.gz.sig CHANGED
Binary file
data/BUGS.md CHANGED
@@ -12,7 +12,7 @@ Please, make sure to include the following information:
12
12
 
13
13
  IMPORTANT: Remove any confidential information from the logs before posting them.
14
14
 
15
- [Use Github (Public Issue Reporting)](https://github.com/IBM/aspera-cli/issues)
15
+ [Use GitHub (Public Issue Reporting)](https://github.com/IBM/aspera-cli/issues)
16
16
 
17
17
  ## Scope of Support
18
18
 
data/CHANGELOG.md CHANGED
@@ -1,30 +1,60 @@
1
1
  # Changes (Release notes)
2
2
 
3
+ * 4.22.0
4
+
5
+ * New Features:
6
+ * `faspex5`: Support paging for Faspex5 browsing.
7
+ * `aoc`: #196 Command `packages list` now also supports option `once_only`.
8
+ * `vault`: Support for IBM HashiCorp Vault to store secrets.
9
+ * `wizard`: Preset name can now be specified as optional positional parameter.
10
+ * `config`: New command `ascp schema` displays JSON schema for transfer spec for all, or just one agent.
11
+ * `node`: #198 By default do not allow creation of folder if a link exists with the same name. Use option `query` with parameter `check` set to `false` to disable.
12
+ * `node`: In gen4 operations, also used in `aoc files`, new commands: `mklink`, `mkfile`.
13
+ * Issues Fixed:
14
+ * `aoc`: #195 `package receive ALL` for shared inbox without workspace now works.
15
+ * Breaking Changes:
16
+ * `faspex5`, `aoc`: `gateway` now takes argument as `Hash` with `url` instead of only `String`.
17
+ * `faspex5 postprocessing`: Now takes a flat `Hash`, instead of multi-level `Hash`.
18
+ * HTTP: More retry parameters.
19
+ * `node`: renamed command `http_node_download` to `cat`, and it directly displays the content of the file in the terminal unless option `--output` is specified.
20
+
21
+ * 4.21.2
22
+
23
+ * New Features:
24
+ * **container**: Updated Ruby to 3.4.2
25
+ * Issues Fixed:
26
+ * **global**: #185 `@val:` shall stop processing extended values
27
+ * **global**: #186 Removed dependency on OpenSSL 3.3 gem to avoid MSYS2 dep on Windows.
28
+ * `echo`: Display of list (Array) was showing only first element of it.
29
+ * `transferd`: support for version 1.1.5+
30
+ * Breaking Changes:
31
+ * `preview`: Updated Image Magick to v7+
32
+ * `aoc`: `admin subscription` split into `admin subscription account` and `admin subscription usage`
33
+ * **agent**: `alpha` renamed to `desktop`
34
+
3
35
  * 4.21.1
4
36
 
5
37
  * New Features:
6
38
  * `config`: New command: `transferd` to list and install specific version of `asperatransferd` and `ascp`
7
- * `config`: New command: `token` to list and flush cached tokens.
8
- * `faspex5`: New command: `admin contact reset_password`
9
39
  * `config`: New command: `tokens` with `list`, `show`, `flush` (replace `flush_tokens`)
40
+ * `faspex5`: New command: `admin contact reset_password`
10
41
  * `aoc`: #178 packages can be browsed, and individual files can be downloaded now.
11
42
  * Issues Fixed:
43
+ * `config`: #175 `ascli config preset set GLOBAL version_check_days 0` causes a bad `config.yaml` to be written
12
44
  * `config`: #180 problem in `ascp install`
13
- * `aoc`: #184 token cache shall be different per aoc org.
14
45
  * `config`: Soft links in transfer SDK archive are correctly extracted
46
+ * `aoc`: #184 token cache shall be different per AoC org.
15
47
  * `aoc`: Fix `packages delete` not working.
16
48
  * `direct` agent: #174 Race condition fix with `ascp`: timeout waiting mgt port connect (select not readable)
17
- * `config`: #175 `ascli config preset set GLOBAL version_check_days 0` causes a bad `config.yaml` to be written
18
49
  * `preview`: #177 fix bug that prevents preview generation to work.
19
50
  * Breaking Changes:
20
- * **global** : Ruby minimum versions is now 3.1 (mainly due to switch to openssl 3). Future minimum is 3.2. Recommended is 3.4.
21
51
  * `transferd`: Use of Aspera Transfer Daemon requires minimum version 1.1.4. agent `trsdk` renamed `transferd`.
22
52
  * `ascp`: Default SDK version is now 1.1.4. Removes support for ascp4.
23
- * **global** : Options `transpose_single` and `multi_table` replaced with single option `multi_single` and values: `no`, `yes`, `single`.
24
- * **global** : Column name for single object is now `field` instead of `key`.
25
- * **global** : Ruby minimum versions is now 2.7 (2.6 previously, that removes macOS default ruby support, but newer ruby version can be installed on macOS)
26
53
  * `node`: Removed deprecated command prefix `exec:`, use `@ruby:` instead.
27
- * **global** : Now uses openssl 3.
54
+ * **global**: Now uses OpenSSL 3.
55
+ * **global**: Ruby minimum versions is now 3.1 (mainly due to switch to OpenSSL 3). Future minimum is 3.2. Recommended is 3.4. (that removes macOS default ruby support. Newer Ruby version shall be installed on macOS with `brew`)
56
+ * **global**: Options `transpose_single` and `multi_table` replaced with single option `multi_single` and values: `no`, `yes`, `single`.
57
+ * **global**: Column name for single object is now `field` instead of `key`.
28
58
 
29
59
  * 4.20.0
30
60
 
@@ -33,15 +63,15 @@
33
63
  * New Features:
34
64
  * `aoc`: Improved usability for creation of Admin shared folders.
35
65
  * `node`: New option `node_cache` (bool) for gen4 operations.
36
- * `node`: Option `root_id` now works always for node gen4, as well as `%id:` for file selection in addition to path.
66
+ * `node`: Option `root_id` now always works for node gen4, as well as `%id:` for file selection in addition to path.
37
67
  * `node`: `transfer list` now uses the `iteration_token` to retrieve all values. Option `once_only` is now supported.
38
- * **global** : option `http_options` now include retry options.
68
+ * **global**: option `http_options` now include retry options.
39
69
  * Issues Fixed:
40
70
  * `aoc`: Fixed `find` command not working. (undefined variable)
41
- * `aoc`: #165 aoc mkdir now follows the last link of containing folder
71
+ * `aoc`: #165 AoC mkdir now follows the last link of containing folder
42
72
  * Breaking Changes:
43
73
  * Internal: Basic REST calls now return data directly. (no more `data` key). For advanced calls, use `call`.
44
- * Internal: Transfer SDK download is now a 2-step procedure: First get the YAML file from github with URLS for the various platforms and versions, and then download the archive from the official IBM repository.
74
+ * Internal: Transfer SDK download is now a 2-step procedure: First get the YAML file from GitHub with URLs for the various platforms and versions, and then download the archive from the official IBM repository.
45
75
  **global**: option `format=multi` is replaced with option `multi_table=yes`
46
76
  * `faspex5`: removed deprecated option `value` replaced with positional parameter.
47
77
 
@@ -49,7 +79,7 @@
49
79
 
50
80
  * New Features:
51
81
  * `server`: add support for `async` (Aspera Sync) from Transfer SDK
52
- * **global**: #156 support sending folders with httpgw
82
+ * **global**: #156 support sending folders with `httpgw`
53
83
  * **global**: new value for option `format`: `multi`
54
84
  * Issues Fixed:
55
85
  * `aoc`: #157 fix problem with `files browse` on a link
@@ -160,7 +190,7 @@
160
190
  * **global**: option `pid_file` to write tool's PID during execution, deleted on exit
161
191
  * `config`: command `remote_certificate` to retrieve a remote certificate
162
192
  * `config`: added logger level `trace1` and `trace2`
163
- * `config`: `wizard` can detect multiple applications at the same address or url.
193
+ * `config`: `wizard` can detect multiple applications at the same address or URL.
164
194
  * `aoc`: wizard accepts public links
165
195
  * `aoc`: support private links, and possibility to list shared folder with workspace `@json:null`
166
196
  * `orchestrator`: error analysis for workflow start
@@ -168,7 +198,7 @@
168
198
  * `node`: added command `transfer sessions` to list all sessions of all transfers
169
199
  * `node`: generate bearer token from private key and user information
170
200
  * `node`: access node API with bearer token as credentials
171
- * **global**: agent `direct` allows ignoring certificate for wss using http options
201
+ * **global**: agent `direct` allows ignoring certificate for WSS using HTTP options
172
202
  * `preview`: command `show` generates a preview and displays it in terminal
173
203
  * Issues Fixed:
174
204
  * Ruby warning: `net/protocol.rb:68: warning: already initialized constant Net::ProtocRetryError` solved by removing dependency on `net-smtp` from gem spec (already in base ruby).
@@ -233,7 +263,7 @@
233
263
  * `faspex5`: list content of package, and allow partial download of package
234
264
  * `faspex5`: list packages support multiple pages and items limitations (`max` and `pmax`)
235
265
  * `aoc`: files operations with workspace-less user (#109)
236
- * `node`: async with gen3 token (#110)
266
+ * `node`: `async` with gen3 token (#110)
237
267
  * `node`: display of preview of file in terminal for access keys
238
268
  * Issues Fixed:
239
269
  * `cos`: do not use refresh token when not supported
@@ -249,10 +279,10 @@
249
279
  * **global**: `delete` operation supports option `value` for deletion parameters
250
280
  * `aoc`: command `aoc packages recv` accepts option `query` to specify a shared inbox
251
281
  * `faspex`: (v4) user delete accepts option `value` with value `{"destroy":true}` to delete users permanently
252
- * `faspex`: (v4) gateway to faspex 5 for package send
282
+ * `faspex`: (v4) gateway to Faspex 5 for package send
253
283
  * `faspex5`: possibility to change email templates
254
284
  * `faspex5`: shared folder list and browse
255
- * `faspex5`: emulate faspex 4 postprocessing, plugin: `faspex5` command: `postprocessing`
285
+ * `faspex5`: emulate Faspex 4 post-processing, plugin: `faspex5` command: `postprocessing`
256
286
  * `faspex5`: send package from remote source
257
287
  * `shares`: option `type` for command `shares admin user`
258
288
  * `shares`: full support for shares admin operations
@@ -268,14 +298,14 @@
268
298
  * New Features:
269
299
  * **global**: `vault`: secret finder, migration from config file
270
300
  * **global**: allow removal of transfer spec parameter by setting value to `null`
271
- * **global**: option `ascp_opts` allows to provide native `ascp` options on command line
301
+ * **global**: option `ascp_opts` allows providing native `ascp` options on command line
272
302
  * `node`, `server`: command `sync` added to `node` (gen4) and `server` plugins, also available in `aoc`
273
303
  * Issues Fixed:
274
304
  * **global**: security: no shell interpolation
275
305
  * **global**: agent `node`: when WSS is used: no localhost (certificate)
276
306
  * `aoc`: #99 `file download` for single shared folder
277
- * `faspex5`: change of API in faspex 5 for send package (paths is mandatory for any type of transfer now)
278
- * **global**: Oauth web authentication was broken, fixed now
307
+ * `faspex5`: change of API in Faspex 5 for send package (paths is mandatory for any type of transfer now)
308
+ * **global**: OAuth web authentication was broken, fixed now
279
309
  * Breaking Changes:
280
310
  * **container**: image has entry point
281
311
  * `aoc`: `admin res node` commands `v3` and `v4` replaced with `do` and command `v3` moved inside `do`
data/CONTRIBUTING.md CHANGED
@@ -9,34 +9,34 @@ Before you go ahead please search existing issues for your problem.
9
9
  To make sure that we can help you quickly please include and check the following information:
10
10
 
11
11
  - Include the `ascli` version you are running in your report.
12
- - If you are not running the latest version (please check), update.
12
+ - If you are not running the latest version (please check) then update.
13
13
  - Include your `ruby -e "puts RUBY_DESCRIPTION"`.
14
14
 
15
15
  Thanks!
16
16
 
17
17
  ## Making Contributions
18
18
 
19
- To fetch & test the gem for development, do:
19
+ To fetch and test the gem for development, do:
20
20
 
21
21
  ```bash
22
22
  git clone https://github.com/IBM/aspera-cli.git
23
23
  cd aspera-cli
24
- bundle install
25
- make test
26
24
  ```
27
25
 
26
+ Then see [Running Tests](#running-tests).
27
+
28
28
  If you want to contribute, please:
29
29
 
30
30
  - Fork the project.
31
31
  - Make your feature addition or bug fix.
32
- - Add tests for it. This is important so I don't break it in a future version unintentionally.
33
- - **Bonus Points** go out to anyone who also updates `CHANGELOG.md` :)
32
+ - Add tests for it. This is important, so it doesn't break in a future version unintentionally.
33
+ - Run `rubocop` to comply for coding standards
34
+ - Update `CHANGELOG.md`
34
35
  - Send a pull request on GitHub.
35
- - run `rubocop` to comply for coding standards
36
36
 
37
37
  ## Architecture
38
38
 
39
- A list of classes are provided in <docs/ml.png>
39
+ A list of classes are provided in <docs/uml.png>
40
40
 
41
41
  Architecture:
42
42
 
@@ -46,22 +46,49 @@ The entry point is: `lib/aspera/cli/main.rb`.
46
46
 
47
47
  Plugins are located in: `lib/aspera/cli/plugins`.
48
48
 
49
- Transfer agents, in: `lib/aspera/fasp`.
49
+ Transfer agents, in: `lib/aspera/agent`.
50
50
 
51
51
  ## Ruby version
52
52
 
53
- Install ruby with [RVM](https://rvm.io).
53
+ Install Ruby using your preferred method.
54
54
 
55
- Cleanup installed gems in `rvm` to start fresh:
55
+ To clean up installed gems to start fresh:
56
56
 
57
57
  ```bash
58
- make cleanup_gems
58
+ make clean_gems
59
59
  ```
60
60
 
61
61
  ## Tool chain
62
62
 
63
63
  TODO: document installation of tool chain.
64
64
 
65
+ Build system uses GNU Make.
66
+
67
+ ### Environment
68
+
69
+ A few macros/envvars control some aspects:
70
+
71
+ | macro | description |
72
+ |-----------------------------|--------------------------------------|
73
+ | `ASPERA_CLI_TEST_CONF_FILE` | Path to configuration file with secrets for tests |
74
+ | `ASPERA_CLI_TEST_MACOS` | Set to `true` if local HSTS running on macOS |
75
+ | `ASPERA_CLI_TEST_PRIVATE` | Path to private folder |
76
+ | `ENABLE_COVERAGE` | Tests with coverage analysis if set. |
77
+ | `SIGNING_KEY` | Path to signing key to build Gem. |
78
+ | `GEM_VERSION` | Gem version to build container |
79
+
80
+ Those macros can be set either in an env var, or on the `make` command line.
81
+
82
+ > **Note:** vars `ASPERA_CLI_TEST_` are typically set in user's shell profile.
83
+
84
+ To use the CLI directly from the development environment, add this to your shell profile:
85
+
86
+ ```bash
87
+ dev_ascli=$HOME/github/aspera-cli
88
+ export PATH=$dev_ascli/bin:$PATH
89
+ export RUBYLIB=$dev_ascli/lib:$RUBYLIB
90
+ ```
91
+
65
92
  ### Documentation
66
93
 
67
94
  Documentation is generated with `pandoc` and `LaTeX`.
@@ -83,7 +110,8 @@ tlmgr install fvextra selnolig lualatex-math
83
110
 
84
111
  ## Running Tests
85
112
 
86
- First, a testing configuration file must be created, from project top folder:
113
+ First, a testing configuration file must be created.
114
+ From project top folder, execute:
87
115
 
88
116
  ```bash
89
117
  mkdir ~/some_secure_folder
@@ -104,7 +132,7 @@ This project uses a `Makefile` for tests:
104
132
  make test
105
133
  ```
106
134
 
107
- When new commands are added to the CLI, new tests shall be added to the test suite.
135
+ When new commands are added to the CLI, new tests shall be added to the test suite in `tests/Makefile`.
108
136
 
109
137
  ### Special tests
110
138
 
@@ -121,110 +149,40 @@ To run every test: `make full`
121
149
 
122
150
  For preparation of a release, do the following:
123
151
 
124
- 1. Select a ruby version to test with: `rvm use 3.2.2`
152
+ 1. Select a ruby version to test with.
125
153
  2. Remove all gems: `make clean_gems`
126
- 3. Starts tests: `make test`
127
- 4. Install optional gems: `make install_optional_gems`
128
- 5. Test remaining cases: `cd tests` and then `make optional` and `make interactive`
129
-
130
- This ensures that optional gems do not prevent `ascli` to run.
154
+ 3. `cd tests && make full`
131
155
 
132
156
  To test additional Ruby version, repeat the procedure with other Ruby versions.
133
157
 
134
158
  ## Coverage
135
159
 
136
160
  A coverage report can be generated in folder `coverage` using gem `SimpleCov`.
137
- Enable coverage monitoring using env var `ENABLE_COVERAGE`.
161
+ Enable coverage monitoring using macro/envvar `ENABLE_COVERAGE`.
138
162
 
139
163
  ```bash
140
- ENABLE_COVERAGE=1 make test
164
+ cd tests
165
+ make ENABLE_COVERAGE=1
141
166
  ```
142
167
 
143
168
  Once tests are completed, or during test, consult the page: [coverage/index.html](coverage/index.html)
144
169
 
145
170
  ## Build
146
171
 
147
- By default the gem is built signed: `make`.
148
- The appropriate signing key is required, and its path must be set to env var `SIGNING_KEY`.
149
- It is also possible to build a non-signed version for development purpose: `make unsigned_gem`.
150
-
151
- ### Gem Signature
152
-
153
- Refer to:
154
-
155
- - <https://guides.rubygems.org/security/>
156
- - <https://ruby-doc.org/current/stdlibs/rubygems/Gem/Security.html>
157
- - `gem cert --help`
158
-
159
- Then procedure is as follows:
160
-
161
- - The maintainer creates the initial certificate and a private key:
162
-
163
- ```bash
164
- cd /path/to/vault
165
- gem cert --build maintainer@example.com
166
- ```
167
-
168
- > **Note:** The email must match the field `spec.email` in `aspera-cli.gemspec`
169
-
170
- This creates two files in folder `/path/to/vault` (e.g. $HOME/.ssh):
171
-
172
- - `gem-private_key.pem` : This file shall be kept secret in a vault.
173
- - `gem-public_cert.pem` : This file is copied to a public place, here in folder `certs`
174
-
175
- > **Note:** Alternatively, use an existing key or generate one, and then `make new-cert`
176
-
177
- - The maintainer builds the signed gem.
178
-
179
- The gem is signed with the public certificate found in `certs` and the private key (kept secret by maintainer).
180
-
181
- To build the signed gem:
182
-
183
- ```bash
184
- SIGNING_KEY=/path/to/vault/gem-private_key.pem make
185
- ```
186
-
187
- - The user can activate gem signature verification on installation:
188
-
189
- Add the certificate to gem trusted certificates:
190
-
191
- ```bash
192
- curl https://raw.githubusercontent.com/IBM/aspera-cli/main/certs/aspera-cli-public-cert.pem -so aspera-cli-certificate.pem
193
- gem cert --add aspera-cli-certificate.pem
194
- rm aspera-cli-certificate.pem
195
- ```
172
+ By default, the gem is built signed: `make`.
173
+ A private key is required to generate a signed Gem.
174
+ Its path must be set using macro/envvar `SIGNING_KEY`, see below.
175
+ The gem is signed with the public certificate found in `certs` and the private key (kept secret by maintainer).
196
176
 
197
- - The user installs the gem with `HighSecurity` or `MediumSecurity`: this will succeed only of the gem is trusted.
198
-
199
- ```bash
200
- gem install -P HighSecurity aspera-cli
201
- ```
202
-
203
- - The maintainer can renew the certificate when it is expired using the same private key:
204
-
205
- ```bash
206
- SIGNING_KEY=/path/to/vault/gem-private_key.pem make update-cert
207
- ```
208
-
209
- Alternatively, to generate a new certificate with the same key:
210
-
211
- ```bash
212
- SIGNING_KEY=/path/to/vault/gem-private_key.pem make new-cert
213
- ```
214
-
215
- - Show the current certificate contents
216
-
217
- ```bash
218
- make show-cert
219
- ```
177
+ ```bash
178
+ make SIGNING_KEY=/path/to/vault/gem-private_key.pem
179
+ ```
220
180
 
221
- > Note: to provide a passphrase add argument: `-passin pass:_value_` to `openssl`
181
+ It is also possible to build an unsigned version for development purpose: `make unsigned_gem`.
222
182
 
223
- - Check that the signing key is the same as used to sign the certificate:
183
+ ### Gem Signature
224
184
 
225
- ```bash
226
- SIGNING_KEY=/path/to/vault/gem-private_key.pem make check-cert-key
227
- ```
185
+ Refer to <certs/README.md>
228
186
 
229
187
  ### gRPC stubs for transfer SDK
230
188
 
@@ -236,73 +194,36 @@ make grpc
236
194
 
237
195
  It downloads the latest proto file and then compiles it.
238
196
 
239
- ## Docker image build
197
+ ## Container image build
240
198
 
241
- The `Dockerfile.tmpl.erb` template allows customization of the optional copying of the `aspera-cli.gem` file, as opposed to installing from rubygems.org. It also supports customizing the retrieval of the SDK.
199
+ See [Container build](./container/README.md).
242
200
 
243
- ### Default image build
244
-
245
- Build the image:
201
+ For operations, move to the folder:
246
202
 
247
203
  ```bash
248
- make docker
204
+ cd container
249
205
  ```
250
206
 
251
- This does the following:
252
-
253
- - Install the official gem version directly from <rubygems.org>.
254
- - Build the image for the version number in the current repository
255
- - creates tags for both the version and `latest`
256
-
257
- > **Note:** This target creates the `Dockerfile` from an `ERB` (embedded Ruby) template (Makefile target `dockerfile`).
258
- A template is used as it allows some level of customization to tell where to take the gem from, as as for the SDK file.
259
-
260
- Then, to push to the image registry (both tags: version and `latest`):
261
-
262
- ```bash
263
- make docker_push
264
- ```
265
-
266
- ### Specific version image build
267
-
268
- To build a specific version: override `make` macro `GEM_VERSION`:
269
-
270
- ```bash
271
- make docker GEM_VERSION=4.11.0
272
- make docker_push GEM_VERSION=4.11.0
273
- ```
274
-
275
- > **Note:** This does not use the locally generated gem file.
276
- Only the local docker file is used.
277
- The gem is installed from rubygems.org. This also sets the `latest` tag.
207
+ ## Single executable build
278
208
 
279
- ### Development version image build
209
+ See [Executable build](./binary/README.md).
280
210
 
281
- To build/push a beta/development container:
282
- it does not create the `latest` tag, it uses the gem file generated locally with a special version number.
211
+ For operations, move to the folder:
283
212
 
284
213
  ```bash
285
- make docker_beta
286
- make docker_push_beta
214
+ cd binary
287
215
  ```
288
216
 
289
- ## Single executable build
290
-
291
- Initially, `rubyc` (gem [`ruby-packer`](https://github.com/pmq20/ruby-packer) and [here](https://github.com/you54f/ruby-packer)) was used to build a single executable.
217
+ ## Development check list for new release
292
218
 
293
- <https://www.tebako.org/>
219
+ When preparing for a new release do the following:
294
220
 
295
- A modern version of this is now used: [`tebako`](https://github.com/tamatebako/tebako) for which a container is provided.
296
-
297
- ```bash
298
- make single GEM_VERSION=4.11.0
299
- ```
221
+ - TODO
300
222
 
301
223
  ## Long Term Implementation and delivery improvements
302
224
 
303
- - replace rest and oauth classes with ruby standard gems:
225
+ - replace Rest and OAuth classes with ruby standard gems:
304
226
  - <https://github.com/rest-client/rest-client>
305
227
  - <https://github.com/oauth-xx/oauth2>
306
228
  - use gem Thor <http://whatisthor.com/> (or other standard Ruby CLI manager)
307
- - Package a single-file executable for various architectures with <https://github.com/pmq20/ruby-packer> (`rubyc`)
308
229
  - look at <https://github.com/phusion/traveling-ruby>