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'
31 changes: 29 additions & 2 deletions .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`
# on 2025-08-27 02:00:07 UTC using RuboCop version 1.50.2.
# `rubocop --auto-gen-config --no-auto-gen-timestamp`
# 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 @@ -12,18 +12,45 @@ RSpec/BeforeAfterAll:
- 'spec/acceptance/**/*'
- 'spec/api/ipptool_spec.rb'

# Offense count: 15
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/IncludeExamples:
Exclude:
- 'spec/acceptance/puppet/cups_queue_ensure_printer_spec.rb'
- 'spec/unit/puppet/provider/cups_queue/cups_spec.rb'

# Offense count: 159
# Configuration parameters: AssignmentOnly.
RSpec/InstanceVariable:
Exclude:
- 'spec/api/ipptool_spec.rb'

# Offense count: 12
RSpec/LeakyLocalVariable:
Exclude:
- 'spec/acceptance/puppet/cups_queue_ensure_absent_spec.rb'
- 'spec/acceptance/puppet/cups_queue_ensure_printer_spec.rb'
- 'spec/acceptance/puppet/cups_queue_properties_spec.rb'
- 'spec/unit/puppet/provider/cups_queue/cups_spec.rb'

# Offense count: 8
# Configuration parameters: AllowSubject.
RSpec/MultipleMemoizedHelpers:
Max: 8

# Offense count: 8
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/ReceiveMessages:
Exclude:
- 'spec/unit/puppet/provider/cups_queue/cups_spec.rb'

# Offense count: 6
RSpec/RepeatedExample:
Exclude:
- 'spec/classes/init_spec.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/MapIntoArray:
Exclude:
- 'lib/puppet/provider/cups_queue/cups.rb'
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
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
end

Expand All @@ -18,7 +18,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
4 changes: 2 additions & 2 deletions lib/puppet/provider/cups_queue/cups.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def description=(value)
end

def enabled
query('printer-state') == 'stopped' ? :false : :true
(query('printer-state') == 'stopped') ? :false : :true
end

def enabled=(value)
Expand Down Expand Up @@ -369,7 +369,7 @@ def users_should
#
# @yield The command to be executed as root user
def while_root_allowed
acl = (resource.should(:access) || access)
acl = resource.should(:access) || access
debug("CUPS #4781: Temporarily allowing 'root' user to access the queue.")
self.access = { 'policy' => 'allow', 'users' => ['root'] }
yield
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/type/cups_queue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def should_to_s(value)
'printer-state' => 'enabled',
'printer-location' => 'location',
'printer-is-shared' => 'shared',
'device-uri' => 'uri'
'device-uri' => 'uri',
}

value.each_key do |key|
Expand Down
4 changes: 2 additions & 2 deletions spec/api/ipptool_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def ipptool(param, resource, ipp_request)

OS_NAME = fact('os.name')
OS_RELEASE_FULL = fact('os.release.full')
DEBIAN_PWG_RASTER_PATCH = (OS_NAME == 'Ubuntu' && ['16.10', '17.04'].include?(OS_RELEASE_FULL))
DEBIAN_PWG_RASTER_PATCH = OS_NAME == 'Ubuntu' && ['16.10', '17.04'].include?(OS_RELEASE_FULL)

RSpec.describe 'Ipptool' do
before(:all) do
Expand Down Expand Up @@ -627,7 +627,7 @@ def ipptool(param, resource, ipp_request)
add_printers_to_classes(
'CrawlSpace' => %w[],
'GroundFloor' => %w[Office Warehouse],
'UpperFloor' => %w[BackOffice]
'UpperFloor' => %w[BackOffice],
)
end

Expand Down
28 changes: 14 additions & 14 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
service_enable: 'true',
service_ensure: 'running',
service_manage: 'true',
service_names: 'cups'
service_names: 'cups',
}
end

Expand Down Expand Up @@ -253,9 +253,9 @@
location: {
'/endpoint' => {
'Directive' => 'option1 option2',
'Key' => 'value'
}
}
'Key' => 'value',
},
},
}
end

Expand All @@ -276,9 +276,9 @@
location: {
'/' => {
'Directive' => 'option1 option2',
'Key' => 'value'
}
}
'Key' => 'value',
},
},
}
end

Expand Down Expand Up @@ -586,7 +586,7 @@
{
package_ensure: package_ensure,
package_manage: true,
package_names: 'mycupsipp'
package_names: 'mycupsipp',
}
end

Expand All @@ -604,7 +604,7 @@
{
package_ensure: package_ensure,
package_manage: true,
package_names: %w[mycups myipp]
package_names: %w[mycups myipp],
}
end

Expand Down Expand Up @@ -685,8 +685,8 @@
{
resources: {
'BackOffice' => { 'ensure' => 'printer' },
'UpperFloor' => { 'ensure' => 'class', 'members' => ['BackOffice'] }
}
'UpperFloor' => { 'ensure' => 'class', 'members' => ['BackOffice'] },
},
}
end

Expand All @@ -710,7 +710,7 @@
service_enable: service_enable,
service_ensure: service_ensure,
service_manage: true,
service_names: 'mycups'
service_names: 'mycups',
}
end

Expand All @@ -731,7 +731,7 @@
service_enable: service_enable,
service_ensure: service_ensure,
service_manage: true,
service_names: %w[mycups mycups-browsed]
service_names: %w[mycups mycups-browsed],
}
end

Expand Down Expand Up @@ -764,7 +764,7 @@
{
service_ensure: service_ensure,
service_manage: false,
service_names: 'mycups'
service_names: 'mycups',
}
end

Expand Down
4 changes: 2 additions & 2 deletions spec/support/spec/any_supported_os.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def any_supported_os(more_facts = {})
release: {
full: '12.0',
major: '12',
minor: '0'
minor: '0',
},
distro: {
codename: 'bookworm',
Expand All @@ -17,7 +17,7 @@ def any_supported_os(more_facts = {})
release: {
full: '12.0',
major: '12',
minor: '0'
minor: '0',
},
},
},
Expand Down
12 changes: 6 additions & 6 deletions spec/unit/puppet/provider/cups_queue/cups_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
include_examples 'correct instances', [{
'CrawlSpace' => %w[],
'GroundFloor' => %w[Office Warehouse],
'UpperFloor' => %w[BackOffice]
}, %w[BackOffice Office Warehouse]]
'UpperFloor' => %w[BackOffice],
}, %w[BackOffice Office Warehouse],]
end
end

Expand Down Expand Up @@ -179,7 +179,7 @@
describe 'as raw queue' do
manifest = {
ensure: 'printer',
name: 'Office'
name: 'Office',
}

include_examples 'provider contract', manifest
Expand All @@ -189,7 +189,7 @@
manifest = {
ensure: 'printer',
name: 'Office',
model: 'drv:///sample.drv/deskjet.ppd'
model: 'drv:///sample.drv/deskjet.ppd',
}

include_examples 'provider contract', manifest
Expand All @@ -199,7 +199,7 @@
manifest = {
ensure: 'printer',
name: 'Office',
ppd: '/usr/share/ppd/cupsfilters/textonly.ppd'
ppd: '/usr/share/ppd/cupsfilters/textonly.ppd',
}

include_examples 'provider contract', manifest
Expand Down Expand Up @@ -728,7 +728,7 @@
'PageSize' => 'A4',
'MediaType' => 'PLAIN',
'InputSlot' => 'TRAY1',
'Duplex' => 'None'
'Duplex' => 'None',
}
end

Expand Down
Loading
Loading