aspera-cli 4.25.4 → 4.26.0.pre

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: 34cb77d2badea1e3650f2aed72fb3a91c419e6457a08acd62808c9a6d9ab0e74
4
- data.tar.gz: 31e1e1a28d99afebd6b6a3f7b9e848bf18256d47fdc7108368a6e964eef03b04
3
+ metadata.gz: fc6adc843448ed8b76da0786b419be39fe4531daa0da0254f8cdb7503a131f4f
4
+ data.tar.gz: 217a266117e6a2ac2f0512016d71a7fa4e9a1b67924e3e73ca5b7a29cc54a76a
5
5
  SHA512:
6
- metadata.gz: e15bfb65919b8b8a6112120eca273dac962ff6d6b29d890df1e9293f4321e557bdd68697c394cb6ef738a3d5bcc3a75a2f7f177494b66542c2e970c4da99e9d0
7
- data.tar.gz: 1d3570c590e7bfbda3ce5fc49396637471f48ff6fccce7235ae31adcc23c1e1ccc4a978d6bdbe9a4c1c06f06e02ed5336043267891c0b56a995b4d0199ab0d92
6
+ metadata.gz: 8977f967425a7a53c585d64902619366c197b6897231515ec84dd1b76e4a70eb767da6ce5cbe32f0f3005e70d222e1dc5d65fcf3bfe2c8044d4cf7349396e692
7
+ data.tar.gz: 7ac9b790563f1f8d11c1156f337ed4fb81313c64b11e1dc7b85909b91c87f06d0a6024176352a01c51397626d75ec20a66c9311dd8a5f88042cff7b0a23fdc44
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  <!-- markdownlint-configure-file { "no-duplicate-heading": { "siblings_only": true } } -->
4
4
 
5
+ ## 4.26.0.pre
6
+
7
+ Released: [Place date of release here]
8
+
9
+ ### New Features
10
+
11
+ * `faspex5`: When sending a package, recipients specified in fields `private_recipients`, `notified_on_upload`, `notified_on_download` and `notified_on_receipt` are now also expanded like field `recipients`.
12
+
13
+ ### Issues Fixed
14
+
15
+ * `sync`: #251 in `admin` command: Fixed database path on Windows: Use `~private-asp` instead of `.private-asp`.
16
+ * `config`: Fixed `preset update` with dot-path options.
17
+
18
+ ### Breaking Changes
19
+
5
20
  ## 4.25.4
6
21
 
7
22
  Released: 2026-03-04
@@ -301,7 +316,7 @@ Released: 2025-01-21
301
316
 
302
317
  * Internal: Basic REST calls now return data directly. (no more `data` key). For advanced calls, use `call`.
303
318
  * 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.
304
- **global**: Option `format=multi` is replaced with option `multi_table=yes`.
319
+ * **global**: Option `format=multi` is replaced with option `multi_table=yes`.
305
320
  * `faspex5`: Removed deprecated option `value` replaced with positional parameter.
306
321
 
307
322
  ## 4.19.0
@@ -1065,7 +1080,7 @@ Released: 2021-02-03
1065
1080
 
1066
1081
  ### New Features
1067
1082
 
1068
- * The option `value` of command `find`, to filter on name, is not optional.
1083
+ * The option `value` of command `find` to filter on name is mandatory.
1069
1084
  * `find` now also reports all types (file, folder, link).
1070
1085
  * `find` now is able to report all fields (type, size, etc...).
1071
1086
 
@@ -1095,7 +1110,7 @@ Released: 2021-02-03
1095
1110
  ### New Features
1096
1111
 
1097
1112
  * Improved wizard (prepare for AoC global client id).
1098
- * Preview generator: Added option : --skip-format=&lt;png,mp4&gt;.
1113
+ * Preview generator: Added option : `skip_format` with values `png`, `mp4`.
1099
1114
  * Removed outdated pictures from this doc.
1100
1115
 
1101
1116
  ## 0.9.19
@@ -1163,7 +1178,7 @@ Released: 2021-02-03
1163
1178
 
1164
1179
  ### New Features
1165
1180
 
1166
- * `faspex`: Use option `once_only` set to `yes` to enable cargo like function. id=NEW deprecated.
1181
+ * `faspex`: Use option `once_only` set to `yes` to enable cargo like function. `id=NEW` deprecated.
1167
1182
  * `aoc`: Share to share transfer with command `transfer`.
1168
1183
 
1169
1184
  ## 0.9.7
@@ -1172,8 +1187,8 @@ Released: 2021-02-03
1172
1187
 
1173
1188
  * Homogeneous transfer spec for `node` and [`direct`](README.md#agt_direct) transfer agents.
1174
1189
  * Preview persistency goes to unique file by default.
1175
- * Catch mxf extension in preview as video.
1176
- * Faspex: Possibility to download all packages by specifying id=ALL.
1190
+ * Catch `mxf` extension in preview as video.
1191
+ * Faspex: Possibility to download all packages by specifying `id=ALL`.
1177
1192
  * Faspex: To come: Cargo-like function to download only new packages with id=NEW.
1178
1193
 
1179
1194
  ## 0.9.6
data/CONTRIBUTING.md CHANGED
@@ -12,7 +12,7 @@ To help us diagnose and resolve the issue efficiently, please include the follow
12
12
 
13
13
  - The `ascli` version you are using:
14
14
 
15
- ```bash
15
+ ```shell
16
16
  ascli -v
17
17
  ```
18
18
 
@@ -20,7 +20,7 @@ To help us diagnose and resolve the issue efficiently, please include the follow
20
20
 
21
21
  - **Your Ruby environment details**:
22
22
 
23
- ```bash
23
+ ```shell
24
24
  ruby -v
25
25
  ```
26
26
 
@@ -32,7 +32,7 @@ We welcome contributions to improve the `aspera-cli` project!
32
32
 
33
33
  Clone the repository to initialize the development environment:
34
34
 
35
- ```bash
35
+ ```shell
36
36
  git clone https://github.com/IBM/aspera-cli.git
37
37
  cd aspera-cli
38
38
  bundle install
@@ -91,7 +91,7 @@ You can manage your Ruby installation using your preferred tool (e.g., `rbenv`,
91
91
 
92
92
  To start with a clean state and remove all installed gems:
93
93
 
94
- ```bash
94
+ ```shell
95
95
  bundle exec rake tools:clean_gems
96
96
  ```
97
97
 
@@ -109,9 +109,9 @@ The following environment variables and macros control specific build behaviors:
109
109
  | Environment variable | Contents | Description |
110
110
  |-----------------------------|------------| -------------------------------------------------------------|
111
111
  | `ASPERA_CLI_TEST_CONF_URL` | URL | URL for the configuration file containing secrets for tests. |
112
- | `ASPERA_CLI_DOC_CHECK_LINKS`| yes/no | Validates that links exist during documentation generation. |
113
- | `LOG_SECRETS` | yes/no | Toggles the logging of secrets in `rake` tasks. |
114
- | `LOG_LEVEL` | debug, ... | Sets the logging verbosity for `rake` tasks. |
112
+ | `ASPERA_CLI_DOC_CHECK_LINKS`| `yes`/`no` | Validates that links exist during documentation generation. |
113
+ | `LOG_SECRETS` | `yes`/`no` | Toggles the logging of secrets in `rake` tasks. |
114
+ | `LOG_LEVEL` | `debug`, ... | Sets the logging verbosity for `rake` tasks. |
115
115
  | `ENABLE_COVERAGE` | set/unset | Enables test coverage analysis when defined. |
116
116
  | `SIGNING_KEY` | File path | Path to the signing key used for building the gem file. |
117
117
  | `SIGNING_KEY_PEM` | PEM Value | The PEM content of the signing key. |
@@ -121,11 +121,11 @@ These values can be set as standard environment variables or passed directly to
121
121
  Setting `SIGNING_KEY_PEM` automatically generates a file at `$HOME/.gem/signing_key.pem` and sets the `SIGNING_KEY` variable accordingly.
122
122
 
123
123
  > [!NOTE]
124
- > `ASPERA_CLI_*` variables are typically defined in your shell profile for development, while others are intended for ad-hoc command-line use.
124
+ > `ASPERA_CLI_TEST_CONF_URL` is typically defined in your shell profile for development, while others are usually for ad-hoc command-line use.
125
125
 
126
126
  To run the CLI directly from your source directory, add the following to your shell profile (adjust the path as necessary):
127
127
 
128
- ```bash
128
+ ```shell
129
129
  dev_ascli=$HOME/github/aspera-cli
130
130
  export PATH=$dev_ascli/bin:$PATH
131
131
  export RUBYLIB=$dev_ascli/lib:$RUBYLIB
@@ -140,24 +140,24 @@ Installation instructions can be found at [IBM Plex](https://www.ibm.com/plex/).
140
140
 
141
141
  On macOS, install `lualatex` and required packages via Homebrew:
142
142
 
143
- ```bash
143
+ ```shell
144
144
  brew install texlive
145
145
  ```
146
146
 
147
147
  If using an alternative installation method, ensure the following packages are present:
148
148
 
149
- ```bash
149
+ ```shell
150
150
  tlmgr update --self
151
151
  tlmgr install fvextra selnolig lualatex-math
152
152
  ```
153
153
 
154
- - To validate URLs during generation: `ASPERA_CLI_DOC_CHECK_LINKS=1`.
154
+ - Validate URLs during generation: `ASPERA_CLI_DOC_CHECK_LINKS=yes`.
155
155
 
156
- - To debug the generation process: `ASPERA_CLI_DOC_DEBUG=debug`.
156
+ - Debug the generation process: `ASPERA_CLI_DOC_DEBUG=debug`.
157
157
 
158
- - To build the documentation:
158
+ - Build the documentation:
159
159
 
160
- ```bash
160
+ ```shell
161
161
  rake doc:build
162
162
  ```
163
163
 
@@ -169,14 +169,14 @@ Detailed testing information can be found in <tests/README.md>.
169
169
 
170
170
  To build an unsigned gem:
171
171
 
172
- ```bash
172
+ ```shell
173
173
  bundle install
174
174
  bundle exec rake unsigned
175
175
  ```
176
176
 
177
177
  To exclude optional gems from the installation:
178
178
 
179
- ```bash
179
+ ```shell
180
180
  bundle config set without optional
181
181
  ```
182
182
 
@@ -185,7 +185,7 @@ bundle config set without optional
185
185
  Generating a signed gem requires a **private key**, specified via the `SIGNING_KEY` environment variable.
186
186
  The gem is signed using the public certificate in `certs` and the **private key**.
187
187
 
188
- ```bash
188
+ ```shell
189
189
  bundle exec rake SIGNING_KEY=/path/to/vault/gem-private_key.pem
190
190
  ```
191
191
 
@@ -195,7 +195,7 @@ For more details, see <certs/README.md>.
195
195
 
196
196
  To update the stubs:
197
197
 
198
- ```bash
198
+ ```shell
199
199
  bundle exec rake tools:grpc
200
200
  ```
201
201
 
@@ -211,7 +211,7 @@ Refer to the [Executable build guide](build/binary/README.md).
211
211
 
212
212
  To list related `rake` tasks:
213
213
 
214
- ```bash
214
+ ```shell
215
215
  bundle exec rake -T ^binary:
216
216
  ```
217
217
 
@@ -234,17 +234,23 @@ Before a new release, ensure the following:
234
234
 
235
235
  - **Pass all tests**:
236
236
 
237
- ```bash
237
+ ```shell
238
238
  bundle exec rake test:run
239
239
  ```
240
240
 
241
241
  - **Verify container builds** (using the local gem):
242
242
 
243
- ```bash
243
+ ```shell
244
244
  bundle exec rake container:build'[local]'
245
245
  bundle exec rake container:test
246
246
  ```
247
247
 
248
+ - **Check documentation links**:
249
+
250
+ ```shell
251
+ bundle exec rake doc:build ASPERA_CLI_DOC_CHECK_LINKS=yes
252
+ ```
253
+
248
254
  ### Automated Release Process
249
255
 
250
256
  Releases are managed through the GitHub Actions UI via the **New Release on GitHub** workflow (`.github/workflows/release.yml`).
data/README.md CHANGED
@@ -5,6 +5,8 @@
5
5
  [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5861/badge)](https://bestpractices.coreinfrastructure.org/projects/5861)
6
6
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
7
7
 
8
+ ![Hootput the Owl](docs/mascot.svg)
9
+
8
10
  **`ascli`** is the command-line interface for IBM Aspera products.
9
11
  Use it from the terminal or in scripts to:
10
12
 
@@ -18,8 +20,8 @@ Choose what best suits you:
18
20
 
19
21
  | Resource | Link |
20
22
  | -------- | ---- |
21
- | **Online manual** | [docs/README.md](docs/README.md) |
22
- | **PDF manual** | In [releases](https://github.com/IBM/aspera-cli/releases) |
23
+ | **Online manual** | [GitHub docs/README.md](https://github.com/IBM/aspera-cli/blob/main/docs/README.md) |
24
+ | **PDF manual** | In [GitHub Releases](https://github.com/IBM/aspera-cli/releases) |
23
25
  | **RubyGems** | [rubygems.org/gems/aspera-cli](https://rubygems.org/gems/aspera-cli) |
24
26
  | **RubyDoc** | [rubydoc.info/gems/aspera-cli](https://www.rubydoc.info/gems/aspera-cli) |
25
27
  | **Docsify** | [online](https://docsify-this.net/?basePath=https://raw.githubusercontent.com/IBM/aspera-cli/main/docs&homepage=README.md&sidebar=true&browser-tab-title=Aspera%20CLI%20Manual&hide-credits=true&maxLevel=4&externalLinkTarget=_blank&image-captions=true&dark-mode=auto) |
@@ -34,7 +36,7 @@ ascli config transferd install
34
36
  ```
35
37
 
36
38
  The second command installs the **FASP** transfer engine (`ascp`).
37
- For other install methods (single executable, Docker, Chocolatey, Homebrew), see the [user manual](docs/README.md#installation).
39
+ For other install methods (single executable, Docker, Chocolatey, Homebrew), see the [user manual](https://github.com/IBM/aspera-cli/blob/main/docs/README.md#installation).
38
40
 
39
41
  **Quick check:**
40
42
 
@@ -44,13 +46,13 @@ ascli -v
44
46
 
45
47
  ## Contributing
46
48
 
47
- - **Bugs & features:** [BUGS.md](BUGS.md)
48
- - **How to contribute:** [CONTRIBUTING.md](CONTRIBUTING.md)
49
- - **Release notes:** [CHANGELOG.md](CHANGELOG.md)
49
+ - **Bugs & features:** [BUGS.md](https://github.com/IBM/aspera-cli/blob/main/BUGS.md)
50
+ - **How to contribute:** [CONTRIBUTING.md](https://github.com/IBM/aspera-cli/blob/main/CONTRIBUTING.md)
51
+ - **Release notes:** [CHANGELOG.md](https://github.com/IBM/aspera-cli/blob/main/CHANGELOG.md)
50
52
 
51
53
  Commands map to Aspera REST APIs; see the manual for options.
52
54
  For debugging, use `--log-level=debug`.
53
55
 
54
56
  ## License
55
57
 
56
- [Apache-2.0](LICENSE)
58
+ [Apache-2.0](https://github.com/IBM/aspera-cli/blob/main/LICENSE)
@@ -25,25 +25,27 @@ module Aspera
25
25
  private_constant :LISTEN_LOCAL_ADDRESS, :SELECT_AVAILABLE_PORT
26
26
 
27
27
  # Options: same as values in option `transfer_info`
28
- # @param ascp_args [Array] (Params) Optional Additional arguments to ascp
29
- # @param wss [Boolean] (Params) `true`: if both SSH and wss in ts: prefer wss
30
- # @param quiet [Boolean] (Params) By default no native `ascp` progress bar
31
- # @param monitor [Boolean] (Params) Set to `false` to eliminate management port
32
- # @param trusted_certs [Array] (Params) Optional list of files with trusted certificates (stores)
33
- # @param client_ssh_key [String] (Params) Client SSH key option (from CLIENT_SSH_KEY_OPTIONS)
34
- # @param check_ignore_cb [Proc] (Params) Callback with host,port
28
+ # (Args) : Options that influence `ascp` arguments.
29
+ #
30
+ # @param ascp_args [Array] (Args) Optional Additional arguments to ascp
31
+ # @param wss [Boolean] (Args) `true`: if both SSH and wss in ts: prefer wss
32
+ # @param quiet [Boolean] (Args) By default no native `ascp` progress bar
33
+ # @param client_ssh_key [String] (Args) Client SSH key option (from CLIENT_SSH_KEY_OPTIONS)
34
+ # @param trusted_certs [Array<String>] (Args) (WSS) Optional list of files with trusted certificates (stores)
35
+ # @param check_ignore_cb [Proc] (Args) (WSS) Callback with host,port to check if WSS connection shall ignore certificate validity
35
36
  # @param spawn_timeout_sec [Integer] Timeout for ascp spawn
36
37
  # @param spawn_delay_sec [Integer] Optional delay to start between sessions
37
38
  # @param multi_incr_udp [Boolean] Optional `true`: increment UDP port for each session
38
39
  # @param resume [Hash] Optional Resume policy
40
+ # @param monitor [Boolean] Set to `false` to eliminate management port
39
41
  # @param management_cb [Proc] callback for management events
40
42
  # @param base_options [Hash] other options for base class
41
43
  def initialize(
42
44
  ascp_args: nil,
43
45
  wss: true,
44
46
  quiet: true,
45
- trusted_certs: nil,
46
47
  client_ssh_key: nil,
48
+ trusted_certs: nil,
47
49
  check_ignore_cb: nil,
48
50
  spawn_timeout_sec: 2,
49
51
  spawn_delay_sec: 2,
@@ -22,11 +22,11 @@ module Aspera
22
22
  Dir.children(File.dirname(File.expand_path(__FILE__)))
23
23
  .select{ |file| file.end_with?(Environment::RB_EXT)}
24
24
  .map{ |file| File.basename(file, Environment::RB_EXT).to_sym}
25
- .reject{ |item| IGNORED_ITEMS.include?(item)}.each_with_object({}) do |agent_sym, hash|
26
- hash[agent_sym] = {
25
+ .reject{ |item| IGNORED_ITEMS.include?(item)}.to_h do |agent_sym|
26
+ [agent_sym, {
27
27
  long: agent_sym.to_s.capitalize,
28
28
  short: agent_sym.eql?(:direct) ? :a : agent_sym.to_s[0].to_sym
29
- }.freeze
29
+ }.freeze]
30
30
  end.freeze
31
31
  private_constant :IGNORED_ITEMS
32
32
  end
@@ -59,7 +59,7 @@ module Aspera
59
59
  ts_tags = transfer_spec['tags']
60
60
  ts_tags[Transfer::Spec::TAG_RESERVED]['xfer_retry'] ||= 150 if ts_tags.is_a?(Hash) && ts_tags[Transfer::Spec::TAG_RESERVED].is_a?(Hash)
61
61
  # Optimization in case of sending to the same node
62
- # TODO: probably remove this, as /etc/hosts shall be used for that
62
+ # TODO: probably remove this, as /etc/hosts shall be used for that on server side.
63
63
  transfer_spec['remote_host'] = '127.0.0.1' if !transfer_spec['wss_enabled'] && transfer_spec['remote_host'].eql?(URI.parse(node_api_.base_url).host)
64
64
  resp = node_api_.create('ops/transfers', transfer_spec)
65
65
  @transfer_id = resp['id']
@@ -3,6 +3,7 @@
3
3
  require 'aspera/api/aoc.rb'
4
4
  module Aspera
5
5
  module Api
6
+ # Aspera License Entitlement Engine API client
6
7
  class Alee < Aspera::Rest
7
8
  def initialize(entitlement_id, customer_id, api_domain: AoC::SAAS_DOMAIN_PROD, version: 'v1')
8
9
  super(
@@ -7,11 +7,15 @@ require 'aspera/hash_ext'
7
7
  require 'aspera/data_repository'
8
8
  require 'aspera/transfer/spec'
9
9
  require 'aspera/api/node'
10
+ require 'aspera/rest_list'
10
11
  require 'base64'
11
12
 
12
13
  module Aspera
13
14
  module Api
15
+ # Aspera on Cloud API client
14
16
  class AoC < Rest
17
+ include RestList
18
+
15
19
  PRODUCT_NAME = 'Aspera on Cloud'
16
20
  # use default workspace if it is set, else none
17
21
  DEFAULT_WORKSPACE = ''
@@ -144,7 +148,7 @@ module Aspera
144
148
 
145
149
  # Call `block` with same query using paging and response information.
146
150
  # Block must return a 2 element `Array` with data and http response
147
- # @param query [Hash] Additionnal query parameters
151
+ # @param query [Hash] Additional query parameters
148
152
  # @return [Hash] Items and total number of items
149
153
  # @option return [Array<Hash>] :items The list of items
150
154
  # @option return [Integer] :total The total number of items
@@ -209,7 +213,7 @@ module Aspera
209
213
  when 'upload' then %w[mkdir write]
210
214
  when Array
211
215
  Aspera.assert_array_all(levels, String){'access_levels'}
212
- levels.each{ |level| Aspera.assert_value(level, Node::ACCESS_LEVELS){'access_level'}}
216
+ levels.each{ |level| Aspera.assert_values(level, Node::ACCESS_LEVELS){'access_level'}}
213
217
  levels
214
218
  else Aspera.error_unexpected_value(levels){"access_levels must be a list of #{Node::ACCESS_LEVELS.join(', ')} or one of edit, preview, download, upload"}
215
219
  end
@@ -492,7 +496,7 @@ module Aspera
492
496
  # in that case, the name is resolved and replaced with {type: , id: }
493
497
  # @param package_data [Hash] The whole package creation payload
494
498
  # @param rcpt_lst_field [String] The field in structure, i.e. recipients or bcc_recipients
495
- # @param new_user_option [Hash] Additionnal fields for contact creation
499
+ # @param new_user_option [Hash] Additional fields for contact creation
496
500
  # @return nil, `package_data` is modified
497
501
  def resolve_package_recipients(package_data, rcpt_lst_field, new_user_option)
498
502
  return unless package_data.key?(rcpt_lst_field)
@@ -510,7 +514,7 @@ module Aspera
510
514
  # email: user, else dropbox
511
515
  entity_type = short_recipient_info.include?('@') ? 'contacts' : 'dropboxes'
512
516
  begin
513
- full_recipient_info = lookup_by_name(entity_type, short_recipient_info, query: {'current_workspace_id' => ws_id})
517
+ full_recipient_info = lookup_by_name(entity_type, short_recipient_info, query: {'workspace_id' => ws_id})
514
518
  rescue EntityNotFound
515
519
  # dropboxes cannot be created on the fly
516
520
  Aspera.assert_values(entity_type, 'contacts', type: Error){"No such shared inbox in workspace #{ws_id}"}
@@ -5,7 +5,7 @@ require 'aspera/rest'
5
5
 
6
6
  module Aspera
7
7
  module Api
8
- # ATS API without authentication
8
+ # Aspera Transfer Service API client without authentication
9
9
  class Ats < Aspera::Rest
10
10
  SERVICE_BASE_URL = 'https://ats.aspera.io'
11
11
  # currently supported clouds
@@ -7,6 +7,7 @@ require 'xmlsimple'
7
7
 
8
8
  module Aspera
9
9
  module Api
10
+ # Cloud Object Storage Node API Client
10
11
  class CosNode < Node
11
12
  IBM_CLOUD_TOKEN_URL = 'https://iam.cloud.ibm.com/identity'
12
13
  TOKEN_FIELD = 'delegated_refresh_token'
@@ -2,10 +2,11 @@
2
2
 
3
3
  require 'aspera/rest'
4
4
  require 'aspera/oauth/base'
5
+ require 'aspera/rest_list'
5
6
  require 'digest'
6
7
 
7
8
  module Aspera
8
- # Implement OAuth for Faspex public link
9
+ # OAuth for Faspex public link
9
10
  class FaspexPubLink < OAuth::Base
10
11
  class << self
11
12
  attr_accessor :additional_info
@@ -55,7 +56,10 @@ module Aspera
55
56
  end
56
57
  OAuth::Factory.instance.register_token_creator(FaspexPubLink)
57
58
  module Api
59
+ # Aspera Faspex 5 API Client
58
60
  class Faspex < Aspera::Rest
61
+ include RestList
62
+
59
63
  # endpoint for authentication API
60
64
  PATH_AUTH = 'auth'
61
65
  PATH_API_V5 = 'api/v5'
@@ -4,6 +4,7 @@ require 'aspera/log'
4
4
  require 'aspera/rest'
5
5
  require 'aspera/transfer/faux_file'
6
6
  require 'aspera/assert'
7
+ require 'net/protocol'
7
8
  require 'securerandom'
8
9
  require 'websocket'
9
10
  require 'base64'
@@ -11,6 +12,7 @@ require 'json'
11
12
 
12
13
  module Aspera
13
14
  module Api
15
+ # Aspera HTTP Gateway API client
14
16
  # Start a transfer using Aspera HTTP Gateway, using web socket secure for uploads
15
17
  # ref: https://api.ibm.com/explorer/catalog/aspera/product/ibm-aspera/api/http-gateway-api/doc/guides-toc
16
18
  # https://developer.ibm.com/apis/catalog?search=%22aspera%20http%22
@@ -14,7 +14,8 @@ require 'net/ssh/buffer'
14
14
 
15
15
  module Aspera
16
16
  module Api
17
- # Provides additional functions using node API with gen4 extensions (access keys)
17
+ # Aspera Node API client
18
+ # with gen4 extensions (access keys)
18
19
  class Node < Rest
19
20
  # Format of node scope : node.<access key>:<scope>
20
21
  module Scope
@@ -508,7 +509,7 @@ module Aspera
508
509
  # Get the transfer user from info on access key
509
510
  transfer_spec['remote_user'] = info['transfer_user'] if info['transfer_user']
510
511
  # Get settings from name.value array to hash key.value
511
- settings = info['settings']&.each_with_object({}){ |i, h| h[i['name']] = i['value']}
512
+ settings = info['settings']&.to_h{ |i| [i['name'], i['value']]}
512
513
  # Check WSS ports
513
514
  Transfer::Spec::WSS_FIELDS.each do |i|
514
515
  transfer_spec[i] = settings[i] if settings.key?(i)
@@ -83,16 +83,15 @@ module Aspera
83
83
 
84
84
  # @return [Hash] with key = file name (String), and value = path to file
85
85
  def file_paths
86
- return SDK_FILES.each_with_object({}) do |v, m|
87
- m[v.to_s] =
88
- begin
89
- path(v)
90
- rescue Errno::ENOENT => e
91
- e.message.gsub(/.*assertion failed: /, '').gsub(/\): .*/, ')')
92
- rescue => e
93
- e.message
94
- end
95
- end
86
+ return SDK_FILES.to_h do |v|
87
+ [v.to_s, begin
88
+ path(v)
89
+ rescue Errno::ENOENT => e
90
+ e.message.gsub(/.*assertion failed: /, '').gsub(/\): .*/, ')')
91
+ rescue => e
92
+ e.message
93
+ end]
94
+ end
96
95
  end
97
96
 
98
97
  # TODO: if using another product than SDK, should use files from there
@@ -9,7 +9,15 @@ module Aspera
9
9
  class MissingArgument < Error; end
10
10
  class NoSuchElement < Error; end
11
11
 
12
+ # Raised when a lookup for a specific entity fails to return exactly one result.
13
+ #
14
+ # Provides a formatted message indicating whether the entity was missing
15
+ # or if multiple matches were found (ambiguity).
12
16
  class BadIdentifier < Error
17
+ # @param res_type [String] The type of entity being looked up (e.g., 'user').
18
+ # @param res_id [String] The value of the identifier that failed.
19
+ # @param field [String] The name of the field used for lookup (defaults to 'identifier').
20
+ # @param count [Integer] The number of matches found (0 for not found, >1 for ambiguous).
13
21
  def initialize(res_type, res_id, field: 'identifier', count: 0)
14
22
  msg = count.eql?(0) ? 'not found' : "found #{count}"
15
23
  super("#{res_type} with #{field}=#{res_id}: #{msg}")
@@ -7,7 +7,8 @@ module Aspera
7
7
  CMD_NAME = 'ascli'
8
8
  # Name of the containing gem, same as in <gem name>.gemspec
9
9
  GEM_NAME = 'aspera-cli'
10
- DOC_URL = "https://www.rubydoc.info/gems/#{GEM_NAME}"
10
+ DOC_URL = 'https://ibm.biz/ascli-doc'
11
+ RUBYDOC_URL = "https://www.rubydoc.info/gems/#{GEM_NAME}"
11
12
  GEM_URL = "https://rubygems.org/gems/#{GEM_NAME}"
12
13
  SRC_URL = 'https://github.com/IBM/aspera-cli'
13
14
  CONTAINER = 'docker.io/martinlaurent/ascli'