Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/create_tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

name: Create Git tag

on:
workflow_dispatch:

permissions: {}

jobs:
create_tag:
uses: 'voxpupuli/gha-puppet/.github/workflows/create_tag.yml@v4'
with:
allowed_owner: 'voxpupuli'
git_name: 'pccibot'
git_email: '12855858+pccibot@users.noreply.github.com'
secrets:
# Configure secrets here:
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
ssh_private_key: ${{ secrets.PCCI_SSH_PRIVATE_KEY }}
5 changes: 4 additions & 1 deletion .github/workflows/prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ permissions:

jobs:
release_prep:
uses: 'voxpupuli/gha-puppet/.github/workflows/prepare_release.yml@v3'
uses: 'voxpupuli/gha-puppet/.github/workflows/prepare_release.yml@v4'
with:
version: ${{ github.event.inputs.version }}
allowed_owner: 'voxpupuli'
git_name: 'pccibot'
git_email: '12855858+pccibot@users.noreply.github.com'
secrets:
# Configure secrets here:
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
github_pat: '${{ secrets.PCCI_PAT_RELEASE_PREP }}'
ssh_private_key: '${{ secrets.PCCI_SSH_PRIVATE_KEY }}'
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@ name: Release
on:
push:
tags:
- '*'
# https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#onpushbranchestagsbranches-ignoretags-ignore
# https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#filter-pattern-cheat-sheet
- 'v[0-9]+.[0-9]+.[0-9]+'

permissions:
contents: write

jobs:
release:
name: Release
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v3
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v4
with:
allowed_owner: 'voxpupuli'
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.7.0'
7 changes: 6 additions & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config --no-auto-gen-timestamp`
# using RuboCop version 1.50.2.
# 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
Expand All @@ -18,6 +18,11 @@ Lint/MissingCopEnableDirective:
Exclude:
- 'lib/puppet/provider/windowsfeature/default.rb'

# Offense count: 1
RSpec/LeakyLocalVariable:
Exclude:
- 'spec/unit/puppet/provider/windowsfeature/default_spec.rb'

# Offense count: 19
# Configuration parameters: .
# SupportedStyles: have_received, receive
Expand Down
4 changes: 4 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
---
Gemfile:
optional:
':test':
- gem: 'rexml'
spec/spec_helper.rb:
spec_overrides: "require 'spec_helper_methods'"
.github/workflows/ci.yml:
Expand Down
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
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
gem 'rexml', :require => false
end

group :development do
Expand All @@ -18,7 +19,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
Expand Down
3 changes: 2 additions & 1 deletion lib/puppet/provider/windowsfeature/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require 'rexml/document'
include REXML

Puppet::Type.type(:windowsfeature).provide(:default) do
# We don't support 1.8.7 officially, but lets be nice and not cause errors
# rubocop:disable Style/HashSyntax
Expand Down Expand Up @@ -35,7 +36,7 @@ def self.instances
end
# put name and state into a hash
feature_hash = {
:ensure => state, :name => name
:ensure => state, :name => name,
}
# push hash to feature array
features.push(feature_hash)
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

c.before :suite do
path = File.expand_path("#{File.dirname(__FILE__)}/../").split('/')
name = path[path.length - 1].split('-')[1]
name = path[-1].split('-')[1]
# Install module and dependencies
puppet_module_install(source: proj_root, module_name: name)
end
Expand Down
12 changes: 6 additions & 6 deletions spec/unit/puppet/provider/windowsfeature/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
let :resource do
Puppet::Type.type(:windowsfeature).new(
title: 'feature-name',
provider: described_class.name
provider: described_class.name,
)
end

Expand Down Expand Up @@ -81,7 +81,7 @@
Puppet::Type.type(:windowsfeature).new(
title: 'feature-name',
installmanagementtools: true,
provider: described_class.name
provider: described_class.name,
)
end

Expand All @@ -102,7 +102,7 @@
Puppet::Type.type(:windowsfeature).new(
title: 'feature-name',
installsubfeatures: true,
provider: described_class.name
provider: described_class.name,
)
end

Expand All @@ -118,7 +118,7 @@
Puppet::Type.type(:windowsfeature).new(
title: 'feature-name',
source: 'C:\Windows\sxs',
provider: described_class.name
provider: described_class.name,
)
end

Expand All @@ -134,7 +134,7 @@
Puppet::Type.type(:windowsfeature).new(
title: 'feature-name',
restart: true,
provider: described_class.name
provider: described_class.name,
)
end

Expand Down Expand Up @@ -168,7 +168,7 @@
Puppet::Type.type(:windowsfeature).new(
title: 'feature-name',
restart: true,
provider: described_class.name
provider: described_class.name,
)
end

Expand Down
18 changes: 9 additions & 9 deletions spec/unit/puppet/type/windowsfeature/windowsfeature_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

let :resource do
Puppet::Type.type(:windowsfeature).new(
name: 'example_feature'
name: 'example_feature',
)
end

Expand Down Expand Up @@ -47,8 +47,8 @@
end

it 'rejects non-boolen' do
expect { described_class.new(name: 'feature-name', installmanagementtools: 'foo') }.
to raise_error(Puppet::ResourceError)
expect { described_class.new(name: 'feature-name', installmanagementtools: 'foo') }
.to raise_error(Puppet::ResourceError)
end
end

Expand All @@ -58,8 +58,8 @@
end

it 'rejects non-boolen' do
expect { described_class.new(name: 'feature-name', installsubfeatures: 'foo') }.
to raise_error(Puppet::ResourceError)
expect { described_class.new(name: 'feature-name', installsubfeatures: 'foo') }
.to raise_error(Puppet::ResourceError)
end
end

Expand All @@ -69,8 +69,8 @@
end

it 'rejects non-boolen' do
expect { described_class.new(name: 'feature-name', restart: 'foo') }.
to raise_error(Puppet::ResourceError)
expect { described_class.new(name: 'feature-name', restart: 'foo') }
.to raise_error(Puppet::ResourceError)
end
end

Expand All @@ -80,8 +80,8 @@
end

it 'rejects non-string' do
expect { described_class.new(name: 'feature-name', source: false) }.
to raise_error(%r{Parameter source is not a string.})
expect { described_class.new(name: 'feature-name', source: false) }
.to raise_error(%r{Parameter source is not a string.})
end
end
end
Expand Down
Loading