From ae4a22b88a0909462b4a44cf6dc984a1eb27b337 Mon Sep 17 00:00:00 2001 From: Ramesh Sencha Date: Wed, 29 Nov 2023 11:00:07 +0530 Subject: [PATCH] (CAT-1608) - PDK update --- .rubocop.yml | 6 +++--- .rubocop_todo.yml | 2 +- .sync.yml | 10 +++++----- Gemfile | 6 ++++-- Rakefile | 3 ++- metadata.json | 2 +- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 33d66a7ca1..7a66e08331 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,12 +1,11 @@ --- -inherit_from: .rubocop_todo.yml - require: - rubocop-performance - rubocop-rspec AllCops: + NewCops: enable DisplayCopNames: true - TargetRubyVersion: '2.6' + TargetRubyVersion: '2.7' Include: - "**/*.rb" Exclude: @@ -20,6 +19,7 @@ AllCops: - "**/Puppetfile" - "**/Vagrantfile" - "**/Guardfile" +inherit_from: ".rubocop_todo.yml" Layout/LineLength: Description: People have wide screens, use them. Max: 200 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 40bf4779ee..732977e113 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2023-09-06 12:10:39 UTC using RuboCop version 1.48.1. +# on 2023-11-29 05:29:46 UTC using RuboCop version 1.48.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 diff --git a/.sync.yml b/.sync.yml index 467ee6175a..2721daf03f 100644 --- a/.sync.yml +++ b/.sync.yml @@ -6,7 +6,8 @@ - 140chars-check appveyor.yml: delete: true - +.rubocop.yml: + include_todos: true Gemfile: optional: ":development": @@ -15,6 +16,9 @@ Gemfile: Rakefile: changelog_user: puppetlabs changelog_max_issues: 500 + extra_disabled_lint_checks: + - anchor_resource + - params_empty_string_assignment spec/spec_helper.rb: mock_with: ":rspec" coverage_report: true @@ -45,7 +49,3 @@ spec/spec_helper.rb: unmanaged: false .travis.yml: delete: true -Rakefile: - extra_disabled_lint_checks: - - anchor_resource - - params_empty_string_assignment diff --git a/Gemfile b/Gemfile index 5ffa566b9f..86e337adbc 100644 --- a/Gemfile +++ b/Gemfile @@ -23,7 +23,6 @@ group :development do gem "voxpupuli-puppet-lint-plugins", '~> 5.0', require: false gem "facterdb", '~> 1.18', require: false gem "metadata-json-lint", '~> 3.0', require: false - gem "puppetlabs_spec_helper", '~> 6.0', require: false gem "rspec-puppet-facts", '~> 2.0', require: false gem "codecov", '~> 0.2', require: false gem "dependency_checker", '~> 1.0.0', require: false @@ -34,7 +33,6 @@ group :development do gem "rubocop", '= 1.48.1', require: false gem "rubocop-performance", '= 1.16.0', require: false gem "rubocop-rspec", '= 2.19.0', require: false - gem "puppet-strings", '~> 4.0', require: false gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw] gem "github_changelog_generator", '= 1.15.2', require: false end @@ -42,6 +40,10 @@ group :system_tests do gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw] gem "serverspec", '~> 2.41', require: false end +group :release_prep do + gem "puppet-strings", '~> 4.0', require: false + gem "puppetlabs_spec_helper", '~> 7.0', require: false +end puppet_version = ENV['PUPPET_GEM_VERSION'] facter_version = ENV['FACTER_GEM_VERSION'] diff --git a/Rakefile b/Rakefile index c87729c986..a40e488df7 100644 --- a/Rakefile +++ b/Rakefile @@ -9,7 +9,7 @@ require 'puppet-strings/tasks' if Gem.loaded_specs.key? 'puppet-strings' def changelog_user return unless Rake.application.top_level_tasks.include? "changelog" - returnVal = nil || JSON.load(File.read('metadata.json'))['author'] + returnVal = "puppetlabs" || JSON.load(File.read('metadata.json'))['author'] raise "unable to find the changelog_user in .sync.yml, or the author in metadata.json" if returnVal.nil? puts "GitHubChangelogGenerator user:#{returnVal}" returnVal @@ -50,6 +50,7 @@ if Gem.loaded_specs.key? 'github_changelog_generator' raise "Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'" if Rake.application.top_level_tasks.include? "changelog" and ENV['CHANGELOG_GITHUB_TOKEN'].nil? config.user = "#{changelog_user}" config.project = "#{changelog_project}" + config.max_issues = 500 config.future_release = "#{changelog_future_release}" config.exclude_labels = ['maintenance'] config.header = "# Change log\n\nAll notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org)." diff --git a/metadata.json b/metadata.json index 11c710b417..8f8e381b9d 100644 --- a/metadata.json +++ b/metadata.json @@ -96,5 +96,5 @@ ], "pdk-version": "3.0.0", "template-url": "https://github.com/puppetlabs/pdk-templates#main", - "template-ref": "heads/main-0-g017b84e" + "template-ref": "heads/main-0-g01c6a19" }