aspera-cli 4.10.0 → 4.12.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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/BUGS.md +19 -0
- data/CHANGELOG.md +528 -0
- data/CONTRIBUTING.md +143 -0
- data/README.md +977 -589
- data/bin/ascli +4 -4
- data/bin/asession +12 -12
- data/docs/test_env.conf +29 -19
- data/examples/aoc.rb +6 -6
- data/examples/dascli +18 -16
- data/examples/faspex4.rb +15 -15
- data/examples/node.rb +12 -12
- data/examples/proxy.pac +2 -2
- data/examples/server.rb +12 -12
- data/lib/aspera/aoc.rb +344 -272
- data/lib/aspera/ascmd.rb +56 -54
- data/lib/aspera/ats_api.rb +4 -4
- data/lib/aspera/cli/basic_auth_plugin.rb +15 -12
- data/lib/aspera/cli/extended_value.rb +9 -9
- data/lib/aspera/cli/{formater.rb → formatter.rb} +69 -69
- data/lib/aspera/cli/listener/line_dump.rb +1 -1
- data/lib/aspera/cli/listener/logger.rb +1 -1
- data/lib/aspera/cli/listener/progress.rb +5 -6
- data/lib/aspera/cli/listener/progress_multi.rb +16 -21
- data/lib/aspera/cli/main.rb +72 -73
- data/lib/aspera/cli/manager.rb +112 -112
- data/lib/aspera/cli/plugin.rb +68 -48
- data/lib/aspera/cli/plugins/alee.rb +4 -4
- data/lib/aspera/cli/plugins/aoc.rb +322 -720
- data/lib/aspera/cli/plugins/ats.rb +50 -52
- data/lib/aspera/cli/plugins/bss.rb +10 -10
- data/lib/aspera/cli/plugins/config.rb +514 -410
- data/lib/aspera/cli/plugins/console.rb +12 -12
- data/lib/aspera/cli/plugins/cos.rb +18 -20
- data/lib/aspera/cli/plugins/faspex.rb +134 -136
- data/lib/aspera/cli/plugins/faspex5.rb +235 -70
- data/lib/aspera/cli/plugins/node.rb +378 -309
- data/lib/aspera/cli/plugins/orchestrator.rb +52 -49
- data/lib/aspera/cli/plugins/preview.rb +129 -120
- data/lib/aspera/cli/plugins/server.rb +137 -83
- data/lib/aspera/cli/plugins/shares.rb +77 -52
- data/lib/aspera/cli/plugins/sync.rb +13 -33
- data/lib/aspera/cli/transfer_agent.rb +61 -61
- data/lib/aspera/cli/version.rb +2 -1
- data/lib/aspera/colors.rb +3 -3
- data/lib/aspera/command_line_builder.rb +78 -74
- data/lib/aspera/cos_node.rb +31 -29
- data/lib/aspera/data_repository.rb +1 -1
- data/lib/aspera/environment.rb +30 -28
- data/lib/aspera/fasp/agent_base.rb +17 -15
- data/lib/aspera/fasp/agent_connect.rb +34 -32
- data/lib/aspera/fasp/agent_direct.rb +70 -73
- data/lib/aspera/fasp/agent_httpgw.rb +79 -74
- data/lib/aspera/fasp/agent_node.rb +26 -26
- data/lib/aspera/fasp/agent_trsdk.rb +20 -20
- data/lib/aspera/fasp/error.rb +3 -2
- data/lib/aspera/fasp/error_info.rb +11 -8
- data/lib/aspera/fasp/installation.rb +80 -80
- data/lib/aspera/fasp/listener.rb +2 -2
- data/lib/aspera/fasp/parameters.rb +103 -92
- data/lib/aspera/fasp/parameters.yaml +313 -214
- data/lib/aspera/fasp/resume_policy.rb +10 -10
- data/lib/aspera/fasp/transfer_spec.rb +22 -2
- data/lib/aspera/fasp/uri.rb +7 -7
- data/lib/aspera/faspex_gw.rb +80 -159
- data/lib/aspera/faspex_postproc.rb +77 -0
- data/lib/aspera/hash_ext.rb +3 -3
- data/lib/aspera/id_generator.rb +5 -5
- data/lib/aspera/keychain/encrypted_hash.rb +23 -28
- data/lib/aspera/keychain/macos_security.rb +21 -20
- data/lib/aspera/log.rb +13 -13
- data/lib/aspera/nagios.rb +24 -23
- data/lib/aspera/node.rb +217 -38
- data/lib/aspera/oauth.rb +78 -74
- data/lib/aspera/open_application.rb +19 -11
- data/lib/aspera/persistency_action_once.rb +4 -4
- data/lib/aspera/persistency_folder.rb +13 -13
- data/lib/aspera/preview/file_types.rb +8 -8
- data/lib/aspera/preview/generator.rb +67 -67
- data/lib/aspera/preview/utils.rb +27 -27
- data/lib/aspera/proxy_auto_config.js +63 -63
- data/lib/aspera/proxy_auto_config.rb +19 -19
- data/lib/aspera/rest.rb +65 -67
- data/lib/aspera/rest_call_error.rb +2 -1
- data/lib/aspera/rest_error_analyzer.rb +22 -21
- data/lib/aspera/rest_errors_aspera.rb +16 -16
- data/lib/aspera/secret_hider.rb +17 -14
- data/lib/aspera/ssh.rb +15 -14
- data/lib/aspera/sync.rb +177 -62
- data/lib/aspera/temp_file_manager.rb +2 -2
- data/lib/aspera/uri_reader.rb +4 -4
- data/lib/aspera/web_auth.rb +13 -64
- data/lib/aspera/web_server_simple.rb +76 -0
- data.tar.gz.sig +0 -0
- metadata +11 -6
- metadata.gz.sig +0 -0
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,143 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
## Reporting Issues and Vulnerabilities
|
4
|
+
|
5
|
+
You can report issues at <https://github.com/IBM/aspera-cli/issues>
|
6
|
+
|
7
|
+
Before you go ahead please search existing issues for your problem.
|
8
|
+
|
9
|
+
To make sure that we can help you quickly please include and check the following information:
|
10
|
+
|
11
|
+
- Include the `ascli` version you are running in your report.
|
12
|
+
- If you are not running the latest version (please check), update.
|
13
|
+
- Include your `ruby -e "puts RUBY_DESCRIPTION"`.
|
14
|
+
|
15
|
+
Thanks!
|
16
|
+
|
17
|
+
## Making Contributions
|
18
|
+
|
19
|
+
To fetch & test the gem for development, do:
|
20
|
+
|
21
|
+
```bash
|
22
|
+
git clone https://github.com/IBM/aspera-cli.git
|
23
|
+
cd aspera-cli
|
24
|
+
bundle install
|
25
|
+
make test
|
26
|
+
```
|
27
|
+
|
28
|
+
If you want to contribute, please:
|
29
|
+
|
30
|
+
- Fork the project.
|
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` :)
|
34
|
+
- Send a pull request on GitHub.
|
35
|
+
- run Rubocop to comply for coding standards
|
36
|
+
|
37
|
+
## Running Tests
|
38
|
+
|
39
|
+
First, a testing environment must be created:
|
40
|
+
|
41
|
+
```bash
|
42
|
+
mkdir local
|
43
|
+
cp docs/test_env.conf local/.
|
44
|
+
```
|
45
|
+
|
46
|
+
Fill `local/test_env.conf` with system URLs and credentials for tests.
|
47
|
+
|
48
|
+
This project uses a Makefile for tests:
|
49
|
+
|
50
|
+
```bash
|
51
|
+
cd tests
|
52
|
+
make
|
53
|
+
```
|
54
|
+
|
55
|
+
When new commands are added to the CLI, new tests shall be added to the test suite.
|
56
|
+
|
57
|
+
## Coverage
|
58
|
+
|
59
|
+
A coverage report can be generated in folder `coverage` using gem `SimpleCov`.
|
60
|
+
Enable coverage monitoring using env var `ENABLE_COVERAGE`.
|
61
|
+
|
62
|
+
```bash
|
63
|
+
ENABLE_COVERAGE=1 make test
|
64
|
+
```
|
65
|
+
|
66
|
+
Once tests are completed, or during test, consult the page: [coverage/index.html](coverage/index.html)
|
67
|
+
|
68
|
+
## Build
|
69
|
+
|
70
|
+
By default the gem is built signed: `make`.
|
71
|
+
The appropriate signing key is required, and its path must be set to env var `SIGNING_KEY`.
|
72
|
+
It is also possible to build a non-signed version for development purpose: `make unsigned_gem`.
|
73
|
+
|
74
|
+
### Gem Signature
|
75
|
+
|
76
|
+
Refer to: <https://guides.rubygems.org/security/>
|
77
|
+
|
78
|
+
The gem is signed with the public certificate found in `certs` and a secret key (kept secret by maintainer).
|
79
|
+
|
80
|
+
To build the signed gem:
|
81
|
+
|
82
|
+
```bash
|
83
|
+
SIGNING_KEY=/path/to/signing_key.pem make
|
84
|
+
```
|
85
|
+
|
86
|
+
The user can activate gem signature verification on installation:
|
87
|
+
|
88
|
+
- Add the certificate to gem trusted certificates:
|
89
|
+
|
90
|
+
```bash
|
91
|
+
curl https://raw.githubusercontent.com/IBM/aspera-cli/main/certs/aspera-cli-public-cert.pem -so aspera-cli-certificate.pem
|
92
|
+
gem cert --add aspera-cli-certificate.pem
|
93
|
+
rm aspera-cli-certificate.pem
|
94
|
+
```
|
95
|
+
|
96
|
+
- Install the gem with `HighSecurity` or `MediumSecurity`: this will succeed only of the gem is trusted.
|
97
|
+
|
98
|
+
```bash
|
99
|
+
gem install -P HighSecurity aspera-cli
|
100
|
+
```
|
101
|
+
|
102
|
+
## Docker image build
|
103
|
+
|
104
|
+
The default docker image build installs the official gem version directly from <rubygems.org>.
|
105
|
+
|
106
|
+
By default it will build the image for the version in the current repository:
|
107
|
+
|
108
|
+
```bash
|
109
|
+
make docker
|
110
|
+
```
|
111
|
+
|
112
|
+
> **Note:** This target creates the `Dockerfile` from an `ERB` (embedded Ruby) template (Makefile target `dockerfile`).
|
113
|
+
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.
|
114
|
+
|
115
|
+
Then, to push to the image registry:
|
116
|
+
|
117
|
+
```bash
|
118
|
+
make dpush
|
119
|
+
```
|
120
|
+
|
121
|
+
It is possible to build a specific version by setting envvar `GEMVERS` and `make` with option `-e`:
|
122
|
+
|
123
|
+
```bash
|
124
|
+
GEMVERS=4.11.0 make -e docker
|
125
|
+
GEMVERS=4.11.0 make -e dpush
|
126
|
+
```
|
127
|
+
|
128
|
+
To build/push a beta/development container:
|
129
|
+
|
130
|
+
```bash
|
131
|
+
make dockerbeta
|
132
|
+
make dpushversion
|
133
|
+
```
|
134
|
+
|
135
|
+
The Dockerfile template allows customizing the optional copy of gem file , versus install from rubygems,org as well as customizing the retrieval of the SDK.
|
136
|
+
|
137
|
+
## Long Term Implementation and delivery improvements
|
138
|
+
|
139
|
+
- replace rest and oauth classes with ruby standard gems:
|
140
|
+
- <https://github.com/rest-client/rest-client>
|
141
|
+
- <https://github.com/oauth-xx/oauth2>
|
142
|
+
- use gem Thor <http://whatisthor.com/> (or other standard Ruby CLI manager)
|
143
|
+
- Package a single-file executable for various architectures with <https://github.com/pmq20/ruby-packer> (rubyc)
|