From ac0e72b1f20b433928cbc4addee461340bcf0bd0 Mon Sep 17 00:00:00 2001 From: pccibot <12855858+pccibot@users.noreply.github.com> Date: Fri, 6 Mar 2026 09:57:45 +0000 Subject: [PATCH 1/3] modulesync 10.6.0 --- .devcontainer/devcontainer.json | 1 - .msync.yml | 2 +- Gemfile | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 168a5cb4..08c6abf9 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,4 +1,3 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the { "name": "VoxBox", "image": "ghcr.io/voxpupuli/voxbox:latest" diff --git a/.msync.yml b/.msync.yml index 179bafc0..7d6d4ee4 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '10.5.0' +modulesync_config_version: '10.6.0' diff --git a/Gemfile b/Gemfile index 5f69bec8..e0c85815 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org' group :test do - gem 'voxpupuli-test', '~> 13.0', :require => false + gem 'voxpupuli-test', '~> 14.0', :require => false gem 'puppet_metadata', '~> 6.0', :require => false end @@ -18,7 +18,7 @@ group :system_tests do end group :release do - gem 'voxpupuli-release', '~> 5.0', :require => false + gem 'voxpupuli-release', '~> 5.3', :require => false end gem 'rake', :require => false From 4682910696f96fe4fd10ad3032aed5ce3a3b966f Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 6 Mar 2026 13:08:19 +0100 Subject: [PATCH 2/3] rubocop: autocorrect --- .rubocop.yml | 2 ++ .rubocop_todo.yml | 13 +++++++ spec/classes/python_spec.rb | 46 ++++++++++++------------- spec/defines/pip_spec.rb | 8 ++--- spec/defines/pyvenv_spec.rb | 8 ++--- spec/defines/requirements_spec.rb | 4 +-- spec/unit/facter/pip_version_spec.rb | 2 -- spec/unit/facter/python_release_spec.rb | 2 -- spec/unit/facter/python_version_spec.rb | 2 -- 9 files changed, 48 insertions(+), 39 deletions(-) create mode 100644 .rubocop_todo.yml diff --git a/.rubocop.yml b/.rubocop.yml index 53ac1898..ea22bff8 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,4 +1,6 @@ --- +inherit_from: .rubocop_todo.yml + # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 00000000..f8daacee --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,13 @@ +# This configuration was generated by +# `rubocop --auto-gen-config --no-auto-gen-timestamp` +# using RuboCop version 1.85.1. +# The point is for the user to remove these configuration records +# one by one as the offenses are removed from the code base. +# Note that changes in the inspected code, or installation of new +# versions of RuboCop, may require this file to be generated again. + +# Offense count: 3 +RSpec/LeakyLocalVariable: + Exclude: + - 'spec/acceptance/class_spec.rb' + - 'spec/acceptance/facts_test_spec.rb' diff --git a/spec/classes/python_spec.rb b/spec/classes/python_spec.rb index 74852970..f1c2d9a1 100644 --- a/spec/classes/python_spec.rb +++ b/spec/classes/python_spec.rb @@ -36,7 +36,7 @@ manage_python_package: false, manage_dev_package: false, manage_pip_package: false, - manage_venv_package: false + manage_venv_package: false, } end @@ -53,7 +53,7 @@ manage_pip_package: true, manage_venv_package: true, pip: 'present', - venv: 'present' + venv: 'present', } end @@ -112,12 +112,12 @@ { python_pyvenvs: { '/opt/env1' => { - version: '3.8' + version: '3.8', }, '/opt/env2' => { - version: '3.8' - } - } + version: '3.8', + }, + }, } end @@ -139,13 +139,13 @@ python_pyvenvs: { '/opt/env1' => { version: '3.8', - pip_version: 'latest' + pip_version: 'latest', }, '/opt/env2' => { version: '3.8', - pip_version: '<= 20.3.4' - } - } + pip_version: '<= 20.3.4', + }, + }, } end @@ -155,8 +155,8 @@ it { is_expected.to contain_python__pyvenv('/opt/env2').with_ensure('present') } it { - expect(subject).to contain_exec('python_virtualenv_/opt/env1'). - with( + expect(subject).to contain_exec('python_virtualenv_/opt/env1') + .with( command: 'python3.8 -m venv --clear /opt/env1 && /opt/env1/bin/pip install --upgrade pip && /opt/env1/bin/pip install --upgrade setuptools', user: 'root', creates: '/opt/env1/bin/activate', @@ -164,19 +164,19 @@ '/bin', '/usr/bin', '/usr/sbin', - '/usr/local/bin' + '/usr/local/bin', ], cwd: '/tmp', environment: [], timeout: 600, - unless: %r{^grep '\^\[\\t \]\*VIRTUAL_ENV=\[\\\\'\\"\]\*/opt/env1\[\\"\\\\'\]\[\\t \]\*\$' /opt/env1/bin/activate$} - ). - that_requires('File[/opt/env1]') + unless: %r{^grep '\^\[\\t \]\*VIRTUAL_ENV=\[\\\\'\\"\]\*/opt/env1\[\\"\\\\'\]\[\\t \]\*\$' /opt/env1/bin/activate$}, + ) + .that_requires('File[/opt/env1]') } it { - expect(subject).to contain_exec('python_virtualenv_/opt/env2'). - with( + expect(subject).to contain_exec('python_virtualenv_/opt/env2') + .with( command: 'python3.8 -m venv --clear /opt/env2 && /opt/env2/bin/pip install --upgrade \'pip <= 20.3.4\' && /opt/env2/bin/pip install --upgrade setuptools', user: 'root', creates: '/opt/env2/bin/activate', @@ -184,14 +184,14 @@ '/bin', '/usr/bin', '/usr/sbin', - '/usr/local/bin' + '/usr/local/bin', ], cwd: '/tmp', environment: [], timeout: 600, - unless: %r{^grep '\^\[\\t \]\*VIRTUAL_ENV=\[\\\\'\\"\]\*/opt/env2\[\\"\\\\'\]\[\\t \]\*\$' /opt/env2/bin/activate$} - ). - that_requires('File[/opt/env2]') + unless: %r{^grep '\^\[\\t \]\*VIRTUAL_ENV=\[\\\\'\\"\]\*/opt/env2\[\\"\\\\'\]\[\\t \]\*\$' /opt/env2/bin/activate$}, + ) + .that_requires('File[/opt/env2]') } it { is_expected.to contain_file('/opt/env1') } @@ -384,7 +384,7 @@ it { expect(subject).to contain_package('pip').with( - 'provider' => 'pip' + 'provider' => 'pip', ) } end diff --git a/spec/defines/pip_spec.rb b/spec/defines/pip_spec.rb index abe5cda0..a00a7792 100644 --- a/spec/defines/pip_spec.rb +++ b/spec/defines/pip_spec.rb @@ -21,7 +21,7 @@ operatingsystemrelease: '6', path: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', concat_basedir: '/dne', - pip_version: '18.1' + pip_version: '18.1', } end @@ -195,7 +195,7 @@ operatingsystemrelease: '10.12', path: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', concat_basedir: '/dne', - pip_version: '20.3.4' + pip_version: '20.3.4', } end @@ -221,13 +221,13 @@ kernel: 'Linux', lsbdistcodename: 'squeeze', os: { - family: 'Debian' + family: 'Debian', }, osfamily: 'Debian', operatingsystem: 'Debian', operatingsystemrelease: '6', path: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - concat_basedir: '/dne' + concat_basedir: '/dne', } end diff --git a/spec/defines/pyvenv_spec.rb b/spec/defines/pyvenv_spec.rb index 57d87078..6ce6646b 100644 --- a/spec/defines/pyvenv_spec.rb +++ b/spec/defines/pyvenv_spec.rb @@ -23,7 +23,7 @@ let :facts do # python3 is required to use pyvenv facts.merge( - python3_version: '3.5.1' + python3_version: '3.5.1', ) end @@ -36,7 +36,7 @@ context 'is absent' do let :params do { - ensure: 'absent' + ensure: 'absent', } end @@ -51,7 +51,7 @@ let :facts do # python 3.6 is required for venv and prompt facts.merge( - python3_version: '3.6.1' + python3_version: '3.6.1', ) end let :title do @@ -75,7 +75,7 @@ context "prompt on #{os} with python 3.5" do let :facts do facts.merge( - python3_version: '3.5.1' + python3_version: '3.5.1', ) end let :title do diff --git a/spec/defines/requirements_spec.rb b/spec/defines/requirements_spec.rb index 1b9a75fb..82dc0b37 100644 --- a/spec/defines/requirements_spec.rb +++ b/spec/defines/requirements_spec.rb @@ -16,7 +16,7 @@ context 'with /requirements.txt' do let :params do { - requirements: '/requirements.txt' + requirements: '/requirements.txt', } end @@ -35,7 +35,7 @@ let :params do { owner: 'bob', - group: 'bob' + group: 'bob', } end diff --git a/spec/unit/facter/pip_version_spec.rb b/spec/unit/facter/pip_version_spec.rb index 06bcf3de..3e6cd29f 100644 --- a/spec/unit/facter/pip_version_spec.rb +++ b/spec/unit/facter/pip_version_spec.rb @@ -7,7 +7,6 @@ Facter.clear end - # rubocop:disable RSpec/IndexedLet let(:pip_version_output) do <<~EOS pip 6.0.6 from /opt/boxen/homebrew/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg (python 2.7) @@ -25,7 +24,6 @@ pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7) EOS end - # rubocop:enable RSpec/IndexedLet describe 'pip_version' do context 'returns pip version when pip present' do diff --git a/spec/unit/facter/python_release_spec.rb b/spec/unit/facter/python_release_spec.rb index d87b10b2..6026c1e3 100644 --- a/spec/unit/facter/python_release_spec.rb +++ b/spec/unit/facter/python_release_spec.rb @@ -7,7 +7,6 @@ Facter.clear end - # rubocop:disable RSpec/IndexedLet let(:python2_version_output) do <<~EOS Python 2.7.9 @@ -18,7 +17,6 @@ Python 3.3.0 EOS end - # rubocop:enable RSpec/IndexedLet describe 'python_release' do context 'returns Python release when `python` present' do diff --git a/spec/unit/facter/python_version_spec.rb b/spec/unit/facter/python_version_spec.rb index 386fcffb..d66d280b 100644 --- a/spec/unit/facter/python_version_spec.rb +++ b/spec/unit/facter/python_version_spec.rb @@ -7,7 +7,6 @@ Facter.clear end - # rubocop:disable RSpec/IndexedLet let(:python2_version_output) do <<~EOS Python 2.7.9 @@ -18,7 +17,6 @@ Python 3.3.0 EOS end - # rubocop:enable RSpec/IndexedLet describe 'python_version' do context 'returns Python version when `python` present' do From 4e23f0e62d828fe87de648bcf8b6e849591228df Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 6 Mar 2026 13:23:51 +0100 Subject: [PATCH 3/3] regenerate REFERENCE.md --- REFERENCE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/REFERENCE.md b/REFERENCE.md index def63d6a..e00c04c0 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -99,6 +99,8 @@ Data type: `Python::Version` The default version of Python provided by the operating system. Only used as a fallback if Python is not installed yet to determine how to handle some actions that vary depending on the Python version used. +Default value: `'3.11'` + ##### `ensure` Data type: `Python::Package::Ensure`