From 069d1e89eaea76a002f2b3dc388ee63c3bde93c2 Mon Sep 17 00:00:00 2001 From: Gavin Didrichsen <gavin.didrichsen@gmail.com> Date: Thu, 27 Mar 2025 08:29:46 +0000 Subject: [PATCH] Only pin to the puppetcore versions. Since the puppet_version and facter_version are not always going to be version contrains (they can also be a git URL), then I'm removing this flexible check and pinning only to the latest puppetcore gems. If flexible puppet and facter gemsources are need via https or git, then remove the PUPPET_FORGE_TOKEN and use PUPPET_GEM_VERSION and/or FACTER_GEM_VERSION instead. Signed-off-by: Gavin Didrichsen <gavin.didrichsen@gmail.com> --- moduleroot/Gemfile.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moduleroot/Gemfile.erb b/moduleroot/Gemfile.erb index bf4100d..0937390 100644 --- a/moduleroot/Gemfile.erb +++ b/moduleroot/Gemfile.erb @@ -112,8 +112,8 @@ hiera_version = ENV.fetch('HIERA_GEM_VERSION', nil) # If PUPPET_FORGE_TOKEN is set then use authenticated source for both puppet and facter, since facter is a transitive dependency of puppet # Otherwise, do as before and use location_for to fetch gems from the default source if !ENV['PUPPET_FORGE_TOKEN'].to_s.empty? - gems['puppet'] = [puppet_version || '~> 8.11', { require: false, source: 'https://rubygems-puppetcore.puppet.com' }] - gems['facter'] = [facter_version || '~> 4.11', { require: false, source: 'https://rubygems-puppetcore.puppet.com' }] + gems['puppet'] = ['~> 8.11', { require: false, source: 'https://rubygems-puppetcore.puppet.com' }] + gems['facter'] = ['~> 4.11', { require: false, source: 'https://rubygems-puppetcore.puppet.com' }] else gems['puppet'] = location_for(puppet_version) gems['facter'] = location_for(facter_version) if facter_version -- GitLab