Skip to content

modulesync 10.0.0 #740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: true

permissions:
contents: read

jobs:
puppet:
name: Puppet
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ name: "Pull Request Labeler"
on:
pull_request_target: {}

permissions:
contents: read
pull-requests: write

jobs:
labeler:
permissions:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
description: 'Module version to be released. Must be a valid semver string without leading v. (1.2.3)'
required: false

permissions:
contents: write
pull-requests: write

jobs:
release_prep:
uses: 'voxpupuli/gha-puppet/.github/workflows/prepare_release.yml@v3'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
tags:
- '*'

permissions:
contents: write

jobs:
release:
name: Release
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: '9.5.0'
modulesync_config_version: '10.0.0'
10 changes: 3 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'voxpupuli-test', '~> 9.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'voxpupuli-test', '~> 11.0', :require => false
gem 'puppet_metadata', '~> 5.0', :require => false
end

Expand All @@ -20,13 +18,11 @@ group :system_tests do
end

group :release do
gem 'voxpupuli-release', '~> 3.0', :require => false
gem 'voxpupuli-release', '~> 4.0', :require => false
end

gem 'rake', :require => false
gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test]

puppetversion = ENV['PUPPET_GEM_VERSION'] || [">= 7.24", "< 9"]
gem 'puppet', puppetversion, :require => false, :groups => [:test]
gem 'openvox', ENV.fetch('OPENVOX_GEM_VERSION', [">= 7", "< 9"]), :require => false, :groups => [:test]

# vim: syntax=ruby
7 changes: 4 additions & 3 deletions spec/unit/provider/package/pear_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# frozen_string_literal: true

MY_PATH = 'spec/fixtures/unit/provider/package/pear/'
require 'spec_helper'

describe Puppet::Type.type(:package).provider(:pear) do
Expand All @@ -22,7 +23,7 @@
it 'returns an array of installed packages' do
allow(described_class).to receive(:pear).
with('list', '-a').
and_return File.read(my_fixture('list_a'))
and_return File.read(File.join(MY_PATH, 'list_a'))

expect(described_class.instances.map(&:properties)).to eq [
{ name: 'Archive_Tar', vendor: 'pear.php.net', ensure: '1.4.0', provider: :pear },
Expand Down Expand Up @@ -94,7 +95,7 @@
it 'queries information about one package' do
allow(described_class).to receive(:pear).
with('list', '-a').
and_return File.read(my_fixture('list_a'))
and_return File.read(File.join(MY_PATH, 'list_a'))

resource[:name] = 'pear'
expect(provider.query).to eq(
Expand All @@ -107,7 +108,7 @@
it 'fetches the latest version available' do
allow(described_class).to receive(:pear).
with('remote-info', 'Benchmark').
and_return File.read(my_fixture('remote-info_benchmark'))
and_return File.read(File.join(MY_PATH, 'remote-info_benchmark'))

resource[:name] = 'Benchmark'
expect(provider.latest).to eq '1.2.9'
Expand Down
6 changes: 3 additions & 3 deletions spec/unit/provider/package/pecl_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
it 'returns pecl installed packages via pear' do
allow(parent_class).to receive(:pear).
with('list', '-a').
and_return File.read(fixtures('unit/provider/package/pear/list_a'))
and_return File.read(File.join('spec', 'fixtures', 'unit/provider/package/pear/list_a'))

expect(described_class.instances.map(&:properties)).to eq [
{ ensure: '1.13.5', name: 'zip', vendor: 'pecl.php.net', provider: :pecl }
Expand All @@ -42,7 +42,7 @@
it 'queries pecl package info via pear' do
allow(parent_class).to receive(:pear).
with('list', '-a').
and_return File.read(fixtures('unit/provider/package/pear/list_a'))
and_return File.read(File.join('spec', 'fixtures', 'unit/provider/package/pear/list_a'))

resource[:name] = 'zip'
expect(provider.query).to eq(ensure: '1.13.5', name: 'zip', vendor: 'pecl.php.net', provider: :pecl)
Expand All @@ -53,7 +53,7 @@
it 'fetches the latest version available via pear' do
allow(parent_class).to receive(:pear).
with('remote-info', 'pecl.php.net/zip').
and_return File.read(fixtures('unit/provider/package/pear/remote-info_zip'))
and_return File.read(File.join('spec', 'fixtures', 'unit/provider/package/pear/remote-info_zip'))

resource[:name] = 'zip'
expect(provider.latest).to eq '1.13.5'
Expand Down
1 change: 0 additions & 1 deletion types/duration.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
Integer[0],
Pattern[/^\d+[smhd]?$/]
]

Loading