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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b655f710fff5c1442d40c441172a62aed7ab6431e094fa6b107e2808e4b19d81
4
- data.tar.gz: 3e3c338bf5e18961f12e88531d7b2a110fbd5a961ec205592c250e9f40a3abc1
3
+ metadata.gz: e6be65ad423aac0052f8160fbb19d6d9b5ee9aa3a37ef278e3bd44fa1492a7c9
4
+ data.tar.gz: 0b0616ec9d299f282030e41b0889896be9434f9b3880356fd2302bd937551e65
5
5
  SHA512:
6
- metadata.gz: aafac19ff2e1602fc0efc2ad2137065493d39d1320044afc84a349a9366c642dda8eedb0b93395cb6f016a81fab59fcf2e08f996c09845eace00d73c72727dce
7
- data.tar.gz: 108d41d8043d3cc3a92cf2f46b666f19a011e305075f6674c67613b45fde176f8bd07e065fa0caed8a640ceb281b3dd2f3fc3df2189d3071b7b35cfc70059405
6
+ metadata.gz: f693d4a925a24a0bab02b8b8ea87e43d11b716d0e36c108f1bd03854fec02a8db4bc2ae264fb97f2dded66083da7bd3779f68d4bed242538d13b53e158ee2eab
7
+ data.tar.gz: 393ab67b914a86df259971e1193040d95fa94723a304a8f6402635bdd6cf99b73bdf4d047eedabd8071df4a62af9640e6c4c185633d92e13a6ceffc979cdfd6e
@@ -0,0 +1,9 @@
1
+ version: 2
2
+ updates:
3
+ # Maintain dependencies for GitHub Actions
4
+ - package-ecosystem: github-actions
5
+ directory: "/"
6
+ schedule:
7
+ interval: daily
8
+ time: "13:00"
9
+ open-pull-requests-limit: 10
@@ -1,41 +1,54 @@
1
1
  ---
2
- name: "CI"
2
+ name: CI
3
3
 
4
4
  on:
5
5
  push:
6
6
  branches:
7
- - "main"
7
+ - main
8
8
  pull_request:
9
9
  branches:
10
- - "main"
10
+ - main
11
11
 
12
12
  jobs:
13
13
  rubocop:
14
- runs-on: "ubuntu-latest"
14
+ runs-on: ubuntu-latest
15
15
  steps:
16
- - uses: "actions/checkout@v2"
17
- - name: "Setup Ruby"
18
- uses: "ruby/setup-ruby@v1"
16
+ - uses: actions/checkout@v4
17
+ - name: Setup ruby
18
+ uses: ruby/setup-ruby@v1
19
19
  with:
20
- ruby-version: "3.0"
20
+ ruby-version: 3.0
21
21
  bundler-cache: true
22
- - name: "Run rubocop"
23
- run: "bundle exec rubocop"
24
- test:
25
- runs-on: "ubuntu-latest"
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-version:
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: "actions/checkout@v2"
35
- - name: "Setup Ruby"
36
- uses: "ruby/setup-ruby@v1"
39
+ - uses: actions/checkout@v4
40
+ - name: Setup ruby
41
+ uses: ruby/setup-ruby@v1
37
42
  with:
38
- ruby-version: ${{ matrix.ruby-version }}
43
+ ruby-version: ${{ matrix.ruby }}
39
44
  bundler-cache: true
40
- - name: "Run the test suite"
41
- run: "bundle exec rake"
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.0](https://github.com/smortex/motoko/tree/1.1.0) (2021-07-26)
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/smortex/motoko/compare/v1.0.0...1.1.0)
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/smortex/motoko/pull/2) ([smortex](https://github.com/smortex))
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
@@ -5,6 +5,7 @@ source 'https://rubygems.org'
5
5
  # Specify your gem's dependencies in inventory.gemspec
6
6
  gemspec
7
7
 
8
+ gem 'github_changelog_generator'
8
9
  gem 'rake', '~> 12.0'
9
10
  gem 'rspec', '~> 3.0'
10
11
  gem 'rubocop'
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`, and then user configuration from `~/.config/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/smortex/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/smortex/motoko/blob/master/CODE_OF_CONDUCT.md).
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/smortex/motoko/blob/master/CODE_OF_CONDUCT.md).
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 question invalid wontfix wont-fix skip-changelog ignore]
17
- config.user = 'smortex'
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
@@ -41,6 +41,6 @@ util.inventory do |_, resp|
41
41
  formatter.nodes << Motoko::Node::Choria.new(resp)
42
42
  end
43
43
 
44
- puts formatter.to_s
44
+ puts formatter
45
45
 
46
46
  printrpcstats if options[:stats]
data/exe/pdb-inventory CHANGED
@@ -55,4 +55,4 @@ nodes.each do |sender, facts|
55
55
  oparser.formatter.nodes << Motoko::Node.new(sender, facts)
56
56
  end
57
57
 
58
- puts oparser.formatter.to_s
58
+ puts oparser.formatter
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
- filename = File.join(directory, 'config.yaml')
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
@@ -3,7 +3,9 @@
3
3
  module Motoko
4
4
  module Formatters
5
5
  class BaseFormatter
6
- def initialize(options = {}) end
6
+ def initialize(options = {})
7
+ # noop
8
+ end
7
9
 
8
10
  def format(value)
9
11
  case value
@@ -33,15 +33,15 @@ module Motoko
33
33
  end
34
34
 
35
35
  parser.on('--hw', 'Display hardware information') do
36
- formatter.columns += %i[is_virtual cpu memory]
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 += %i[puppet]
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 += %i[os kernel]
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 COLUMS', Array) do |columns|
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Motoko
4
- VERSION = '1.1.0'
4
+ VERSION = '1.2.1'
5
5
  end
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/smortex/motoko'
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.add_development_dependency 'github_changelog_generator'
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.0
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: 2021-07-26 00:00:00.000000000 Z
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/smortex/motoko
104
+ homepage: https://github.com/opus-codium/motoko
118
105
  licenses:
119
106
  - MIT
120
107
  metadata:
121
- allowed_push_host: https://rubygems.org/
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.0.8
124
+ rubygems_version: 3.3.15
141
125
  signing_key:
142
126
  specification_version: 4
143
127
  summary: Inventory tools for Puppet / Choria infrastructures