motoko 1.1.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +9 -0
- data/.github/workflows/ci.yaml +32 -19
- data/CHANGELOG.md +23 -3
- data/Gemfile +1 -0
- data/README.md +3 -3
- data/Rakefile +2 -2
- data/exe/inventory +1 -1
- data/exe/pdb-inventory +1 -1
- data/lib/motoko/config.rb +11 -2
- data/lib/motoko/formatters/base_formatter.rb +3 -1
- data/lib/motoko/option_parser.rb +4 -4
- data/lib/motoko/version.rb +1 -1
- data/motoko.gemspec +4 -2
- metadata +6 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6be65ad423aac0052f8160fbb19d6d9b5ee9aa3a37ef278e3bd44fa1492a7c9
|
4
|
+
data.tar.gz: 0b0616ec9d299f282030e41b0889896be9434f9b3880356fd2302bd937551e65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f693d4a925a24a0bab02b8b8ea87e43d11b716d0e36c108f1bd03854fec02a8db4bc2ae264fb97f2dded66083da7bd3779f68d4bed242538d13b53e158ee2eab
|
7
|
+
data.tar.gz: 393ab67b914a86df259971e1193040d95fa94723a304a8f6402635bdd6cf99b73bdf4d047eedabd8071df4a62af9640e6c4c185633d92e13a6ceffc979cdfd6e
|
data/.github/workflows/ci.yaml
CHANGED
@@ -1,41 +1,54 @@
|
|
1
1
|
---
|
2
|
-
name:
|
2
|
+
name: CI
|
3
3
|
|
4
4
|
on:
|
5
5
|
push:
|
6
6
|
branches:
|
7
|
-
-
|
7
|
+
- main
|
8
8
|
pull_request:
|
9
9
|
branches:
|
10
|
-
-
|
10
|
+
- main
|
11
11
|
|
12
12
|
jobs:
|
13
13
|
rubocop:
|
14
|
-
runs-on:
|
14
|
+
runs-on: ubuntu-latest
|
15
15
|
steps:
|
16
|
-
- uses:
|
17
|
-
- name:
|
18
|
-
uses:
|
16
|
+
- uses: actions/checkout@v4
|
17
|
+
- name: Setup ruby
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
19
|
with:
|
20
|
-
ruby-version:
|
20
|
+
ruby-version: 3.0
|
21
21
|
bundler-cache: true
|
22
|
-
- name:
|
23
|
-
run:
|
24
|
-
|
25
|
-
runs-on:
|
22
|
+
- name: Run static code analysis
|
23
|
+
run: bundle exec rubocop
|
24
|
+
unit:
|
25
|
+
runs-on: ubuntu-latest
|
26
|
+
needs: rubocop
|
26
27
|
strategy:
|
27
28
|
matrix:
|
28
|
-
ruby
|
29
|
+
ruby:
|
29
30
|
- "2.5"
|
30
31
|
- "2.6"
|
31
32
|
- "2.7"
|
32
33
|
- "3.0"
|
34
|
+
- "3.1"
|
35
|
+
- "3.2"
|
36
|
+
- "3.3"
|
37
|
+
name: Ruby ${{ matrix.ruby }}
|
33
38
|
steps:
|
34
|
-
- uses:
|
35
|
-
- name:
|
36
|
-
uses:
|
39
|
+
- uses: actions/checkout@v4
|
40
|
+
- name: Setup ruby
|
41
|
+
uses: ruby/setup-ruby@v1
|
37
42
|
with:
|
38
|
-
ruby-version: ${{ matrix.ruby
|
43
|
+
ruby-version: ${{ matrix.ruby }}
|
39
44
|
bundler-cache: true
|
40
|
-
- name:
|
41
|
-
|
45
|
+
- name: Run tests without uploading code coverage
|
46
|
+
if: ${{ matrix.ruby != '3.0' }}
|
47
|
+
run: bundle exec rake
|
48
|
+
- name: Run tests and upload coverage to Code Climate
|
49
|
+
if: ${{ matrix.ruby == '3.0' }}
|
50
|
+
uses: paambaati/codeclimate-action@v9.0.0
|
51
|
+
env:
|
52
|
+
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_TOKEN }}
|
53
|
+
with:
|
54
|
+
coverageCommand: bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -5,13 +5,33 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
-
## [1.1
|
8
|
+
## [1.2.1](https://github.com/opus-codium/motoko/tree/1.2.1) (2024-09-19)
|
9
9
|
|
10
|
-
[Full Changelog](https://github.com/
|
10
|
+
[Full Changelog](https://github.com/opus-codium/motoko/compare/v1.2.0...1.2.1)
|
11
|
+
|
12
|
+
**Fixed bugs:**
|
13
|
+
|
14
|
+
- Various bug fixes [\#8](https://github.com/opus-codium/motoko/pull/8) ([smortex](https://github.com/smortex))
|
15
|
+
|
16
|
+
## [v1.2.0](https://github.com/opus-codium/motoko/tree/v1.2.0) (2021-12-07)
|
17
|
+
|
18
|
+
[Full Changelog](https://github.com/opus-codium/motoko/compare/v1.1.0...v1.2.0)
|
19
|
+
|
20
|
+
**Implemented enhancements:**
|
21
|
+
|
22
|
+
- Add support for project configuration files [\#3](https://github.com/opus-codium/motoko/pull/3) ([smortex](https://github.com/smortex))
|
23
|
+
|
24
|
+
**Merged pull requests:**
|
25
|
+
|
26
|
+
- Relocate the project [\#4](https://github.com/opus-codium/motoko/pull/4) ([smortex](https://github.com/smortex))
|
27
|
+
|
28
|
+
## [v1.1.0](https://github.com/opus-codium/motoko/tree/v1.1.0) (2021-07-26)
|
29
|
+
|
30
|
+
[Full Changelog](https://github.com/opus-codium/motoko/compare/v1.0.0...v1.1.0)
|
11
31
|
|
12
32
|
**Implemented enhancements:**
|
13
33
|
|
14
|
-
- Allow shortcuts to replace the list of columns [\#2](https://github.com/
|
34
|
+
- Allow shortcuts to replace the list of columns [\#2](https://github.com/opus-codium/motoko/pull/2) ([smortex](https://github.com/smortex))
|
15
35
|
|
16
36
|
|
17
37
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -95,7 +95,7 @@ romain@zappy ~ % pdb-inventory -F datacenter=/sbg/
|
|
95
95
|
```
|
96
96
|
## Configuration
|
97
97
|
|
98
|
-
At startup, Motoko will load system-wide configuration from `/etc/motoko/config.yaml`,
|
98
|
+
At startup, Motoko will try to load a system-wide configuration from `/etc/motoko/config.yaml`, a user configuration from `~/.config/motoko/config.yaml` and a project configuration from `.motoko.yaml` in the current working directory.
|
99
99
|
|
100
100
|
### Columns
|
101
101
|
|
@@ -211,7 +211,7 @@ sudo /opt/puppetlabs/puppet/bin/gem install --bindir /opt/puppetlabs/bin motoko-
|
|
211
211
|
|
212
212
|
## Contributing
|
213
213
|
|
214
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
214
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/opus-codium/motoko. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/opus-codium/motoko/blob/master/CODE_OF_CONDUCT.md).
|
215
215
|
|
216
216
|
|
217
217
|
## License
|
@@ -220,4 +220,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
220
220
|
|
221
221
|
## Code of Conduct
|
222
222
|
|
223
|
-
Everyone interacting in the Motoko project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
223
|
+
Everyone interacting in the Motoko project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/opus-codium/motoko/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
CHANGED
@@ -13,8 +13,8 @@ GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
|
13
13
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
14
14
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
15
15
|
HEADER
|
16
|
-
config.exclude_labels = %w[duplicate
|
17
|
-
config.user = '
|
16
|
+
config.exclude_labels = %w[dependencies duplicate ignore invalid question skip-changelog wont-fix wontfix]
|
17
|
+
config.user = 'opus-codium'
|
18
18
|
config.project = 'motoko'
|
19
19
|
config.since_tag = 'v1.0.0'
|
20
20
|
end
|
data/exe/inventory
CHANGED
data/exe/pdb-inventory
CHANGED
data/lib/motoko/config.rb
CHANGED
@@ -14,6 +14,7 @@ module Motoko
|
|
14
14
|
|
15
15
|
load_system_config
|
16
16
|
load_user_config
|
17
|
+
load_project_config
|
17
18
|
end
|
18
19
|
|
19
20
|
def load_system_config
|
@@ -33,11 +34,16 @@ module Motoko
|
|
33
34
|
load_config(d) if File.directory?(d)
|
34
35
|
end
|
35
36
|
|
37
|
+
def load_project_config
|
38
|
+
load_only_config('.motoko.yaml')
|
39
|
+
end
|
40
|
+
|
36
41
|
def load_config(directory)
|
37
42
|
load_classes(directory)
|
43
|
+
load_only_config(File.join(directory, 'config.yaml'))
|
44
|
+
end
|
38
45
|
|
39
|
-
|
40
|
-
|
46
|
+
def load_only_config(filename)
|
41
47
|
return unless File.readable?(filename)
|
42
48
|
|
43
49
|
config = YAML.safe_load(File.read(filename))
|
@@ -65,6 +71,9 @@ module Motoko
|
|
65
71
|
max_length: 20
|
66
72
|
cpu:
|
67
73
|
resolver: cpu
|
74
|
+
memory:
|
75
|
+
fact: memory.system.total
|
76
|
+
align: right
|
68
77
|
os:
|
69
78
|
resolver: os
|
70
79
|
human_name: Operating System
|
data/lib/motoko/option_parser.rb
CHANGED
@@ -33,15 +33,15 @@ module Motoko
|
|
33
33
|
end
|
34
34
|
|
35
35
|
parser.on('--hw', 'Display hardware information') do
|
36
|
-
formatter.columns += %
|
36
|
+
formatter.columns += %w[is_virtual cpu memory]
|
37
37
|
end
|
38
38
|
|
39
39
|
parser.on('--puppet', 'Display Puppet information') do
|
40
|
-
formatter.columns += %
|
40
|
+
formatter.columns += %w[aio_agent_version puppetversion]
|
41
41
|
end
|
42
42
|
|
43
43
|
parser.on('--sw', 'Display sodtware information') do
|
44
|
-
formatter.columns += %
|
44
|
+
formatter.columns += %w[os kernel]
|
45
45
|
end
|
46
46
|
|
47
47
|
parser.on('--mono', 'Do not display a colored output') do
|
@@ -56,7 +56,7 @@ module Motoko
|
|
56
56
|
formatter.count = count
|
57
57
|
end
|
58
58
|
|
59
|
-
parser.on('--sort-by=COLUMNS', 'Sort lines by
|
59
|
+
parser.on('--sort-by=COLUMNS', 'Sort lines by COLUMNS', Array) do |columns|
|
60
60
|
formatter.sort_by = columns
|
61
61
|
end
|
62
62
|
end
|
data/lib/motoko/version.rb
CHANGED
data/motoko.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.email = ['romain@blogreen.org']
|
10
10
|
|
11
11
|
spec.summary = 'Inventory tools for Puppet / Choria infrastructures'
|
12
|
-
spec.homepage = 'https://github.com/
|
12
|
+
spec.homepage = 'https://github.com/opus-codium/motoko'
|
13
13
|
spec.license = 'MIT'
|
14
14
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
|
15
15
|
|
@@ -32,5 +32,7 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_dependency 'skittlize', '~> 1.2'
|
33
33
|
spec.add_dependency 'terminal-table'
|
34
34
|
|
35
|
-
spec.
|
35
|
+
spec.metadata = {
|
36
|
+
'rubygems_mfa_required' => 'true',
|
37
|
+
}
|
36
38
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motoko
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Romain Tartière
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: choria-mcorpc-support
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: github_changelog_generator
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
55
|
description:
|
70
56
|
email:
|
71
57
|
- romain@blogreen.org
|
@@ -75,6 +61,7 @@ executables:
|
|
75
61
|
extensions: []
|
76
62
|
extra_rdoc_files: []
|
77
63
|
files:
|
64
|
+
- ".github/dependabot.yml"
|
78
65
|
- ".github/workflows/ci.yaml"
|
79
66
|
- ".gitignore"
|
80
67
|
- ".rspec"
|
@@ -114,14 +101,11 @@ files:
|
|
114
101
|
- lib/motoko/utils/time_ago.rb
|
115
102
|
- lib/motoko/version.rb
|
116
103
|
- motoko.gemspec
|
117
|
-
homepage: https://github.com/
|
104
|
+
homepage: https://github.com/opus-codium/motoko
|
118
105
|
licenses:
|
119
106
|
- MIT
|
120
107
|
metadata:
|
121
|
-
|
122
|
-
homepage_uri: https://github.com/smortex/motoko
|
123
|
-
source_code_uri: https://github.com/smortex/motoko
|
124
|
-
changelog_uri: https://github.com/smortex/motoko
|
108
|
+
rubygems_mfa_required: 'true'
|
125
109
|
post_install_message:
|
126
110
|
rdoc_options: []
|
127
111
|
require_paths:
|
@@ -137,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
121
|
- !ruby/object:Gem::Version
|
138
122
|
version: '0'
|
139
123
|
requirements: []
|
140
|
-
rubygems_version: 3.
|
124
|
+
rubygems_version: 3.3.15
|
141
125
|
signing_key:
|
142
126
|
specification_version: 4
|
143
127
|
summary: Inventory tools for Puppet / Choria infrastructures
|