mtncloud-cli 1.0.0 → 1.0.2

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: 639203a2d4abce5fa9f74f710a71dd159f38c775dcd009549aba64fe5de773c9
4
- data.tar.gz: d598611f41e31e3546003dd12db8e84be2c4cc5e1a440bb8fb51b78d5f21dc23
3
+ metadata.gz: b3a5dc76695dc9b45484493d57dc18f76a6421b860734528495d877ac6d19d4a
4
+ data.tar.gz: e8c2396dc112b8cd25ba5887caf3bbc259a9ab77b04f3f828d546918dbaf111c
5
5
  SHA512:
6
- metadata.gz: e2b6e6aea6578305035081434b24ce671a43df0ccd0760bf2813a7dbea54c932382d37f002f1ad32ede689bd9f34c956f04d6126b9cb78625b48cfca468a2971
7
- data.tar.gz: 0aec3580475e9814d229695f76d89f3f254a7111831367b4f26fb049c695b441e708049a951da5d2938e193359ba30912c9cf9c208e5cd84a6e09fe3a280f9f0
6
+ metadata.gz: 322918f434dfde44a63ce4e5dbfc430cb0d8a1a78fe41ecaafc67c2c44269012f39f43edbcec799b26e9b5b1236b545eeb5a70602236ce3e0bd61ffe0e723f9e
7
+ data.tar.gz: bf2e4aaa891fa291376f7c0bd03106ab12fa5ec90b6bf773b9a8a957043a5de02b6f29716b5b008e6c5a8363f65d2a0d8f62499dbac976b5e0ad5c9b21a84983
data/.dockerignore CHANGED
@@ -1,20 +1,20 @@
1
- # Keep local and generated files out of the Docker build context.
2
- # Do NOT add .git here: the gem build uses `git ls-files` to list its files.
3
- # Only exclude files that are not tracked by git, or the gem build will fail.
4
-
5
- # test credentials for the live appliance tests
6
- test_config.yaml
7
-
8
- # built gems and bundler state
9
- *.gem
10
- pkg
11
- .bundle
12
- Gemfile.lock
13
-
14
- # temporary and editor files
15
- tmp
16
- coverage
17
- *.log
18
- .idea
19
- .vscode
20
- .DS_Store
1
+ # Keep local and generated files out of the Docker build context.
2
+ # Do NOT add .git here: the gem build uses `git ls-files` to list its files.
3
+ # Only exclude files that are not tracked by git, or the gem build will fail.
4
+
5
+ # test credentials for the live appliance tests
6
+ test_config.yaml
7
+
8
+ # built gems and bundler state
9
+ *.gem
10
+ pkg
11
+ .bundle
12
+ Gemfile.lock
13
+
14
+ # temporary and editor files
15
+ tmp
16
+ coverage
17
+ *.log
18
+ .idea
19
+ .vscode
20
+ .DS_Store
@@ -1,14 +1,14 @@
1
- ## What this changes
2
-
3
- <!-- What does this pull request change, and why? -->
4
-
5
- ## How it was tested
6
-
7
- <!-- For example: bundle exec rake test:offline, or commands you ran against an appliance -->
8
-
9
- ## Checklist
10
-
11
- - [ ] `bundle exec rake test:offline` passes
12
- - [ ] Tests added or updated for the changed behaviour
13
- - [ ] README updated if installation, configuration or usage changed
14
- - [ ] Customer-facing text says MTN Cloud, not Morpheus
1
+ ## What this changes
2
+
3
+ <!-- What does this pull request change, and why? -->
4
+
5
+ ## How it was tested
6
+
7
+ <!-- For example: bundle exec rake test:offline, or commands you ran against an appliance -->
8
+
9
+ ## Checklist
10
+
11
+ - [ ] `bundle exec rake test:offline` passes
12
+ - [ ] Tests added or updated for the changed behaviour
13
+ - [ ] README updated if installation, configuration or usage changed
14
+ - [ ] Customer-facing text says MTN Cloud, not Morpheus
@@ -1,56 +1,56 @@
1
- # Runs on every pull request and every push to main.
2
- # main is protected: a pull request can only be merged when every job here passes.
3
- name: CI
4
-
5
- on:
6
- pull_request:
7
- push:
8
- branches: [main]
9
-
10
- permissions:
11
- contents: read
12
-
13
- jobs:
14
- test:
15
- name: Offline tests (Ruby ${{ matrix.ruby }})
16
- runs-on: ubuntu-latest
17
- strategy:
18
- fail-fast: false
19
- matrix:
20
- ruby: ["3.3", "3.4", "4.0"]
21
- steps:
22
- - uses: actions/checkout@v5
23
-
24
- - uses: ruby/setup-ruby@v1
25
- with:
26
- ruby-version: ${{ matrix.ruby }}
27
- bundler-cache: true
28
-
29
- - name: Run offline tests
30
- run: bundle exec rake test:offline
31
-
32
- build:
33
- name: Build gem
34
- runs-on: ubuntu-latest
35
- steps:
36
- - uses: actions/checkout@v5
37
-
38
- - uses: ruby/setup-ruby@v1
39
- with:
40
- ruby-version: "3.3"
41
-
42
- - name: Build the gem
43
- run: gem build mtncloud-cli.gemspec
44
-
45
- # One check for branch protection to require, so the protection rule does not
46
- # need to change when the Ruby versions above change.
47
- ci-passed:
48
- name: CI passed
49
- if: always()
50
- needs: [test, build]
51
- runs-on: ubuntu-latest
52
- steps:
53
- - name: Fail unless every job passed
54
- run: |
55
- echo "test: ${{ needs.test.result }}, build: ${{ needs.build.result }}"
56
- [ "${{ needs.test.result }}" = "success" ] && [ "${{ needs.build.result }}" = "success" ]
1
+ # Runs on every pull request and every push to main.
2
+ # main is protected: a pull request can only be merged when every job here passes.
3
+ name: CI
4
+
5
+ on:
6
+ pull_request:
7
+ push:
8
+ branches: [main]
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ test:
15
+ name: Offline tests (Ruby ${{ matrix.ruby }})
16
+ runs-on: ubuntu-latest
17
+ strategy:
18
+ fail-fast: false
19
+ matrix:
20
+ ruby: ["3.3", "3.4", "4.0"]
21
+ steps:
22
+ - uses: actions/checkout@v5
23
+
24
+ - uses: ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: ${{ matrix.ruby }}
27
+ bundler-cache: true
28
+
29
+ - name: Run offline tests
30
+ run: bundle exec rake test:offline
31
+
32
+ build:
33
+ name: Build gem
34
+ runs-on: ubuntu-latest
35
+ steps:
36
+ - uses: actions/checkout@v5
37
+
38
+ - uses: ruby/setup-ruby@v1
39
+ with:
40
+ ruby-version: "3.3"
41
+
42
+ - name: Build the gem
43
+ run: gem build mtncloud-cli.gemspec
44
+
45
+ # One check for branch protection to require, so the protection rule does not
46
+ # need to change when the Ruby versions above change.
47
+ ci-passed:
48
+ name: CI passed
49
+ if: always()
50
+ needs: [test, build]
51
+ runs-on: ubuntu-latest
52
+ steps:
53
+ - name: Fail unless every job passed
54
+ run: |
55
+ echo "test: ${{ needs.test.result }}, build: ${{ needs.build.result }}"
56
+ [ "${{ needs.test.result }}" = "success" ] && [ "${{ needs.build.result }}" = "success" ]
data/.gitignore CHANGED
@@ -1,25 +1,25 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
18
- *.bundle
19
- *.so
20
- *.o
21
- *.a
22
- mkmf.log
23
- .DS_Store
24
- .idea
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
23
+ .DS_Store
24
+ .idea
25
25
  test_config.yaml
data/CLAUDE.md CHANGED
@@ -1,24 +1,24 @@
1
- # MTN Cloud CLI
2
-
3
- Ruby gem `mtncloud-cli`. It installs the `mtncloud` command and its alias `mcs`. Code is under `lib/mtncloud/` in the `MtnCloud::` namespace. See CONTRIBUTING.md and the README.
4
-
5
- ## Git workflow (required)
6
-
7
- - Never commit or push to `main`. It is protected, and direct pushes are rejected.
8
- - For every code or docs change: create a branch from an up-to-date `main` (`feature/`, `fix/`, `docs/` or `chore/` prefix), commit there, push the branch, and open a pull request against `main` with `gh pr create --base main`.
9
- - Merge only after the **CI passed** check succeeds (`gh pr checks <number> --watch`). Never bypass a failing or pending check.
10
- - Never force-push to `main` and never delete it.
11
-
12
- ## Testing
13
-
14
- - Run `bundle exec rake test:offline` before opening a pull request. CI runs the same task on Ruby 3.3, 3.4 and 4.0.
15
- - Tests that `require 'mtncloud_test'` need a live appliance and are not run by CI.
16
-
17
- ## Naming
18
-
19
- - Customer-facing text says MTN Cloud, and commands are shown as `mtncloud`.
20
- - Keep values the appliance or its API defines unchanged, even though they contain "Morpheus": the `X-Morpheus-Lease` and `X-Morpheus-Token` headers, `MORPHEUS_LEASE_TOKEN`, the `morpheus.yml` fallback, job type codes such as `morpheus.task`, the `morpheus` blueprint and backup provider codes, and Morpheus Hub. `test/branding_test.rb` lists the approved ones.
21
-
22
- ## Releases
23
-
24
- Pushing a `v<version>` tag runs `.github/workflows/release.yml`, which publishes to RubyGems. The tag must match `VERSION` in `lib/mtncloud/cli/version.rb`. Push a release tag only when the user asks for one.
1
+ # MTN Cloud CLI
2
+
3
+ Ruby gem `mtncloud-cli`. It installs the `mtncloud` command and its alias `mcs`. Code is under `lib/mtncloud/` in the `MtnCloud::` namespace. See CONTRIBUTING.md and the README.
4
+
5
+ ## Git workflow (required)
6
+
7
+ - Never commit or push to `main`. It is protected, and direct pushes are rejected.
8
+ - For every code or docs change: create a branch from an up-to-date `main` (`feature/`, `fix/`, `docs/` or `chore/` prefix), commit there, push the branch, and open a pull request against `main` with `gh pr create --base main`.
9
+ - Merge only after the **CI passed** check succeeds (`gh pr checks <number> --watch`). Never bypass a failing or pending check.
10
+ - Never force-push to `main` and never delete it.
11
+
12
+ ## Testing
13
+
14
+ - Run `bundle exec rake test:offline` before opening a pull request. CI runs the same task on Ruby 3.3, 3.4 and 4.0.
15
+ - Tests that `require 'mtncloud_test'` need a live appliance and are not run by CI.
16
+
17
+ ## Naming
18
+
19
+ - Customer-facing text says MTN Cloud, and commands are shown as `mtncloud`.
20
+ - Keep values the appliance or its API defines unchanged, even though they contain "Morpheus": the `X-Morpheus-Lease` and `X-Morpheus-Token` headers, `MORPHEUS_LEASE_TOKEN`, the `morpheus.yml` fallback, job type codes such as `morpheus.task`, the `morpheus` blueprint and backup provider codes, and Morpheus Hub. `test/branding_test.rb` lists the approved ones.
21
+
22
+ ## Releases
23
+
24
+ Pushing a `v<version>` tag runs `.github/workflows/release.yml`, which publishes to RubyGems. The tag must match `VERSION` in `lib/mtncloud/cli/version.rb`. Push a release tag only when the user asks for one.
data/CONTRIBUTING.md CHANGED
@@ -1,91 +1,91 @@
1
- # Contributing to the MTN Cloud CLI
2
-
3
- Thank you for helping improve the MTN Cloud CLI. This guide explains how changes get into the project.
4
-
5
- ## How changes reach main
6
-
7
- `main` is protected. Nobody pushes to it directly, including maintainers. Every change goes through a pull request:
8
-
9
- 1. Update your local `main`:
10
-
11
- ```shell
12
- git checkout main
13
- git pull
14
- ```
15
-
16
- 2. Create a branch for your change:
17
-
18
- ```shell
19
- git checkout -b fix/clusters-get-help
20
- ```
21
-
22
- Name the branch after the change, with a prefix: `feature/`, `fix/`, `docs/` or `chore/`.
23
-
24
- 3. Make your change, run the offline tests (see [Testing](#testing)), and commit.
25
- 4. Push the branch and open a pull request against `main`:
26
-
27
- ```shell
28
- git push -u origin fix/clusters-get-help
29
- gh pr create --base main
30
- ```
31
-
32
- 5. Wait for the **CI passed** check. It runs the offline tests on Ruby 3.3, 3.4 and 4.0 and builds the gem.
33
- 6. When CI passes, merge the pull request. A pull request cannot be merged while CI is failing or still running.
34
-
35
- If CI fails, push more commits to the same branch. CI runs again on every push.
36
-
37
- ## Setting up
38
-
39
- Requirements:
40
-
41
- - Ruby 3.3 or newer
42
- - Bundler 2
43
- - Git
44
-
45
- ```shell
46
- git clone https://github.com/Jose-henry/mtncloud-cli
47
- cd mtncloud-cli
48
- bundle install
49
- ```
50
-
51
- Run the CLI from your working copy:
52
-
53
- ```shell
54
- bundle exec ruby bin/mtncloud --help
55
- ```
56
-
57
- See [Development](README.md#development) in the README for the code layout.
58
-
59
- ## Testing
60
-
61
- Run the offline tests before you open a pull request. They don't need an MTN Cloud appliance, and they are the same tests CI runs:
62
-
63
- ```shell
64
- bundle exec rake test:offline
65
- ```
66
-
67
- Add or update tests for the behaviour you change. A test that doesn't need an appliance must not `require 'mtncloud_test'`, so that `test:offline` and CI run it.
68
-
69
- `test/branding_test.rb` fails if any command's help mentions Morpheus, except for values that belong to the appliance, such as the `X-Morpheus-Lease` header. Keep it passing.
70
-
71
- The tests that need a live appliance are described in [Testing](README.md#testing) in the README. Run them when you change how the CLI talks to the API.
72
-
73
- ## Writing changes
74
-
75
- - Keep each pull request to one change. Separate refactoring from behaviour changes.
76
- - Follow the style of the code around your change.
77
- - Customer-facing text says **MTN Cloud**, and commands are shown as `mtncloud`. Values that the appliance or its API defines keep their names, for example `X-Morpheus-Lease` and `MORPHEUS_LEASE_TOKEN`.
78
- - Update the README when you change how the CLI is installed, configured or used.
79
-
80
- ## Commit messages
81
-
82
- - Write a short summary line in the imperative mood, for example "Fix clusters get usage on Ruby 3.4".
83
- - If the reason for the change isn't obvious, explain it in the body.
84
-
85
- ## Releases
86
-
87
- Maintainers publish releases. See [Releasing](README.md#releasing) in the README. The version bump goes through a pull request like any other change, and the version tag is pushed after that pull request is merged.
88
-
89
- ## License
90
-
91
- By contributing, you agree that your contributions are licensed under the project's [MIT license](LICENSE.txt).
1
+ # Contributing to the MTN Cloud CLI
2
+
3
+ Thank you for helping improve the MTN Cloud CLI. This guide explains how changes get into the project.
4
+
5
+ ## How changes reach main
6
+
7
+ `main` is protected. Nobody pushes to it directly, including maintainers. Every change goes through a pull request:
8
+
9
+ 1. Update your local `main`:
10
+
11
+ ```shell
12
+ git checkout main
13
+ git pull
14
+ ```
15
+
16
+ 2. Create a branch for your change:
17
+
18
+ ```shell
19
+ git checkout -b fix/clusters-get-help
20
+ ```
21
+
22
+ Name the branch after the change, with a prefix: `feature/`, `fix/`, `docs/` or `chore/`.
23
+
24
+ 3. Make your change, run the offline tests (see [Testing](#testing)), and commit.
25
+ 4. Push the branch and open a pull request against `main`:
26
+
27
+ ```shell
28
+ git push -u origin fix/clusters-get-help
29
+ gh pr create --base main
30
+ ```
31
+
32
+ 5. Wait for the **CI passed** check. It runs the offline tests on Ruby 3.3, 3.4 and 4.0 and builds the gem.
33
+ 6. When CI passes, merge the pull request. A pull request cannot be merged while CI is failing or still running.
34
+
35
+ If CI fails, push more commits to the same branch. CI runs again on every push.
36
+
37
+ ## Setting up
38
+
39
+ Requirements:
40
+
41
+ - Ruby 3.3 or newer
42
+ - Bundler 2
43
+ - Git
44
+
45
+ ```shell
46
+ git clone https://github.com/Jose-henry/mtncloud-cli
47
+ cd mtncloud-cli
48
+ bundle install
49
+ ```
50
+
51
+ Run the CLI from your working copy:
52
+
53
+ ```shell
54
+ bundle exec ruby bin/mtncloud --help
55
+ ```
56
+
57
+ See [Development](README.md#development) in the README for the code layout.
58
+
59
+ ## Testing
60
+
61
+ Run the offline tests before you open a pull request. They don't need an MTN Cloud appliance, and they are the same tests CI runs:
62
+
63
+ ```shell
64
+ bundle exec rake test:offline
65
+ ```
66
+
67
+ Add or update tests for the behaviour you change. A test that doesn't need an appliance must not `require 'mtncloud_test'`, so that `test:offline` and CI run it.
68
+
69
+ `test/branding_test.rb` fails if any command's help mentions Morpheus, except for values that belong to the appliance, such as the `X-Morpheus-Lease` header. Keep it passing.
70
+
71
+ The tests that need a live appliance are described in [Testing](README.md#testing) in the README. Run them when you change how the CLI talks to the API.
72
+
73
+ ## Writing changes
74
+
75
+ - Keep each pull request to one change. Separate refactoring from behaviour changes.
76
+ - Follow the style of the code around your change.
77
+ - Customer-facing text says **MTN Cloud**, and commands are shown as `mtncloud`. Values that the appliance or its API defines keep their names, for example `X-Morpheus-Lease` and `MORPHEUS_LEASE_TOKEN`.
78
+ - Update the README when you change how the CLI is installed, configured or used.
79
+
80
+ ## Commit messages
81
+
82
+ - Write a short summary line in the imperative mood, for example "Fix clusters get usage on Ruby 3.4".
83
+ - If the reason for the change isn't obvious, explain it in the body.
84
+
85
+ ## Releases
86
+
87
+ Maintainers publish releases. See [Releasing](README.md#releasing) in the README. The version bump goes through a pull request like any other change, and the version tag is pushed after that pull request is merged.
88
+
89
+ ## License
90
+
91
+ By contributing, you agree that your contributions are licensed under the project's [MIT license](LICENSE.txt).
data/Dockerfile CHANGED
@@ -1,19 +1,19 @@
1
- # Stage 1: build the mtncloud-cli gem from this repository.
2
- # The gemspec lists its files with `git ls-files`, so this stage needs the .git
3
- # directory in the build context. Only files tracked by git go into the gem.
4
- FROM ruby:3.3 AS build
5
- WORKDIR /src
6
- COPY . .
7
- RUN gem build mtncloud-cli.gemspec -o /mtncloud-cli.gem
8
-
9
- # Stage 2: install the gem into a clean image.
10
- # Only the built .gem is copied from stage 1, so nothing else from the build
11
- # context (local files such as test_config.yaml, or the .git directory)
12
- # ends up in the final image.
13
- FROM ruby:3.3
14
- COPY --from=build /mtncloud-cli.gem /tmp/mtncloud-cli.gem
15
- RUN gem install /tmp/mtncloud-cli.gem --no-document \
16
- && rm /tmp/mtncloud-cli.gem
17
-
18
- WORKDIR /root
19
- ENTRYPOINT ["mtncloud"]
1
+ # Stage 1: build the mtncloud-cli gem from this repository.
2
+ # The gemspec lists its files with `git ls-files`, so this stage needs the .git
3
+ # directory in the build context. Only files tracked by git go into the gem.
4
+ FROM ruby:3.3 AS build
5
+ WORKDIR /src
6
+ COPY . .
7
+ RUN gem build mtncloud-cli.gemspec -o /mtncloud-cli.gem
8
+
9
+ # Stage 2: install the gem into a clean image.
10
+ # Only the built .gem is copied from stage 1, so nothing else from the build
11
+ # context (local files such as test_config.yaml, or the .git directory)
12
+ # ends up in the final image.
13
+ FROM ruby:3.3
14
+ COPY --from=build /mtncloud-cli.gem /tmp/mtncloud-cli.gem
15
+ RUN gem install /tmp/mtncloud-cli.gem --no-document \
16
+ && rm /tmp/mtncloud-cli.gem
17
+
18
+ WORKDIR /root
19
+ ENTRYPOINT ["mtncloud"]
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in mtncloud-cli.gemspec
4
- gemspec
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in mtncloud-cli.gemspec
4
+ gemspec