From 0317f2da178837a1200667b4c210f320dddf7a46 Mon Sep 17 00:00:00 2001 From: Michael Hashizume Date: Mon, 26 Feb 2024 14:05:31 -0800 Subject: [PATCH 1/3] Add beaker-puppet constraint to sync.yml In a878ab1, we limited beaker-puppet to Ruby <= 3.1. This commit adds that restriction to .sync.yml so that change will persist across PDK updates, and adds a comment with the rationale behind this restriction. --- .sync.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.sync.yml b/.sync.yml index 1357ca4..8f03111 100644 --- a/.sync.yml +++ b/.sync.yml @@ -33,9 +33,11 @@ Gemfile: from_env: BEAKER_HOSTGENERATOR_VERSION - gem: beaker-rspec from_env: BEAKER_RSPEC_VERSION + # Prevent beaker-puppet from being installed on Ruby > 3.1 until beaker-puppet supports newer Rubies - gem: beaker-puppet from_env: BEAKER_PUPPET_VERSION version: '~> 3.0' + condition: Gem::Requirement.create('< 3.1.0').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) - gem: async version: '~> 1' - gem: beaker-module_install_helper From a44a363d52f59ddd05b6bbb6ce235375021ac6f6 Mon Sep 17 00:00:00 2001 From: Michael Hashizume Date: Mon, 26 Feb 2024 14:08:43 -0800 Subject: [PATCH 2/3] Make Vox Rake tasks conditional This commit updates the Rakefile to only attempt to use Vox Rake tasks if the voxpupuli-acceptance gem is installed. --- .sync.yml | 3 ++- Rakefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.sync.yml b/.sync.yml index 8f03111..b3a4f62 100644 --- a/.sync.yml +++ b/.sync.yml @@ -59,4 +59,5 @@ appveyor.yml: # We still use the Vox acceptance Rake task instead of Litmus Rakefile: requires: - - voxpupuli/acceptance/rake + - require: voxpupuli/acceptance/rake + conditional: Gem.loaded_specs.key? 'voxpupuli-acceptance' \ No newline at end of file diff --git a/Rakefile b/Rakefile index a4d5cc0..a0e7eb6 100644 --- a/Rakefile +++ b/Rakefile @@ -6,7 +6,7 @@ require 'puppetlabs_spec_helper/rake_tasks' require 'puppet-syntax/tasks/puppet-syntax' require 'github_changelog_generator/task' if Gem.loaded_specs.key? 'github_changelog_generator' require 'puppet-strings/tasks' if Gem.loaded_specs.key? 'puppet-strings' -require 'voxpupuli/acceptance/rake' +require 'voxpupuli/acceptance/rake' if Gem.loaded_specs.key? 'voxpupuli-acceptance' def changelog_user return unless Rake.application.top_level_tasks.include? "changelog" From ba7dfc85502baac01f5e854754d6780bca4d80ea Mon Sep 17 00:00:00 2001 From: Michael Hashizume Date: Mon, 26 Feb 2024 14:38:51 -0800 Subject: [PATCH 3/3] Documentation housekeeping This commit comprises minor documentation updates as flagged by Puppet Strings. This includes: - Moving the Japanese README to the root of the project (YARD does not know how to parse a readmes directory). - Update class documentation to include the name of the parameter. - Add a minimal description to the Augeas provider. --- readmes/README_ja_JP.md => README_ja_JP.md | 0 lib/puppet/provider/augeas/augeas.rb | 2 ++ lib/puppet_x/augeas/util/parser.rb | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) rename readmes/README_ja_JP.md => README_ja_JP.md (100%) diff --git a/readmes/README_ja_JP.md b/README_ja_JP.md similarity index 100% rename from readmes/README_ja_JP.md rename to README_ja_JP.md diff --git a/lib/puppet/provider/augeas/augeas.rb b/lib/puppet/provider/augeas/augeas.rb index 8a306db..56daf92 100644 --- a/lib/puppet/provider/augeas/augeas.rb +++ b/lib/puppet/provider/augeas/augeas.rb @@ -21,6 +21,8 @@ require_relative '../../../puppet_x/augeas/util/parser' Puppet::Type.type(:augeas).provide(:augeas) do + desc 'The Augeas provider' + include Puppet::Util include Puppet::Util::Diff include Puppet::Util::Package diff --git a/lib/puppet_x/augeas/util/parser.rb b/lib/puppet_x/augeas/util/parser.rb index 271e11c..e20070c 100644 --- a/lib/puppet_x/augeas/util/parser.rb +++ b/lib/puppet_x/augeas/util/parser.rb @@ -30,7 +30,7 @@ module PuppetX::Augeas::Util::Parser # support the full quite of escape sequences that Ruby allows in # double-quoted strings. # - # @param [String] The string to be parsed. + # @param string [String] The string to be parsed. # @return [Array] The parsed array elements, including handling any # escape sequences. def parse_to_array(string)