diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2cdfc30f..a5738adb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,4 @@ jobs: Acceptance: needs: Spec uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" - with: - flags: "--nightly" secrets: "inherit" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index f1807fe9..1b06c471 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -13,7 +13,4 @@ jobs: Acceptance: needs: Spec uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" - with: - flags: "--nightly" secrets: "inherit" - diff --git a/.rubocop.yml b/.rubocop.yml index 4899d2ea..805d9950 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,10 +1,7 @@ --- -plugins: +require: - rubocop-performance - rubocop-rspec -- rubocop-rspec_rails -- rubocop-factory_bot -- rubocop-capybara AllCops: NewCops: enable DisplayCopNames: true @@ -120,16 +117,6 @@ Bundler/GemFilename: Enabled: false Bundler/InsecureProtocolSource: Enabled: false -Capybara/CurrentPathExpectation: - Enabled: false -Capybara/VisibilityMatcher: - Enabled: false -FactoryBot/AttributeDefinedStatically: - Enabled: false -FactoryBot/CreateList: - Enabled: false -FactoryBot/FactoryClassName: - Enabled: false Gemspec/DuplicatedAssignment: Enabled: false Gemspec/OrderedDependencies: @@ -312,8 +299,6 @@ RSpec/ContextWording: Enabled: false RSpec/DescribeClass: Enabled: false -RSpec/Dialect: - Enabled: false RSpec/EmptyHook: Enabled: false RSpec/EmptyLineAfterExample: @@ -494,22 +479,6 @@ Style/TrailingMethodEndStatement: Enabled: false Style/UnpackFirst: Enabled: false -Capybara/MatchStyle: - Enabled: false -Capybara/NegationMatcher: - Enabled: false -Capybara/SpecificActions: - Enabled: false -Capybara/SpecificFinders: - Enabled: false -Capybara/SpecificMatcher: - Enabled: false -FactoryBot/ConsistentParenthesesStyle: - Enabled: false -FactoryBot/FactoryNameStyle: - Enabled: false -FactoryBot/SyntaxMethods: - Enabled: false Gemspec/DeprecatedAttributeAssignment: Enabled: false Gemspec/DevelopmentDependencies: @@ -626,16 +595,6 @@ RSpec/SubjectDeclaration: Enabled: false RSpec/VerifiedDoubleReference: Enabled: false -RSpecRails/AvoidSetupHook: - Enabled: false -RSpecRails/HaveHttpStatus: - Enabled: false -RSpecRails/InferredSpecType: - Enabled: false -RSpecRails/MinitestAssertions: - Enabled: false -RSpecRails/TravelAround: - Enabled: false Security/CompoundHash: Enabled: false Security/IoMethods: diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 8526c9fa..81334073 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2025-10-16 14:43:56 UTC using RuboCop version 1.73.2. +# on 2025-11-24 20:22:19 UTC using RuboCop version 1.81.7. # 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 @@ -23,6 +23,17 @@ Lint/UselessConstantScoping: Exclude: - 'spec/legacy_taskscheduler.rb' +# Offense count: 4 +# Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates. +# AllowedMethods: call +# WaywardPredicates: nonzero? +Naming/PredicateMethod: + Exclude: + - 'lib/puppet/provider/scheduled_task/taskscheduler_api2.rb' + - 'lib/puppet/provider/scheduled_task/win32_taskscheduler.rb' + - 'lib/puppet_x/puppet_labs/scheduled_task/task.rb' + - 'spec/legacy_taskscheduler.rb' + # Offense count: 10 # This cop supports unsafe autocorrection (--autocorrect-all). Style/BitwisePredicate: @@ -33,8 +44,10 @@ Style/BitwisePredicate: # Offense count: 2 # This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: EnforcedStyle. +# Configuration parameters: EnforcedStyle, EnforcedStyleForClasses, EnforcedStyleForModules. # SupportedStyles: nested, compact +# SupportedStylesForClasses: ~, nested, compact +# SupportedStylesForModules: ~, nested, compact Style/ClassAndModuleChildren: Exclude: - 'lib/puppet_x/puppet_labs/scheduled_task/task.rb' diff --git a/Gemfile b/Gemfile index 441fe814..fa2bde6d 100644 --- a/Gemfile +++ b/Gemfile @@ -52,12 +52,9 @@ group :development do gem "pry", '~> 0.10', require: false gem "simplecov-console", '~> 0.9', require: false gem "puppet-debugger", '~> 1.6', require: false - gem "rubocop", '~> 1.73.0', require: false - gem "rubocop-performance", '~> 1.24.0', require: false - gem "rubocop-rspec", '~> 3.5.0', require: false - gem "rubocop-rspec_rails", '~> 2.31.0', require: false - gem "rubocop-factory_bot", '~> 2.27.0', require: false - gem "rubocop-capybara", '~> 2.22.0', require: false + gem "rubocop", '~> 1.72', require: false + gem "rubocop-performance", '= 1.16.0', require: false + gem "rubocop-rspec", '= 3.0', require: false gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw] gem "bigdecimal", '< 3.2.2', require: false, platforms: [:mswin, :mingw, :x64_mingw] end @@ -74,12 +71,10 @@ group :system_tests do end gems = {} -bolt_version = ENV.fetch('BOLT_GEM_VERSION', nil) puppet_version = ENV.fetch('PUPPET_GEM_VERSION', nil) facter_version = ENV.fetch('FACTER_GEM_VERSION', nil) hiera_version = ENV.fetch('HIERA_GEM_VERSION', nil) -gems['bolt'] = location_for(bolt_version, nil, { source: gemsource_puppetcore }) gems['puppet'] = location_for(puppet_version, nil, { source: gemsource_puppetcore }) gems['facter'] = location_for(facter_version, nil, { source: gemsource_puppetcore }) gems['hiera'] = location_for(hiera_version, nil, {}) if hiera_version diff --git a/metadata.json b/metadata.json index 713e49bc..b364a70c 100644 --- a/metadata.json +++ b/metadata.json @@ -29,7 +29,7 @@ "version_requirement": ">= 8.0.0 < 9.0.0" } ], - "pdk-version": "3.5.0", - "template-url": "https://github.com/puppetlabs/pdk-templates.git#main", - "template-ref": "heads/main-0-gfa96b82" + "pdk-version": "3.5.1", + "template-url": "https://github.com/puppetlabs/pdk-templates.git#3.5.1", + "template-ref": "tags/3.5.1-0-g9d5b193" } diff --git a/spec/integration/puppet_x/puppet_labs/scheduled_task/task_spec.rb b/spec/integration/puppet_x/puppet_labs/scheduled_task/task_spec.rb index bf218fbf..5f84be1b 100644 --- a/spec/integration/puppet_x/puppet_labs/scheduled_task/task_spec.rb +++ b/spec/integration/puppet_x/puppet_labs/scheduled_task/task_spec.rb @@ -74,7 +74,7 @@ def create_task(task_name = nil, task_compatiblity = nil, triggers = []) subject = ST::Task after :each do - if Puppet.features.microsoft_windows? && (defined?(task_name) && subject.exists?(task_name)) + if Puppet.features.microsoft_windows? && defined?(task_name) && subject.exists?(task_name) subject.delete(task_name) end end diff --git a/spec/legacy_taskscheduler.rb b/spec/legacy_taskscheduler.rb index bd507f6d..aa91be47 100644 --- a/spec/legacy_taskscheduler.rb +++ b/spec/legacy_taskscheduler.rb @@ -1051,7 +1051,7 @@ module COM # LPCWSTR, IScheduledWorkItem * AddWorkItem: [[:lpcwstr, :pointer], :hresult], # LPCWSTR, REFIID - IsOfType: [[:lpcwstr, :pointer], :hresult] + IsOfType: [[:lpcwstr, :pointer], :hresult], ] TaskScheduler = com::Factory[ITaskScheduler, @@ -1065,7 +1065,7 @@ module COM Skip: [[:win32_ulong], :hresult], Reset: [[], :hresult], # IEnumWorkItems ** ppEnumWorkItems - Clone: [[:pointer], :hresult] + Clone: [[:pointer], :hresult], ] EnumWorkItems = com::Instance[IEnumWorkItems] @@ -1118,7 +1118,7 @@ module COM GetFlags: [[:pointer], :hresult], SetAccountInformation: [[:lpcwstr, :lpcwstr], :hresult], # LPWSTR * - GetAccountInformation: [[:pointer], :hresult] + GetAccountInformation: [[:pointer], :hresult], ] # https://msdn.microsoft.com/en-us/library/windows/desktop/aa381311(v=vs.85).aspx @@ -1141,7 +1141,7 @@ module COM GetTaskFlags: [[:pointer], :hresult], SetMaxRunTime: [[:dword], :hresult], # DWORD * - GetMaxRunTime: [[:pointer], :hresult] + GetMaxRunTime: [[:pointer], :hresult], ] Task = com::Instance[ITask] @@ -1150,7 +1150,7 @@ module COM IPersist = com::Interface[com::IUnknown, FFI::WIN32::GUID['0000010c-0000-0000-c000-000000000046'], # CLSID * - GetClassID: [[:pointer], :hresult] + GetClassID: [[:pointer], :hresult], ] # https://msdn.microsoft.com/en-us/library/windows/desktop/ms687223(v=vs.85).aspx @@ -1161,7 +1161,7 @@ module COM Save: [[:lpcolestr, :win32_bool], :hresult], SaveCompleted: [[:lpcolestr], :hresult], # LPOLESTR * - GetCurFile: [[:pointer], :hresult] + GetCurFile: [[:pointer], :hresult], ] PersistFile = com::Instance[IPersistFile] @@ -1171,7 +1171,7 @@ module COM FFI::WIN32::GUID['148BD52B-A2AB-11CE-B11F-00AA00530503'], SetTrigger: [[:pointer], :hresult], GetTrigger: [[:pointer], :hresult], - GetTriggerString: [[:pointer], :hresult] + GetTriggerString: [[:pointer], :hresult], ] TaskTrigger = com::Instance[ITaskTrigger]